[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/libs/kipi-plugins/jpeglossless
From: Renchi Raju <renchi () pooh ! tam ! uiuc ! edu>
Date: 2005-08-07 21:00:45
Message-ID: 1123448445.175265.30971.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 443907 by pahlibar:
in case of auto-rotate ignore the app specified angle. otherwise
apps using exif rotation angle will specify the same angle and you
end up having rotation by twice the actual needed angle
M +26 -22 actionthread.cpp
--- trunk/extragear/libs/kipi-plugins/jpeglossless/actionthread.cpp \
#443906:443907 @@ -63,31 +63,35 @@
it != urlList.end(); ++it ) {
KIPI::ImageInfo info = interface_->info( *it );
- // If the image is being displayed rotaed in the host application, \
then rotate that
- // angle too.
- int angle = (info.angle() + 360) % 360;
+ // Don't use the host angle in case of auto-rotation (Rot0)
+ if (val != Rot0)
+ {
+ // If the image is being displayed rotaed in the host \
application, then rotate that + // angle too.
+ int angle = (info.angle() + 360) % 360;
- // When the image has been rotated on the disk we can assume that \
it
- // does not need to be rotated before being displayed.
- info.setAngle( 0 );
+ // When the image has been rotated on the disk we can assume \
that it + // does not need to be rotated before being displayed.
+ info.setAngle( 0 );
+
+ if ( val == Rot90 )
+ angle +=90;
+ else if ( val == Rot180 )
+ angle += 180;
+ else if ( val == Rot270 )
+ angle += 270;
- if ( val == Rot90 )
- angle +=90;
- else if ( val == Rot180 )
- angle += 180;
- else if ( val == Rot270 )
- angle += 270;
+ angle = (angle+360) % 360;
+ if ( (90-45) <= angle && angle < (90+45) )
+ val = Rot90;
+ else if ( (180-45) <= angle && angle < (180+45) )
+ val = Rot180;
+ else if ( (270-45) <= angle && angle < (270+45) )
+ val = Rot270;
+ else
+ val = Rot0;
+ }
- angle = (angle+360) % 360;
- if ( (90-45) <= angle && angle < (90+45) )
- val = Rot90;
- else if ( (180-45) <= angle && angle < (180+45) )
- val = Rot180;
- else if ( (270-45) <= angle && angle < (270+45) )
- val = Rot270;
- else
- val = Rot0;
-
Task *t = new Task;
t->filePath = QDeepCopy<QString>((*it).path()); //deep copy
t->action = Rotate;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic