Add multi-frame handling.
- Exif of all frames are displayed in the Editor's Exif tab (without separator) - isHDR and isPixelShift is added to the data files stored in cache - In the Editor panel, the QuickInfo frame display the HDR and PixelShift information, as well as the number of frame and bit-depth for HDR image - the number of frame is provided by dcraw. If not set, it is provided by the Exif's main IFD count - the PixelShift information (for Pentax as of now) is provided by looking at the Exif informations - the HDR information is provided by the Exif information of the first frame for Pentax raw files, or by the bitspersample, sampleformat and compression tags for other files TODO: add icons to the thumbnails to tag HDR and PixelShift files.
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
|
||||
CacheImageData::CacheImageData ()
|
||||
: md5(""), supported(false), format(FT_Invalid), rankOld(-1), inTrashOld(false), recentlySaved(false),
|
||||
timeValid(false), year(0), month(0), day(0), hour(0), min(0), sec(0), exifValid(false),
|
||||
fnumber(0.0), shutter(0.0), focalLen(0.0), focalLen35mm(0.0), focusDist(0.f), iso(0),
|
||||
redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), rotate(0), thumbImgType(0)
|
||||
timeValid(false), year(0), month(0), day(0), hour(0), min(0), sec(0), exifValid(false),
|
||||
fnumber(0.0), shutter(0.0), focalLen(0.0), focalLen35mm(0.0), focusDist(0.f), iso(0), isHDR (0), isPixelShift (false),
|
||||
sampleFormat(rtengine::IIOSF_UNKNOWN), redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), rotate(0), thumbImgType(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -138,6 +138,14 @@ int CacheImageData::load (const Glib::ustring& fname)
|
||||
iso = keyFile.get_integer ("ExifInfo", "ISO");
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("ExifInfo", "IsHDR")) {
|
||||
isHDR = keyFile.get_integer ("ExifInfo", "IsHDR");
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("ExifInfo", "IsPixelShift")) {
|
||||
isPixelShift = keyFile.get_boolean ("ExifInfo", "IsPixelShift");
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("ExifInfo", "ExpComp")) {
|
||||
expcomp = keyFile.get_string ("ExifInfo", "ExpComp");
|
||||
}
|
||||
@@ -160,6 +168,9 @@ int CacheImageData::load (const Glib::ustring& fname)
|
||||
if (keyFile.has_key ("FileInfo", "Filetype")) {
|
||||
filetype = keyFile.get_string ("FileInfo", "Filetype");
|
||||
}
|
||||
if (keyFile.has_key ("FileInfo", "SampleFormat")) {
|
||||
sampleFormat = (rtengine::IIO_Sample_Format)keyFile.get_integer ("FileInfo", "SampleFormat");
|
||||
}
|
||||
}
|
||||
|
||||
if (format == FT_Raw && keyFile.has_group ("ExtraRawInfo")) {
|
||||
@@ -235,6 +246,8 @@ int CacheImageData::save (const Glib::ustring& fname)
|
||||
keyFile.set_double ("ExifInfo", "FocalLen35mm", focalLen35mm);
|
||||
keyFile.set_double ("ExifInfo", "FocusDist", focusDist);
|
||||
keyFile.set_integer ("ExifInfo", "ISO", iso);
|
||||
keyFile.set_integer ("ExifInfo", "IsHDR", isHDR);
|
||||
keyFile.set_boolean ("ExifInfo", "IsPixelShift", isPixelShift);
|
||||
keyFile.set_string ("ExifInfo", "ExpComp", expcomp);
|
||||
}
|
||||
|
||||
@@ -242,6 +255,7 @@ int CacheImageData::save (const Glib::ustring& fname)
|
||||
keyFile.set_string ("ExifInfo", "CameraMake", camMake);
|
||||
keyFile.set_string ("ExifInfo", "CameraModel", camModel);
|
||||
keyFile.set_string ("FileInfo", "Filetype", filetype);
|
||||
keyFile.set_integer ("FileInfo", "SampleFormat", sampleFormat);
|
||||
|
||||
if (format == FT_Raw) {
|
||||
keyFile.set_integer ("ExtraRawInfo", "ThumbImageType", thumbImgType);
|
||||
|
Reference in New Issue
Block a user