← Back to team overview

phatch-dev team mailing list archive

[Bug 529605] Re: [Test] AttributeError get_bbox for Jpegran in Lossless JPEG action

 

$ bzr diff
=== modified file 'phatch/actions/lossless_jpeg.py'
--- phatch/actions/lossless_jpeg.py	2010-02-26 04:42:00 +0000
+++ phatch/actions/lossless_jpeg.py	2010-02-28 21:26:25 +0000
@@ -188,7 +188,7 @@
         elif transformation == CROP:
             mode = values['mode']
             if mode == 'Auto':
-                bbox = photo.get_flattened_image().get_bbox()
+                bbox = photo.get_flattened_image().getbbox()
                 values['left'], values['top'], values['width'], \
                     values['height'] = bbox
             else:

$ bzr commit
Committing to: /home/stani/sync/python/phatch/repo/trunk/                      
modified phatch/actions/lossless_jpeg.py
Committed revision 1653.                  

** Changed in: phatch
       Status: In Progress => Fix Committed

-- 
[Test] AttributeError get_bbox for Jpegran in Lossless JPEG action
https://bugs.launchpad.net/bugs/529605
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Fix Committed

Bug description:
actionlist: /home/stani/sync/python/phatch/repo/bug#526489/tests/output/actionlists/lossless_jpeg_Mode=Auto_Trafo=Crop_Util=Jpegtran.phatch
Error 0:Can not apply action Lossless JPEG on image 'exif.jpg' in folder:
/home/stani/sync/python/phatch/repo/bug#526489/tests/input

get_bbox

Action:{'fields': {'All': '30%',
            'Angle': u'180 degrees',
            'Angle ': u'270 degrees',
            'Bottom': '0px',
            'Copy': u'All',
            'Direction': u'Vertical',
            'Direction ': u'Horizontal',
            'File Name': u'<filename>_lossless_jpeg_Mode=Auto_Trafo=Crop_Util=Jpegtran',
            'In': u'/home/stani/sync/python/phatch/repo/bug#526489/tests/output/images',
            'Left': '0px',
            'Mode': u'Auto',
            'Preserve Timestamp': 'no',
            'Right': '0px',
            'Show Advanced Options': 'no',
            'Top': '0px',
            'Transformation': u'Transverse',
            'Transformation ': u'Crop',
            'Update Exif Thumbnail': 'yes',
            'Update JPEG': 'no',
            'Update Orientation Tag': 'no',
            'Utility': u'Jpegtran (without exif support)',
            '__enabled__': 'yes'},
 'label': 'Lossless JPEG'}

Traceback (most recent call last):
  File "/home/stani/sync/python/phatch/repo/bug#526489/phatch/core/api.py", line 617, in apply_action_to_photo
    photo = action.apply(photo, read_only_settings, cache)
  File "/home/stani/sync/python/phatch/repo/bug#526489/phatch/actions/lossless_jpeg.py", line 252, in apply
    self.call(photo, info, utility)
  File "/home/stani/sync/python/phatch/repo/bug#526489/phatch/actions/lossless_jpeg.py", line 276, in call
    self.get_lossless_filename(photo, info)))
  File "/home/stani/sync/python/phatch/repo/bug#526489/phatch/actions/lossless_jpeg.py", line 215, in get_command_line
    self.get_command_line_args(action, photo),
  File "/home/stani/sync/python/phatch/repo/bug#526489/phatch/actions/lossless_jpeg.py", line 191, in get_command_line_args
    bbox = photo.get_flattened_image().get_bbox()
  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 494, in __getattr__
    raise AttributeError(name)
AttributeError: get_bbox





References