Skip to content

Commit

Permalink
Fix BestImageViewer#1099: Support exr file format
Browse files Browse the repository at this point in the history
BestImageViewer#1099

This can be disabled by: meson -Dexr=disabled
  • Loading branch information
caclark committed Oct 29, 2024
1 parent cb791dd commit 3b05ab7
Show file tree
Hide file tree
Showing 21 changed files with 315 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/appimage-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ jobs:
yes | sudo apt-get install libgexiv2-dev
yes | sudo apt-get install libgspell-1-dev
yes | sudo apt-get install libheif-dev
yes | sudo apt-get install libimath-dev
yes | sudo apt-get install liblua5.3-dev
yes | sudo apt-get install libopenexr-dev
yes | sudo apt-get install libpoppler-glib-dev
yes | sudo apt-get install libraw-dev libomp-dev
yes | sudo apt-get install libunwind-dev
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/appimage-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ jobs:
- run: sudo apt-get install libgexiv2-dev
- run: sudo apt-get install libgspell-1-dev
- run: sudo apt-get install libheif-dev
- run: sudo apt-get install libimath-dev
- run: sudo apt-get install libdjvulibre-dev
- run: sudo apt-get install liblua5.3-dev
- run: sudo apt-get install libopenexr-dev
- run: sudo apt-get install libpoppler-glib-dev
- run: sudo apt-get install libraw-dev libomp-dev
- run: sudo apt-get install libunwind-dev
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/check-build-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
-Devince=disabled
-Dexecinfo=disabled
-Dexiv2=disabled
-Dexr=disabled
-Dextended_stacktrace=disabled
-Dgit=disabled
-Dgps-map=disabled
Expand Down Expand Up @@ -97,9 +98,11 @@ jobs:
- run: sudo apt-get install libgspell-1-dev
- run: sudo apt-get install libgtk-3-bin
- run: sudo apt-get install libheif-dev
- run: sudo apt-get install libimath-dev
- run: sudo apt-get install libdjvulibre-dev
- run: sudo apt-get install libjxl-dev
- run: sudo apt-get install liblua5.3-dev
- run: sudo apt-get install libopenexr-dev
- run: sudo apt-get install libopenjp2-7-dev
- run: sudo apt-get install libpoppler-glib-dev
- run: sudo apt-get install libraw-dev libomp-dev
Expand Down
2 changes: 2 additions & 0 deletions AppImageBuilder-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ AppDir:
- libgexiv2-2
- libgspell-1-2
- libheif1
- libimath
- libjpeg8
- liblcms2-2
- liblua5.3-0
- libopenexr
- libopenjp2-7
- libraw23
- librsvg2-common
Expand Down
2 changes: 2 additions & 0 deletions AppImageBuilder-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ AppDir:
- libgexiv2-2
- libgspell-1-2
- libheif1
- libimath
- libjpeg8
- liblcms2-2
- liblua5.3-0
- libopenexr
- libopenjp2-7
- libraw23
- librsvg2-common
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Geeqie is a graphics file viewer. Basic features:
* output: single image, anaglyph, SBS, mirror, SBS half size (3DTV)

* Viewing raster and vector images, in the following formats:
* 3FR ANI ARW AVIF BMP CR2 CR3 CRW CUR DDS DJVU DNG ERF GIF GQV HEIC HEIF ICO JP2 JPE JPEG JPG JPS JXL KDC MEF MOS MPO MRW NEF ORF PBM PDF PEF PGM PNG PNM PPM PSD QIF QTIF RAF RAW RW2 SCR SR2 SRF SVG SVGZ TGA TIF TIFF WEBP XBM XPM.
* 3FR ANI ARW AVIF BMP CR2 CR3 CRW CUR DDS DJVU DNG ERF EXR GIF GQV HEIC HEIF ICO JP2 JPE JPEG JPG JPS JXL KDC MEF MOS MPO MRW NEF ORF PBM PDF PEF PGM PNG PNM PPM PSD QIF QTIF RAF RAW RW2 SCR SR2 SRF SVG SVGZ TGA TIF TIFF WEBP XBM XPM.
* Display images in archive files (.ZIP, .RAR etc.).
* Animated GIF and WEBP files are supported.

