Image Rotation and Text action

Bug #382776 reported by Droopy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
High
Stani

Bug Description

When I write a text on the photos, Phatch can't detect the image rotation and the text isn't in the same vue as the photo.

See in attachment

OpenSuse 11

Revision history for this message
Droopy (serge-tellier) wrote :
Revision history for this message
Stani (stani) wrote :

Thanks for reporting this bug and especially for providing the zipped files to reproduce it. The bug first needs this blueprint to be implemented:
https://blueprints.launchpad.net/phatch/+spec/exif-iptc-write-action

If you want to follow the progress, please subscribe to the blueprint.

Changed in phatch:
assignee: nobody → stani (stani)
importance: Undecided → Medium
status: New → Confirmed
Stani (stani)
Changed in phatch:
importance: Medium → High
status: Confirmed → In Progress
Revision history for this message
Stani (stani) wrote :
Download full text (7.2 KiB)

I've uploaded a fix in the bazaar repository. I've tested this only one image, so a lot of good testing is required now. Droopy, I count on you ;-) I'll upload it to my PPA where it will be available as Phatch-0.2.0.bzr656 or a later version.
https://launchpad.net/~stani/+archive/ppa

$ bzr diff
=== modified file 'phatch/core/api.py'
--- phatch/core/api.py 2009-06-05 00:29:01 +0000
+++ phatch/core/api.py 2009-06-05 17:59:27 +0000
@@ -274,7 +274,7 @@
     result['abort'] = False
     return photo, result

-def flush_log(photo):
+def flush_log(photo, image_file, action=None):
     if photo.log:
         log_error(photo.log,image_file,action,label='Warning')
         photo.log = ''
@@ -285,7 +285,7 @@
         result['skip'] = False
         result['abort'] = False
         #log non fatal errors/warnings
- flush_log(photo)
+ flush_log(photo, image_file, action)
         return photo, result
     except Exception, details:
         folder, image = os.path.split(ensure_unicode(image_file))
@@ -382,7 +382,7 @@
         for action_index, action in enumerate(actions):
             if action.flush_metadata_before:
                 photo.flush_metadata()
- flush_log(photo)
+ flush_log(photo, image_file)
             #update progress
             progress_result = {}
             send.progress_update_index(progress_result,image_index,action_index)
@@ -397,7 +397,7 @@
             elif result['skip']:
                 break
         photo.flush_metadata()
- flush_log(photo)
+ flush_log(photo, image_file, action)
         del photo, progress_result, action_index, action
     send.progress_close()

=== modified file 'phatch/core/lib/formField.py'
--- phatch/core/lib/formField.py 2009-06-05 13:59:16 +0000
+++ phatch/core/lib/formField.py 2009-06-05 17:49:18 +0000
@@ -225,6 +225,7 @@
         BYSIZE+'/'+SUBFOLDER,
         DEFAULT_FOLDER,
         FOLDER_PHATCH,
+ FOLDER+'/'+SUBFOLDER,
         FOLDER,
     ]
     STAMPS = [

=== modified file 'phatch/core/pil.py'
--- phatch/core/pil.py 2009-06-05 13:15:12 +0000
+++ phatch/core/pil.py 2009-06-05 17:54:49 +0000
@@ -39,6 +39,7 @@
     pyexiv2 = None
     exif = False
 WWW_PYEXIV2 = 'http://tilloy.net/dev/pyexiv2/'
+NEEDS_PYEXIV2 = _('pyexiv2 needs to be installed')+' (%s)'%WWW_PYEXIV2

 try:
     from unicoding import ensure_unicode
@@ -82,6 +83,13 @@
         raise Exception('Libtiff tools are needed for "%s" compression'\
             %compression)

+def transpose(image, methods):
+ """Transpose with a sequence of transformations, mainly useful
+ for exif."""
+ for method in methods:
+ image = image.transpose(method)
+ return image
+
 def treshold(a):
     if a <= 128:
         return 255
@@ -144,6 +152,7 @@

 def extract_info_pexif(info,image):
     """pexif = Pil EXIF"""
+ info['Pexif'] = 1
     #check if exif information is available through pil
     if not hasattr(image,'_getexif'):
         return info
@@ -345,6 +354,7 @@
         self._rotate_exif_reverse ...

Read more...

Changed in phatch:
status: In Progress → Fix Committed
Stani (stani)
Changed in phatch:
milestone: none → 0.2.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.