Changeset View
Changeset View
Standalone View
Standalone View
src/kexiv2exif.cpp
Show First 20 Lines • Show All 981 Lines • ▼ Show 20 Line(s) | 977 | { | |||
---|---|---|---|---|---|
982 | 982 | | |||
983 | try | 983 | try | ||
984 | { | 984 | { | ||
985 | // Make sure IFD0 is explicitly marked as a main image | 985 | // Make sure IFD0 is explicitly marked as a main image | ||
986 | Exiv2::ExifData::const_iterator pos = d->exifMetadata().findKey(Exiv2::ExifKey("Exif.Image.NewSubfileType")); | 986 | Exiv2::ExifData::const_iterator pos = d->exifMetadata().findKey(Exiv2::ExifKey("Exif.Image.NewSubfileType")); | ||
987 | 987 | | |||
988 | if (pos == d->exifMetadata().end() || pos->count() != 1 || pos->toLong() != 0) | 988 | if (pos == d->exifMetadata().end() || pos->count() != 1 || pos->toLong() != 0) | ||
989 | { | 989 | { | ||
990 | #if EXIV2_TEST_VERSION(0,27,0) | ||||
991 | throw Exiv2::Error(Exiv2::kerErrorMessage, "Exif.Image.NewSubfileType missing or not set as main image"); | ||||
992 | #else | ||||
990 | throw Exiv2::Error(1, "Exif.Image.NewSubfileType missing or not set as main image"); | 993 | throw Exiv2::Error(1, "Exif.Image.NewSubfileType missing or not set as main image"); | ||
994 | #endif | ||||
991 | } | 995 | } | ||
992 | 996 | | |||
993 | // Remove sub-IFD tags | 997 | // Remove sub-IFD tags | ||
994 | std::string subImage1("SubImage1"); | 998 | std::string subImage1("SubImage1"); | ||
995 | 999 | | |||
996 | for (Exiv2::ExifData::iterator md = d->exifMetadata().begin(); md != d->exifMetadata().end();) | 1000 | for (Exiv2::ExifData::iterator md = d->exifMetadata().begin(); md != d->exifMetadata().end();) | ||
997 | { | 1001 | { | ||
998 | if (md->groupName() == subImage1) | 1002 | if (md->groupName() == subImage1) | ||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |