don't abort when trying to change orientation of thumbnails and rotate-set-exif is...
authorGuillaume Cottenceau <gcottenc@gmail.com>
Mon, 11 Aug 2008 12:30:24 +0000 (14:30 +0200)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Mon, 11 Aug 2008 12:31:36 +0000 (14:31 +0200)
bin/booh

index 1d9666fc5163b149dd9a0319e22e6168dae439ee..ef84d47fa169a4c38e1f44c14aac3ad9cbe4aec0 100755 (executable)
--- a/bin/booh
+++ b/bin/booh
@@ -487,7 +487,8 @@ def rotate_real(angle, thumbnail_img, img, xmlelem, attributes_prefix, desired_x
     new_angle = (xmlelem.attributes["#{attributes_prefix}rotate"].to_i + angle) % 360
     xmlelem.add_attribute("#{attributes_prefix}rotate", new_angle.to_s)
 
-    if $config['rotate-set-exif'] == 'true'
+    #- change exif orientation if configured so (but forget in case of thumbnails caption)
+    if $config['rotate-set-exif'] == 'true' && xmlelem.attributes['filename']
         Exif.set_orientation(from_utf8($current_path + '/' + xmlelem.attributes['filename']), angle_to_exif_orientation(new_angle))
     end