Then can you tell me what I am doing wrong? I tried "Save Tags" months ago before I posted in the forum and filed the bug report, and I tried it again now but it still is not working for me. I've tried using "Save Tags" pointed to the source folder and to a different folder but I get the same thing - an error message and the original image jpg file changed to a 0 kb jpg file. Using "Save" works just fine, but it is not lossless. Attached are screenshots of my action and the error message. Following is the log:
Error 0:Can not apply action Save Tags on image 'P8071777.JPG' in folder:
/home/edward/Pictures/Trial
local variable 'warnings' referenced before assignment
Traceback (most recent call last):
File "/usr/share/phatch/phatch/core/api.py", line 614, in apply_action_to_photo
photo = action.apply(photo, read_only_settings, cache)
File "/usr/share/phatch/phatch/actions/save_metadata.py", line 47, in apply
info.save(filename)
File "/usr/share/phatch/phatch/core/pil.py", line 440, in save
return warnings
UnboundLocalError: local variable 'warnings' referenced before assignment
Thanks
Ed
> Date: Fri, 19 Aug 2011 00:31:16 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 764184] Re: no way to losslessly save file after lossless rotate
>
> You should use the action "Save Tags" instead of "Save".
>
> ** Changed in: phatch
> Status: New => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/764184
>
> Title:
> no way to losslessly save file after lossless rotate
>
> Status in Phatch = Photo & Batch!:
> Invalid
>
> Bug description:
> After using the "Lossless JPEG" action to do a lossless autorotate
> based on exif orientation, there is no way to losslessly save the
> result. Doing this in IrfanView Thumbnails results in a file size
> exactly the same as the original (i.e. no loss in quality). With
> Phatch, I assumed I would not add a Save action after the lossless
> rotation because this would result in a loss in quality. But running
> the lossless rotation action by itself results in a file with 0 bytes.
> So I added a Save metadata action, but that still resulted in a 0 byte
> file. Adding a Save action gives me an output file that is rotated,
> but the quality setting in the Save action results is applied to the
> saved file, with resulting loss.
>
> The attached tar.gz file contains the input jpeg file, the two action
> files, and the jpeg files that results from the actions.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/phatch/+bug/764184/+subscriptions
Then can you tell me what I am doing wrong? I tried "Save Tags" months ago before I posted in the forum and filed the bug report, and I tried it again now but it still is not working for me. I've tried using "Save Tags" pointed to the source folder and to a different folder but I get the same thing - an error message and the original image jpg file changed to a 0 kb jpg file. Using "Save" works just fine, but it is not lossless. Attached are screenshots of my action and the error message. Following is the log:
Error 0:Can not apply action Save Tags on image 'P8071777.JPG' in folder: Pictures/ Trial
/home/edward/
local variable 'warnings' referenced before assignment
Action:{'fields': {'File Name': u'<filename>', edward/ Pictures/ Trial',
'_ _enabled_ _': 'yes'},
'In': u'/home/
'label': 'Save Tags'}
Traceback (most recent call last): phatch/ phatch/ core/api. py", line 614, in apply_action_ to_photo phatch/ phatch/ actions/ save_metadata. py", line 47, in apply save(filename) phatch/ phatch/ core/pil. py", line 440, in save
File "/usr/share/
photo = action.apply(photo, read_only_settings, cache)
File "/usr/share/
info.
File "/usr/share/
return warnings
UnboundLocalError: local variable 'warnings' referenced before assignment
Thanks
Ed
> Date: Fri, 19 Aug 2011 00:31:16 +0000 /bugs.launchpad .net/bugs/ 764184 /bugs.launchpad .net/phatch/ +bug/764184/ +subscriptions
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 764184] Re: no way to losslessly save file after lossless rotate
>
> You should use the action "Save Tags" instead of "Save".
>
> ** Changed in: phatch
> Status: New => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> no way to losslessly save file after lossless rotate
>
> Status in Phatch = Photo & Batch!:
> Invalid
>
> Bug description:
> After using the "Lossless JPEG" action to do a lossless autorotate
> based on exif orientation, there is no way to losslessly save the
> result. Doing this in IrfanView Thumbnails results in a file size
> exactly the same as the original (i.e. no loss in quality). With
> Phatch, I assumed I would not add a Save action after the lossless
> rotation because this would result in a loss in quality. But running
> the lossless rotation action by itself results in a file with 0 bytes.
> So I added a Save metadata action, but that still resulted in a 0 byte
> file. Adding a Save action gives me an output file that is rotated,
> but the quality setting in the Save action results is applied to the
> saved file, with resulting loss.
>
> The attached tar.gz file contains the input jpeg file, the two action
> files, and the jpeg files that results from the actions.
>
> To manage notifications about this bug go to:
> https:/