Author: duncan
Date: Mon Jun 18 17:37:15 2007
New Revision: 9720
Modified:
branches/rel-1/freevo/freevo_config.py
branches/rel-1/freevo/src/skins/main/skin_utils.py
Log:
[ 1738909 ] Error image orientation in display menu
Fix applied and new config IMAGEVIEWER_REVERSED_IMAGES for inverted cameras
Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py (original)
+++ branches/rel-1/freevo/freevo_config.py Mon Jun 18 17:37:15 2007
@@ -282,6 +282,7 @@
Added SENSORS_PLATFORM_PATH and SENSORS_I2CDEV_PATH for sensor paths
Added OSD_SOUNDS_ENABLED defaulted to False for menu sounds
Added SKIN_DEBUG to show boxes around each skin area for debugging skins
+ Added IMAGEVIEWER_REVERSED_IMAGES for when the images are incorrectly
rotated
''' ),
]
@@ -1080,6 +1081,12 @@
IMAGEVIEWER_BLEND_MODE = -1
#
+# Some images are incorrected rotated, if the images are rotated clock-
+# wise instead of anti-clockwise then set this to true
+#
+IMAGEVIEWER_REVERSED_IMAGES = 0
+
+#
# What information to display by pressing DISPLAY.
# You can add as many lists as you want and the viewer will toggle
# between no osd and the lists.
Modified: branches/rel-1/freevo/src/skins/main/skin_utils.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/skin_utils.py (original)
+++ branches/rel-1/freevo/src/skins/main/skin_utils.py Mon Jun 18 17:37:15 2007
@@ -103,19 +103,30 @@
f.close()
if tags.has_key('Image Orientation'):
orientation = tags['Image Orientation']
+ _debug_('%s orientation=%s' % (item['name'], tags['Image
Orientation']))
if str(orientation) == "Rotated 90 CCW":
- item['rotation'] = 90
- #item['rotation'] = 270
+ if config.IMAGEVIEWER_REVERSED_IMAGES:
+ item['rotation'] = 90
+ else:
+ item['rotation'] = 270
elif str(orientation) == "Rotated 180":
item['rotation'] = 180
elif str(orientation) == "Rotated 90 CW":
- item['rotation'] = 270
- #item['rotation'] = 90
+ if config.IMAGEVIEWER_REVERSED_IMAGES:
+ item['rotation'] = 270
+ else:
+ item['rotation'] = 90
except Exception, e:
pass
if image and item['rotation']:
- image = pygame.transform.rotate(image, item['rotation'])
+ # pygame reverses the image rotation
+ if config.IMAGEVIEWER_REVERSED_IMAGES:
+ rotation = item['rotation']
+ else:
+ rotation = 360 - item['rotation']
+ _debug_('%s rotation=%s->%s' % (item['name'], item['rotation'],
rotation))
+ image = pygame.transform.rotate(image, rotation)
if not image:
if not force:
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog