refactored code for extracting image dimensions from metadata

(cherry picked from commit 0ece9c5bfad09bc9052238d83fa696ef39effaaa)
This commit is contained in:
Alberto Griggio
2020-12-02 02:03:00 -08:00
committed by Lawrence Lee
parent 0102fca563
commit 92befa7e81
13 changed files with 146 additions and 21 deletions

View File

@@ -1357,8 +1357,13 @@ void EditorPanel::info_toggled ()
escapeHtmlChars (Glib::path_get_dirname (openThm->getFileName())) + G_DIR_SEPARATOR_S,
escapeHtmlChars (Glib::path_get_basename (openThm->getFileName())) );
int ww = ipc->getFullWidth();
int hh = ipc->getFullHeight();
int ww = -1, hh = -1;
idata->getDimensions(ww, hh);
if (ww <= 0) {
ww = ipc->getFullWidth();
hh = ipc->getFullHeight();
}
//megapixels
infoString = Glib::ustring::compose ("%1\n<span size=\"small\">%2 MP (%3x%4)</span>",
infoString,