Changeset View
Changeset View
Standalone View
Standalone View
Exif/Info.cpp
Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Line(s) | 191 | { | |||
---|---|---|---|---|---|
200 | data["Exif.Image.ImageDescription"] = info->description().toLocal8Bit().data(); | 200 | data["Exif.Image.ImageDescription"] = info->description().toLocal8Bit().data(); | ||
201 | 201 | | |||
202 | image = Exiv2::ImageFactory::open( QFile::encodeName(destName).data() ); | 202 | image = Exiv2::ImageFactory::open( QFile::encodeName(destName).data() ); | ||
203 | image->setExifData(data); | 203 | image->setExifData(data); | ||
204 | image->writeMetadata(); | 204 | image->writeMetadata(); | ||
205 | } | 205 | } | ||
206 | 206 | | |||
207 | /** | 207 | /** | ||
208 | * Some Canon cameras stores EXIF info in files ending in .thm, so we need to use those files for fetching EXIF info | 208 | * Some Canon cameras stores Exif info in files ending in .thm, so we need to use those files for fetching Exif info | ||
209 | * if they exists. | 209 | * if they exists. | ||
210 | */ | 210 | */ | ||
211 | DB::FileName Exif::Info::exifInfoFile( const DB::FileName& fileName ) | 211 | DB::FileName Exif::Info::exifInfoFile( const DB::FileName& fileName ) | ||
212 | { | 212 | { | ||
213 | QString dirName = QFileInfo( fileName.relative() ).path(); | 213 | QString dirName = QFileInfo( fileName.relative() ).path(); | ||
214 | QString baseName = QFileInfo( fileName.relative() ).baseName(); | 214 | QString baseName = QFileInfo( fileName.relative() ).baseName(); | ||
215 | DB::FileName name = DB::FileName::fromRelativePath(dirName + QString::fromLatin1("/") + baseName + QString::fromLatin1( ".thm" )); | 215 | DB::FileName name = DB::FileName::fromRelativePath(dirName + QString::fromLatin1("/") + baseName + QString::fromLatin1( ".thm" )); | ||
216 | if ( name.exists() ) | 216 | if ( name.exists() ) | ||
Show All 28 Lines |