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:
Hombre57
2017-08-08 23:42:05 +02:00
parent b183a0b3c7
commit f23be9345c
45 changed files with 1529 additions and 265 deletions

View File

@@ -1268,13 +1268,14 @@ void EditorPanel::info_toggled ()
Glib::ustring infoString2; //2-nd line
Glib::ustring infoString3; //3-rd line
Glib::ustring infoString4; //4-th line
Glib::ustring infoString5; //5-th line
Glib::ustring expcomp;
if (!ipc || !openThm) {
return;
}
const rtengine::ImageMetaData* idata = ipc->getInitialImage()->getMetaData();
const rtengine::FramesMetaData* idata = ipc->getInitialImage()->getMetaData();
if (idata && idata->hasExif()) {
infoString1 = Glib::ustring::compose ("%1 + %2",
@@ -1305,6 +1306,24 @@ void EditorPanel::info_toggled ()
infoString4 = Glib::ustring::compose ("<span size=\"small\">%1 MP (%2x%3)</span>", Glib::ustring::format (std::setw (4), std::fixed, std::setprecision (1), (float)ww * hh / 1000000), ww, hh);
infoString = Glib::ustring::compose ("%1\n%2\n%3\n%4", infoString1, infoString2, infoString3, infoString4);
//adding special characteristics
bool isHDR = idata->getHDR();
bool isPixelShift = idata->getPixelShift();
int numFrames = idata->getFrameCount();
if (isHDR) {
infoString5 = Glib::ustring::compose (M("QINFO_HDR"), numFrames);
if (numFrames == 1) {
int sampleFormat = idata->getSampleFormat();
infoString5 = Glib::ustring::compose ("%1 / %2", infoString5, M(Glib::ustring::compose("SAMPLEFORMAT_%1", sampleFormat)));
}
} else if (isPixelShift) {
infoString5 = Glib::ustring::compose (M("QINFO_PIXELSHIFT"), numFrames);
}
if (!infoString5.empty()) {
infoString = Glib::ustring::compose ("%1\n%2", infoString, infoString5);
}
} else {
infoString = M ("QINFO_NOEXIF");
}