Expand Down
2 changes: 1 addition & 1 deletion auto-complete/geeqie
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bash completion for geeqie -*- shell-script -*-

file_types='@(3fr|ani|arw|avif|bmp|cr2|cr3|crw|cur|dds|djvu|dng|erf|gif|gqv|heic|heif|ico|jp2|jpe|jpeg|jpg|jps|jxl|kdc|mef|mos|mpo|mrw|nef|orf|pbm|pdf|pef|pgm|png|pnm|ppm|psd|qif|qtif|raf|raw|rw2|scr|sr2|srf|svg|svgz|tga|tif|tiff|webp|xbm|xpm)'
file_types='@(3fr|ani|arw|avif|bmp|cr2|cr3|crw|cur|dds|djvu|dng|erf|exr|gif|gqv|heic|heif|ico|jp2|jpe|jpeg|jpg|jps|jxl|kdc|mef|mos|mpo|mrw|nef|orf|pbm|pdf|pef|pgm|png|pnm|ppm|psd|qif|qtif|raf|raw|rw2|scr|sr2|srf|svg|svgz|tga|tif|tiff|webp|xbm|xpm)'

actions='About AddMark0 AddMark1 AddMark2 AddMark3 AddMark4 AddMark5 AddMark6 AddMark7 AddMark8 AddMark9 AlterNone Animate Back ClearMarks CloseWindow ColorProfile0 ColorProfile1 ColorProfile2 ColorProfile3 ColorProfile4 ColorProfile5 ConnectZoom100 ConnectZoom200 ConnectZoom25 ConnectZoom300 ConnectZoom33 ConnectZoom400 ConnectZoom50 ConnectZoomFillHor ConnectZoomFillVert ConnectZoomFit ConnectZoomIn ConnectZoomOut Copy CopyImage CopyPath CopyPathUnquoted CropFourThree CropNone CropOneOne CropRectangle CropSixteenNine CropThreeTwo CutPath Delete DeleteWindow DrawRectangle Escape ExifRotate ExifWin FilterMark0 FilterMark1 FilterMark2 FilterMark3 FilterMark4 FilterMark5 FilterMark6 FilterMark7 FilterMark8 FilterMark9 FindDupes FirstImage FirstPage Flip FloatTools FolderTree Forward FullScreen Grayscale HelpChangeLog HelpContents HelpKbd HelpNotes HelpPdf HelpSearch HelpShortcuts HideBars HideSelectableToolbars HideTools HistogramChanB HistogramChanCycle HistogramChanG HistogramChanR HistogramChanRGB HistogramChanV HistogramModeCycle HistogramModeLin HistogramModeLog Home IgnoreAlpha ImageBack ImageForward ImageHistogram ImageOverlay ImageOverlayCycle IntMark0 IntMark1 IntMark2 IntMark3 IntMark4 IntMark5 IntMark6 IntMark7 IntMark8 IntMark9 KeywordAutocomplete LastImage LastPage LayoutConfig LogWindow Maintenance Mark0 Mark1 Mark2 Mark3 Mark4 Mark5 Mark6 Mark7 Mark8 Mark9 Mirror Move NewCollection NewFolder NewWindow NewWindowDefault NewWindowFromCurrent NextImage NextPage OpenArchive OpenCollection OpenRecent OpenWith OverUnderExposed PanView PermanentDelete Plugins Preferences PrevImage PrevPage Print Quit Rating0 Rating1 Rating2 Rating3 Rating4 Rating5 RatingM1 RectangularSelection Refresh Rename RenameWindow ResetMark0 ResetMark1 ResetMark2 ResetMark3 ResetMark4 ResetMark5 ResetMark6 ResetMark7 ResetMark8 ResetMark9 Rotate180 RotateCCW RotateCW SBar SBarSort SaveMetadata Search SearchAndRunCommand SelectAll SelectInvert SelectMark0 SelectMark1 SelectMark2 SelectMark3 SelectMark4 SelectMark5 SelectMark6 SelectMark7 SelectMark8 SelectMark9 SelectNone SetMark0 SetMark1 SetMark2 SetMark3 SetMark4 SetMark5 SetMark6 SetMark7 SetMark8 SetMark9 ShowFileFilter ShowInfoPixel ShowMarks SlideShow SlideShowFaster SlideShowPause SlideShowSlower SplitDownPane SplitHorizontal SplitNextPane SplitPaneSync SplitPreviousPane SplitQuad SplitSingle SplitTriple SplitUpPane SplitVertical StereoAuto StereoCross StereoCycle StereoOff StereoSBS Thumbnails ToggleMark0 ToggleMark1 ToggleMark2 ToggleMark3 ToggleMark4 ToggleMark5 ToggleMark6 ToggleMark7 ToggleMark8 ToggleMark9 UnselMark0 UnselMark1 UnselMark2 UnselMark3 UnselMark4 UnselMark5 UnselMark6 UnselMark7 UnselMark8 UnselMark9 Up UseColorProfiles UseImageProfile ViewIcons ViewInNewWindow ViewList WriteRotation WriteRotationKeepDate Zoom100 Zoom200 Zoom25 Zoom300 Zoom33 Zoom400 Zoom50 ZoomFillHor ZoomFillVert ZoomFit ZoomIn ZoomOut ZoomToRectangle'

