[Test] Lossless rotate doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Phatch |
High
|
Stani |
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/
super(type, obj): obj must be an instance or subtype of type
Action:{'fields': {'All': '30%',
'Angle ': '90 degrees',
'Copy': 'Comments',
'File Name': u'<filename>
'In': u'<folder>
'Left': '0px',
'Mode': 'All',
'Show Advanced Options': 'no',
'Top': '0px',
'Update Exif Thumbnail': 'yes',
'Update JPEG': 'yes',
'Update Orientation Tag': 'yes',
'label': 'Lossless JPEG'}
Traceback (most recent call last):
File "/usr/lib/
photo = action.apply(photo, read_only_settings, cache)
File "/usr/lib/
self.
File "/usr/lib/
super(
TypeError: super(type, obj): obj must be an instance or subtype of type
*
Stani (stani) wrote : | #1 |
Juho Vepsäläinen (bebraw) wrote : | #2 |
Stani (stani) wrote : | #3 |
Hi Juho, thanks for looking into this. Do you have opensuse and could you install exiftran there. Unfortunately I am too busy with other parts of phatch. So a branch or a patch would be really welcome.
Thanks in advance!
Juho Vepsäläinen (bebraw) wrote : | #4 |
I will look into setting up a virtual machine (Ubuntu most likely) during weekend. I don't mind if someone else wants to give proposed fixes a go, though. :)
I've just started to follow phatch development.
Your suggestions are right and they solve the problem, I modified the
code and it doesn't provoke that error anymore.
I tried to create a patch but it's the first time I use bzr, i'm
putting it in attachment, tell me if I "packaged" it correctly.
--
Andrea
2010/2/5 Juho Vepsäläinen <email address hidden>:
> I will look into setting up a virtual machine (Ubuntu most likely)
> during weekend. I don't mind if someone else wants to give proposed
> fixes a go, though. :)
>
> --
> Lossless rotate doesn't work
> https:/
> You received this bug notification because you are 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/
>
> 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>
> 'In': u'<folder>
> '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/
> photo = action.apply(photo, read_only_settings, cache)
> File "/usr/lib/
> self.call(
> File "/usr/lib/
> super(JpegUtility, self).execute(
> TypeError: super(type, obj): obj must be an instance or subtype of type
> *
>
>
>
Is it more useful if I upload it from the site?
Stani (stani) wrote : | #7 |
Hi Andrea
The most useful is if you push your branches to launchpad:
https:/
https:/
Note that I will be busy until march in order to review and merge it. I am really pleased with your enthusiasm. Maybe Juho can help before reviewing.
I have added you to the phatch-dev team:
https:/
Please email the mailing list with a small introduction of yourself.
Thanks in advance!
Andrea Ambu (andreambu) wrote : | #8 |
Just tried to push a branch.
Anyway I'm an Italian student (BEng in electronic engineering) who loves coding :)
I like coding in python and open source seems just a great idea to do something useful and earn some experience at the same time. I read about phatch in PyCon 2010 Atlanta website and it looks very interesting.
Oh.. as you may have noticed i'm new to launchpad and bzr but I hope to learn soon ;)
Stani (stani) wrote : | #9 |
Hi Andrea,
Maybe this is more easy for you:
http://
Looking forward to welcome you in the team!
Nadia Alramli (nadiana) wrote : | #10 |
Hi Andrea,
Welcome to the team :)
- Nadia
Changed in phatch: | |
milestone: | 0.2.6 → 0.2.7 |
summary: |
- Lossless rotate doesn't work + [Test] Lossless rotate doesn't work |
Changed in phatch: | |
assignee: | Juho Vepsäläinen (bebraw) → Andrea Ambu (andreambu) |
status: | Confirmed → In Progress |
Stani (stani) wrote : | #11 |
Hi Andrea,
The code needed a bit more clean up as suggested by Juho:
http://
Thanks very much for your effort anyway. I really appreciate it!
Changed in phatch: | |
assignee: | Andrea Ambu (andreambu) → stani (stani) |
status: | In Progress → Fix Committed |
Changed in phatch: | |
status: | Fix Committed → Fix Released |
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 photo)" with
"super(JpegUtility, self).execute(
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 LossLessSaveUti lityMixin. 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.