← Back to team overview

phatch-dev team mailing list archive

[Bug 516763] Re: Lossless rotate doesn't work

 

I don't have exiftran installed nor Ubuntu set up atm. I did glance at the code, however. You could try to replace the offending line
"super(JpegUtility, self).execute(photo)" with

        system.call(utility.get_command_line(self,photo, info['path'],
            self.get_lossless_filename(photo,info)))

and remove that part from the end of the call method. It looks a bit
suspicious to me (I expect it should call exiftran/jpegtran only if
provided file happens to be a jpeg, no?).

It's also curious that execute method of JpegUtility contains almost
exact content as the call method of LossLessSaveUtilityMixin. If you end
up doing the above change and it works out ok, you might want to
eliminate JpegUtility class altogether. Utility looks like a good
candidate for removal as well.

-- 
Lossless rotate doesn't work
https://bugs.launchpad.net/bugs/516763
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Confirmed

Bug description:
Hi Juho, can you provide a patch for this?

Error 0:Can not apply action Lossless JPEG on image 'IMG_8763.JPG' in folder:
/home/stani/sync/2010/woningen/verkoop/foto's

super(type, obj): obj must be an instance or subtype of type

Action:{'fields': {'All': '30%',
            'Angle': u'270 degrees',
            'Angle ': '90 degrees',
            'Bottom': '0px',
            'Copy': 'Comments',
            'Direction': 'Horizontal',
            'Direction ': 'Horizontal',
            'File Name': u'<filename>_phatch',
            'In': u'<folder>/<subfolder>',
            'Left': '0px',
            'Mode': 'All',
            'Preserve Timestamp': 'yes',
            'Right': '0px',
            'Show Advanced Options': 'no',
            'Top': '0px',
            'Transformation': u'Rotate',
            'Transformation ': 'Crop',
            'Update Exif Thumbnail': 'yes',
            'Update JPEG': 'yes',
            'Update Orientation Tag': 'yes',
            'Utility': 'Exiftran (with exif support)',
            '__enabled__': 'yes'},
 'label': 'Lossless JPEG'}

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/phatch/core/api.py", line 609, in apply_action_to_photo
    photo = action.apply(photo, read_only_settings, cache)
  File "/usr/lib/python2.6/dist-packages/phatch/actions/lossless_jpeg.py", line 261, in apply
    self.call(photo,info,utility)
  File "/usr/lib/python2.6/dist-packages/phatch/actions/lossless_jpeg.py", line 275, in call
    super(JpegUtility, self).execute(photo)
TypeError: super(type, obj): obj must be an instance or subtype of type
*





References