[ocrfeeder] Make the translateToUnits method return int values
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Make the translateToUnits method return int values
- Date: Tue, 27 Jul 2010 22:05:25 +0000 (UTC)
commit 2d9688eccaef70b7d1447421bee9924f745ef7e8
Author: Joaquim Rocha <jrocha igalia com>
Date: Wed Jul 7 19:09:15 2010 +0200
Make the translateToUnits method return int values
layoutAnalysis.Block: This method was returning float values
which would give warnings when used with some Python Imaging
Library methods.
feeder/layoutAnalysis.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/feeder/layoutAnalysis.py b/feeder/layoutAnalysis.py
index 984e546..307c6fb 100644
--- a/feeder/layoutAnalysis.py
+++ b/feeder/layoutAnalysis.py
@@ -129,7 +129,7 @@ class Block:
lowest_y = self.finish_line * window_size + window_size
if self.extra_charge > 0:
lowest_y += window_size / 2.0
- return leftmost_x, highest_y, rightmost_x, lowest_y
+ return int(leftmost_x), int(highest_y), int(rightmost_x), int(lowest_y)
def __str__(self):
block_str = """
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]