[KimDaBa] Patch to read Exif information from files.
Marco Caldarelli
caldarel at yahoo.it
Thu May 6 17:25:03 BST 2004
I'm sorry, I just noticed a small error in imageinfo.cpp: lines 453 and 468
should have a '&' instead of '==' in the test.
Here is the correct diff for this file.
Cheers,
Marco
Index: imageinfo.cpp
===================================================================
RCS file: /home/kde/kdeextragear-2/kimdaba/imageinfo.cpp,v
retrieving revision 1.52
diff -r1.52 imageinfo.cpp
52c52
< readExif(fullPath, ImageInfo::Init);
---
> readExif(fullPath, EXIFMODE_INIT);
387c387
< void ImageInfo::readExif(const QString& fullPath, ExifMode mode)
---
> void ImageInfo::readExif(const QString& fullPath, int mode)
391a392
>
403c404,405
< if( mode == ImageInfo::Time ) {
---
> //Time
> if ( mode & EXIFMODE_TIME ) {
405d406
< //Time
417,418c418,420
< else if ( mode == ImageInfo::Init ) {
< // Date
---
>
> // Date
> if ( mode & EXIFMODE_DATE ) {
447,463d448
<
<
< //Time
< if (exif.contains( QString::fromLatin1( "CreationTime" ) ) ){
<
< QTime time = exif[QString::fromLatin1( "CreationTime" )].toTime();
< if (time.isValid())
< _startDate.setTime( time );
<
< }
< else{
<
< QTime time = fi.lastModified().time();
< _startDate.setTime( time );
<
< }
<
465c450,453
< // Orientation
---
> }
>
> // Orientation
> if ( mode & EXIFMODE_ORIENTATION ) {
476a465
> }
478c467,468
< // Description
---
> // Description
> if ( mode & EXIFMODE_DESCRIPTION ) {
486d475
<
More information about the Kphotoalbum
mailing list