Expand Down
2 changes: 1 addition & 1 deletion auto-complete/geeqie-cache-maintenance
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bash completion for geeqie-cache-maintenance -*- shell-script -*-

file_types='@(3fr|ani|arw|avif|bmp|cr2|cr3|crw|cur|dds|djvu|dng|erf|gif|gqv|heic|heif|ico|jp2|jpe|jpeg|jpg|jps|jxl|kdc|mef|mos|mpo|mrw|nef|orf|pbm|pdf|pef|pgm|png|pnm|ppm|psd|qif|qtif|raf|raw|rw2|scr|sr2|srf|svg|svgz|tga|tif|tiff|webp|xbm|xpm)'
file_types='@(3fr|ani|arw|avif|bmp|cr2|cr3|crw|cur|dds|djvu|dng|erf|exr|gif|gqv|heic|heif|ico|jp2|jpe|jpeg|jpg|jps|jxl|kdc|mef|mos|mpo|mrw|nef|orf|pbm|pdf|pef|pgm|png|pnm|ppm|psd|qif|qtif|raf|raw|rw2|scr|sr2|srf|svg|svgz|tga|tif|tiff|webp|xbm|xpm)'

actions='About AddMark0 AddMark1 AddMark2 AddMark3 AddMark4 AddMark5 AddMark6 AddMark7 AddMark8 AddMark9 AlterNone Animate Back ClearMarks CloseWindow ColorProfile0 ColorProfile1 ColorProfile2 ColorProfile3 ColorProfile4 ColorProfile5 ConnectZoom100 ConnectZoom200 ConnectZoom25 ConnectZoom300 ConnectZoom33 ConnectZoom400 ConnectZoom50 ConnectZoomFillHor ConnectZoomFillVert ConnectZoomFit ConnectZoomIn ConnectZoomOut Copy CopyImage CopyPath CopyPathUnquoted CropFourThree CropNone CropOneOne CropRectangle CropSixteenNine CropThreeTwo CutPath Delete DeleteWindow DrawRectangle Escape ExifRotate ExifWin FilterMark0 FilterMark1 FilterMark2 FilterMark3 FilterMark4 FilterMark5 FilterMark6 FilterMark7 FilterMark8 FilterMark9 FindDupes FirstImage FirstPage Flip FloatTools FolderTree Forward FullScreen Grayscale HelpChangeLog HelpContents HelpKbd HelpNotes HelpSearch HelpShortcuts HideBars HideSelectableToolbars HideTools HistogramChanB HistogramChanCycle HistogramChanG HistogramChanR HistogramChanRGB HistogramChanV HistogramModeCycle HistogramModeLin HistogramModeLog Home IgnoreAlpha ImageBack ImageForward ImageHistogram ImageOverlay ImageOverlayCycle IntMark0 IntMark1 IntMark2 IntMark3 IntMark4 IntMark5 IntMark6 IntMark7 IntMark8 IntMark9 KeywordAutocomplete LastImage LastPage LayoutConfig LogWindow Maintenance Mark0 Mark1 Mark2 Mark3 Mark4 Mark5 Mark6 Mark7 Mark8 Mark9 Mirror Move NewCollection NewFolder NewWindow NewWindowDefault NewWindowFromCurrent NextImage NextPage OpenArchive OpenCollection OpenRecent OpenWith OverUnderExposed PanView PermanentDelete Plugins Preferences PrevImage PrevPage Print Quit Rating0 Rating1 Rating2 Rating3 Rating4 Rating5 RatingM1 RectangularSelection Refresh Rename RenameWindow ResetMark0 ResetMark1 ResetMark2 ResetMark3 ResetMark4 ResetMark5 ResetMark6 ResetMark7 ResetMark8 ResetMark9 Rotate180 RotateCCW RotateCW SBar SBarSort SaveMetadata Search SearchAndRunCommand SelectAll SelectInvert SelectMark0 SelectMark1 SelectMark2 SelectMark3 SelectMark4 SelectMark5 SelectMark6 SelectMark7 SelectMark8 SelectMark9 SelectNone SetMark0 SetMark1 SetMark2 SetMark3 SetMark4 SetMark5 SetMark6 SetMark7 SetMark8 SetMark9 ShowFileFilter ShowInfoPixel ShowMarks SlideShow SlideShowFaster SlideShowPause SlideShowSlower SplitDownPane SplitHorizontal SplitNextPane SplitPaneSync SplitPreviousPane SplitQuad SplitSingle SplitTriple SplitUpPane SplitVertical StereoAuto StereoCross StereoCycle StereoOff StereoSBS Thumbnails ToggleMark0 ToggleMark1 ToggleMark2 ToggleMark3 ToggleMark4 ToggleMark5 ToggleMark6 ToggleMark7 ToggleMark8 ToggleMark9 UnselMark0 UnselMark1 UnselMark2 UnselMark3 UnselMark4 UnselMark5 UnselMark6 UnselMark7 UnselMark8 UnselMark9 Up UseColorProfiles UseImageProfile ViewIcons ViewInNewWindow ViewList WriteRotation WriteRotationKeepDate Zoom100 Zoom200 Zoom25 Zoom300 Zoom33 Zoom400 Zoom50 ZoomFillHor ZoomFillVert ZoomFit ZoomIn ZoomOut ZoomToRectangle'

