コード例 #1
0
ファイル: dataHolder.py プロジェクト: ZhangXinNan/ocrfeeder
 def __init__(self, image_path, data_boxes = []):
     image = Image.open(image_path)
     self.pixel_width, self.pixel_height = image.size
     self.image_path = image_path
     self.setSize(getImagePrintSize(image))
     self.resolution = getImageResolution(image)
     self.data_boxes = data_boxes
コード例 #2
0
 def __init__(self, name, image_path):
     width, height = getImagePrintSize(image_path)
     self.document = canvas.Canvas(name, pagesize=(width * inch, height * inch))
コード例 #3
0
 def __init__(self, name, image_path):
     width, height = getImagePrintSize(image_path)
     self.document = canvas.Canvas(name,
                                   pagesize=(width * inch, height * inch))