[KimDaBa] patch to treat angles consistently
Jesper K. Pedersen
blackie at blackie.dk
Wed Dec 8 21:12:14 GMT 2004
applied. Thanks.
On Friday 24 September 2004 01:49, Robert L Krawitz wrote:
| The following patch against the current snapshot treats equal angles
| consistently. The specific change in behavior is to normalize all
| angles to the range (0,359); this way rotations of -90 and 270 degrees
| become equal.
|
| diff -ru kimdaba-2004-09-11-noi18n/kimdaba/imageinfo.cpp
| kimdaba-2004-09-11-noi18.new/kimdaba/imageinfo.cpp ---
| kimdaba-2004-09-11-noi18n/kimdaba/imageinfo.cpp 2004-09-04
| 15:05:47.000000000 -0400 +++
| kimdaba-2004-09-11-noi18.new/kimdaba/imageinfo.cpp 2004-09-11
| 08:40:20.000000000 -0400 @@ -485,7 +485,7 @@
| else if ( orientation == 3 || orientation == 4 )
| _angle = 180;
| else if ( orientation == 5 || orientation == 8 )
| - _angle = -90;
| + _angle = 270;
| else if ( orientation == 6 || orientation == 7 )
| _angle = 90;
| }
| diff -ru kimdaba-2004-09-11-noi18n/kimdaba/util.cpp
| kimdaba-2004-09-11-noi18.new/kimdaba/util.cpp ---
| kimdaba-2004-09-11-noi18n/kimdaba/util.cpp 2004-09-04 15:05:47.000000000
| -0400 +++ kimdaba-2004-09-11-noi18.new/kimdaba/util.cpp 2004-09-11
| 08:46:40.000000000 -0400 @@ -346,6 +346,9 @@
|
| QString Util::getThumbnailFile( const QString& imageFile, int width, int
| height, int angle ) { QFileInfo info( imageFile );
| + while (angle < 0)
| + angle += 360;
| + angle %= 360;
| return info.dirPath() + QString::fromLatin1("/ThumbNails")+
| QString::fromLatin1("/%1x%2-%3-%4")
| .arg(width)
--
Having trouble finding a given image in your collection containing
thousands of images?
http://ktown.kde.org/kimdaba might be the answer.
More information about the Kphotoalbum
mailing list