Expand Down
3 changes: 3 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
/* Define to enable exiv2 support */
#mesondefine HAVE_EXIV2

/* Define to enable exr support */
#mesondefine HAVE_EXR

/* Define to enable ffmpegthumbnailer support */
#mesondefine HAVE_FFMPEGTHUMBNAILER

Expand Down
2 changes: 1 addition & 1 deletion doc/docbook/GuideReferenceSupportedFormats.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<section id="GuideReferenceSupportedFormats">
<title id="titleGuideReferenceSupportedFormats">Supported File Formats</title>
<para>3FR ANI ARW AVIF BMP CR2 CR3 CRW CUR DDS DJVU DNG ERF GIF GQV HEIC HEIF ICO JP2 JPE JPEG JPG JPS JXL KDC MEF MOS MPO MRW NEF ORF PBM PDF PEF PGM PNG PNM PPM PSD QIF QTIF RAF RAW RW2 SCR SR2 SRF SVG SVGZ TGA TIF TIFF WEBP XBM XPM </para>
<para>3FR ANI ARW AVIF BMP CR2 CR3 CRW CUR DDS DJVU DNG ERF EXR GIF GQV HEIC HEIF ICO JP2 JPE JPEG JPG JPS JXL KDC MEF MOS MPO MRW NEF ORF PBM PDF PEF PGM PNG PNM PPM PSD QIF QTIF RAF RAW RW2 SCR SR2 SRF SVG SVGZ TGA TIF TIFF WEBP XBM XPM </para>
<para>Images in archive files (.ZIP, .TAR etc) can be displayed.
</para>
<para>Animated GIF and WEBP files are supported.
Expand Down
6 changes: 5 additions & 1 deletion geeqie-install-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
## Dialogs allow the user to install additional features.
##

version="2024-10-23"
version="2024-10-29"
description='
Geeqie is an image viewer.
This script will download, compile, and install Geeqie on Debian-based systems.
Expand Down Expand Up @@ -75,6 +75,10 @@ libwebp (for WebP images)
libwebp-dev
libdjvulibre (for DjVu images)
libdjvulibre-dev
libopenexr (for exr images)
libopenexr-dev
libimath (for exr images)
libimath-dev
libopenjp2 (for JP2 images)
libopenjp2-7-dev
libraw (for CR3 images)
Expand Down
23 changes: 23 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,29 @@ else
summary({'exiv2' : ['disabled - image data processed by exiv2:', false]}, section : 'Configuration', bool_yn : true)
endif

conf_data.set('HAVE_EXR', 0)
exr_dep = []
req_version_exr = '>=3.0.0'
imath_dep = []
req_version_imath = '>=3.0.0'
option = get_option('exr')
if not option.disabled()
exr_dep = dependency('OpenEXR', version : req_version_exr, required : get_option('exr'))
if exr_dep.found()
imath_dep = dependency('Imath', version : req_version_imath, required : get_option('exr'))
if imath_dep.found()
conf_data.set('HAVE_EXR', 1)
summary({'exr' : ['exr files supported:', true]}, section : 'Configuration', bool_yn : true)
else
summary({'exr' : ['imath ' + req_version_imath + ' not found - exr files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
else
summary({'exr' : ['exr ' + req_version_exr + ' not found - exr files supported:', false]}, section : 'Configuration', bool_yn : true)
endif
else
summary({'exr' : ['disabled - exr files supported:', false]}, section : 'Configuration', bool_yn : true)
endif

conf_data.set('HAVE_CLUTTER', 0)
conf_data.set('HAVE_LIBCHAMPLAIN', 0)
conf_data.set('HAVE_LIBCHAMPLAIN_GTK', 0)
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option('djvu', type : 'feature', value : 'auto', description : 'djvu')
option('evince', type : 'feature', value : 'auto', description : 'print preview')
option('execinfo', type : 'feature', value : 'auto', description : 'execinfo.h')
option('exiv2', type : 'feature', value : 'auto', description : 'exiv2')
option('exr', type : 'feature', value : 'auto', description : 'exr')
option('extended_stacktrace', type : 'feature', value : 'auto', description : 'extended stacktrace')
option('git', type : 'feature', value : 'auto', description : 'lua-api and changelog.html')
option('gps-map', type : 'feature', value : 'auto', description : 'gps map')
Expand Down
1 change: 1 addition & 0 deletions scripts/test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ meson setup \
-Devince=disabled \
-Dexecinfo=disabled \
-Dexiv2=disabled \
-Dexr=disabled \
-Dextended_stacktrace=disabled \
-Dgit=disabled \
-Dgps-map=disabled \
Expand Down
1 change: 1 addition & 0 deletions scripts/untranslated-text.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Pause
PixbufRenderer
PluginsMenu
READ_
runtime_error
Separator
URL
WRITE_
Expand Down
1 change: 1 addition & 0 deletions src/editors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ static GList *editor_mime_types_to_extensions(gchar **mime_types)
{"image/x-cr2", ".cr2"},
{"image/x-dcraw", "%raw;.mos"},
{"image/x-epson-erf", "%erf"},
{"image/x-exr", ".exr"},
{"image/x-ico", ".ico"},
{"image/x-kodak-kdc", ".kdc"},
{"image/x-mrw", ".mrw"},
Expand Down
4 changes: 4 additions & 0 deletions src/filefilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,14 @@ void filter_reset()
void filter_add_defaults()
{
/* formats supported by custom loaders */
/* key description extensions file_class writable allow_sidecar enabled */
filter_add_if_missing("dds", "DirectDraw Surface", ".dds", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
#if HAVE_PDF
filter_add_if_missing("pdf", "Portable Document Format", ".pdf", FORMAT_CLASS_DOCUMENT, FALSE, FALSE, TRUE);
#endif
#if HAVE_EXR
filter_add_if_missing("exr", "Exr Image", ".exr", FORMAT_CLASS_IMAGE, FALSE, TRUE, TRUE);
#endif
#if HAVE_HEIF
filter_add_if_missing("heif/avif", "HEIF/AVIF Image", ".heif;.heic;.avif", FORMAT_CLASS_IMAGE, FALSE, TRUE, TRUE);
#endif
Expand Down
Loading

0 comments on commit 3b05ab7

Please sign in to comment.