* output: single image, anaglyph, SBS, mirror, SBS half size (3DTV)
* Viewing raster and vector images, in the following formats:
-3FR, ANI, APM, ARW, BMP, CR2, CRW, CUR, DNG, ERF, GIF, ICNS, ICO, JPE/JPEG/JPG, JPS, KDC, MEF, MPO, MOS, MRW, NEF, ORF, PEF, PTX, PBM/PGM/PNM/PPM, PNG, QIF/QTIF (QuickTime Image Format), RAF, RAW, RW2, SR2, SRF, SVG/SVGZ, TGA/TARGA, TIF/TIFF, WMF, XBM, XPM, HEIF (primary image only). Animated GIFs are supported.
+3FR, ANI, APM, ARW, BMP, CR2, CRW, CUR, DNG, ERF, GIF, ICNS, ICO, JPE/JPEG/JPG, JPS, KDC, MEF, MPO, MOS, MRW, NEF, ORF, PEF, PTX, PBM/PGM/PNM/PPM, PNG, QIF/QTIF (QuickTime Image Format), RAF, RAW, RW2, SR2, SRF, SVG/SVGZ, TGA/TARGA, TIF/TIFF, WMF, XBM, XPM, HEIF (primary image only), WEBP. Animated GIFs are supported.
* Preview and thumbnails of video clips can be displayed. Clips can be run via a defined external program.
exiv2
Additional command-line tools for various operations
+ libheif
+ For displaying HEIF images
+
+ libwebp
+ For displaying webp images
+
### Code hackers:
If you plan on making any major changes to the code that will be offered for
AC_SUBST(HEIF_CFLAGS)
AC_SUBST(HEIF_LIBS)
+# WebP support
+# ----------------------------------------------------------------------
+
+AC_ARG_ENABLE([webp],
+ AC_HELP_STRING([--disable-webp], [disable webp support]),
+ [libwebp=$enableval], [libwebp=auto])
+
+if test "x${libwebp}" != "xno"; then
+ PKG_CHECK_MODULES(WEBP, libwebp >= 0.6.1,
+ [
+ HAVE_WEBP=yes
+ AC_DEFINE(HAVE_WEBP, 1, [define to enable webp support])
+ ],
+ [
+ HAVE_WEBP=no
+ AC_MSG_WARN([$WEBP_PKG_ERRORS])
+ ])
+else
+ HAVE_WEBP=disabled
+fi
+
+AM_CONDITIONAL(HAVE_WEBP, [test "x$HAVE_WEBP" = xyes])
+AC_SUBST(WEBP_CFLAGS)
+AC_SUBST(WEBP_LIBS)
+
# Markdown support
# ----------------------------------------------------------------------
Lua: $HAVE_LUA
FFmpegthumbnailer: $HAVE_FFMPEGTHUMBNAILER
Pdf: $HAVE_PDF
- Heif: $HAVE_HEIF
+ HEIF: $HAVE_HEIF
+ WebP: $HAVE_WEBP
Documentation:
Doxygen: $DX_DOXYGEN
<title>wmf</title>\r
<para>libwmf0.2-7-gtk</para>\r
</section>\r
- <section id="webp">\r
- <title>webp</title>\r
- <para>\r
- <programlisting>https://github.com/aruiz/webp-pixbuf-loader</programlisting>\r
- </para>\r
- <para>\r
- Example installation script:\r
- <programlisting>\r
- sudo apt-get install libglib2.0-dev libgdk-pixbuf2.0-dev libwebp-dev\r
- wget https://github.com/aruiz/webp-pixbuf-loader/archive/master.zip\r
- unzip master.zip\r
- cd webp-pixbuf-loader-master\r
- ./waf configure\r
- ./waf build\r
- sudo ./waf install\r
- </programlisting>\r
- </para>\r
- <para />\r
- </section>\r
<section id="xcf">\r
<title>xcf</title>\r
<para>\r
<?xml version="1.0" encoding="utf-8"?>\r
<section id="GuideReferenceSupportedFormats">\r
<title id="titleGuideReferenceSupportedFormats">Supported File Formats</title>\r
- <para>3FR, ANI, APM, ARW, BMP, CR2, CRW, CUR, DDS, DNG, ERF, GIF, ICNS, ICO, JPE/JPEG/JPG, JPS, KDC, MEF, MPO, MOS, MRW, NEF, ORF, PEF, PTX, PBM/PGM/PNM/PPM, PNG, QIF/QTIF (QuickTime Image Format), RAF, RAW, RW2, SR2, SRF, SVG/SVGZ, TGA/TARGA, TIF/TIFF, WMF, XBM, XPM, HEIF (primary image only). Animated GIFs are supported.</para>\r
+ <para>3FR, ANI, APM, ARW, BMP, CR2, CRW, CUR, DDS, DNG, ERF, GIF, ICNS, ICO, JPE/JPEG/JPG, JPS, KDC, MEF, MPO, MOS, MRW, NEF, ORF, PEF, PTX, PBM/PGM/PNM/PPM, PNG, QIF/QTIF (QuickTime Image Format), RAF, RAW, RW2, SR2, SRF, SVG/SVGZ, TGA/TARGA, TIF/TIFF, WMF, XBM, XPM, HEIF (primary image only), WebP. Animated GIFs are supported.</para>\r
<para>\r
Refer to\r
<link linkend="GuideReferencePixbufLoaders" endterm="titleGuideReferencePixbufLoaders" />\r
$(FFMPEGTHUMBNAILER_CFLAGS) \
$(PDF_CFLAGS) \
$(HEIF_CFLAGS) \
+ $(WEBP_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir)
$(FFMPEGTHUMBNAILER_CFLAGS) \
$(PDF_CFLAGS) \
$(HEIF_CFLAGS) \
+ $(WEBP_CFLAGS) \
-I$(top_srcdir) \
-I$(top_builddir)
image_load_pdf.h\
image_load_heif.c\
image_load_heif.h\
+ image_load_webp.c\
+ image_load_webp.h\
image_load_ffmpegthumbnailer.c\
image_load_ffmpegthumbnailer.h\
image-overlay.c \
zonedetect.c \
zonedetect.h
-geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(JPEG_LIBS) $(TIFF_LIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS) $(LUA_LIBS) $(CLUTTER_LIBS) $(CLUTTER_GTK_LIBS) $(FFMPEGTHUMBNAILER_LIBS) $(PDF_LIBS) $(HEIF_LIBS)
+geeqie_LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(INTLLIBS) $(JPEG_LIBS) $(TIFF_LIBS) $(LCMS_LIBS) $(EXIV2_LIBS) $(LIBCHAMPLAIN_LIBS) $(LIBCHAMPLAIN_GTK_LIBS) $(LUA_LIBS) $(CLUTTER_LIBS) $(CLUTTER_GTK_LIBS) $(FFMPEGTHUMBNAILER_LIBS) $(PDF_LIBS) $(HEIF_LIBS) $(WEBP_LIBS)
EXTRA_DIST = \
$(extra_SLIK)
filter_add_if_missing("dds", "DirectDraw Surface", ".dds", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
filter_add_if_missing("pdf", "Portable Document Format", ".pdf", FORMAT_CLASS_PDF, FALSE, FALSE, TRUE);
filter_add_if_missing("HEIF", "HEIF Format", ".heic", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
+ filter_add_if_missing("webp", "WebP Format", ".webp", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
}
GList *filter_to_list(const gchar *extensions)
#include "image_load_heif.h"
#include "image_load_ffmpegthumbnailer.h"
#include "image_load_collection.h"
+#include "image_load_webp.h"
#include "exif.h"
#include "filedata.h"
}
else
#endif
+#ifdef HAVE_WEBP
+ if (il->bytes_total >= 12 &&
+ (memcmp(il->mapped_file, "RIFF", 4) == 0) &&
+ (memcmp(il->mapped_file + 8, "WEBP", 4) == 0))
+ {
+ DEBUG_1("Using custom webp loader");
+ image_loader_backend_set_webp(&il->backend);
+ }
+ else
+#endif
#ifdef HAVE_JPEG
if (il->bytes_total >= 2 && il->mapped_file[0] == 0xff && il->mapped_file[1] == 0xd8)
{
--- /dev/null
+/*
+ * Copyright (C) 20019 - The Geeqie Team
+ *
+ * Author: Colin Clark
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "main.h"
+
+#include "image-load.h"
+#include "image_load_webp.h"
+
+#ifdef HAVE_WEBP
+#include <webp/decode.h>
+
+typedef struct _ImageLoaderWEBP ImageLoaderWEBP;
+struct _ImageLoaderWEBP {
+ ImageLoaderBackendCbAreaUpdated area_updated_cb;
+ ImageLoaderBackendCbSize size_cb;
+ ImageLoaderBackendCbAreaPrepared area_prepared_cb;
+ gpointer data;
+ GdkPixbuf *pixbuf;
+ guint requested_width;
+ guint requested_height;
+ gboolean abort;
+};
+
+static void free_buffer(guchar *pixels, gpointer data)
+{
+ g_free(pixels);
+}
+
+static gboolean image_loader_webp_load(gpointer loader, const guchar *buf, gsize count, GError **error)
+{
+ ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ guint8* data;
+ gint width, height;
+ gboolean res_info;
+ WebPBitstreamFeatures features;
+ VP8StatusCode status_code;
+
+ res_info = WebPGetInfo(buf, count, &width, &height);
+ if (!res_info)
+ {
+ log_printf("warning: webp reader error\n");
+ return FALSE;
+ }
+
+ status_code = WebPGetFeatures(buf, count, &features);
+ if (status_code != VP8_STATUS_OK)
+ {
+ log_printf("warning: webp reader error\n");
+ return FALSE;
+ }
+
+ if (features.has_alpha)
+ {
+ data = WebPDecodeRGBA(buf, count, &width, &height);
+ }
+ else
+ {
+ data = WebPDecodeRGB(buf, count, &width, &height);
+ }
+
+ ld->pixbuf = gdk_pixbuf_new_from_data(data, GDK_COLORSPACE_RGB, features.has_alpha, 8, width, height, width * (features.has_alpha ? 4 : 3), free_buffer, NULL);
+
+ ld->area_updated_cb(loader, 0, 0, width, height, ld->data);
+
+ return TRUE;
+}
+
+static gpointer image_loader_webp_new(ImageLoaderBackendCbAreaUpdated area_updated_cb, ImageLoaderBackendCbSize size_cb, ImageLoaderBackendCbAreaPrepared area_prepared_cb, gpointer data)
+{
+ ImageLoaderWEBP *loader = g_new0(ImageLoaderWEBP, 1);
+ loader->area_updated_cb = area_updated_cb;
+ loader->size_cb = size_cb;
+ loader->area_prepared_cb = area_prepared_cb;
+ loader->data = data;
+ return (gpointer) loader;
+}
+
+static void image_loader_webp_set_size(gpointer loader, int width, int height)
+{
+ ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ ld->requested_width = width;
+ ld->requested_height = height;
+}
+
+static GdkPixbuf* image_loader_webp_get_pixbuf(gpointer loader)
+{
+ ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ return ld->pixbuf;
+}
+
+static gchar* image_loader_webp_get_format_name(gpointer loader)
+{
+ return g_strdup("webp");
+}
+
+static gchar** image_loader_webp_get_format_mime_types(gpointer loader)
+{
+ static gchar *mime[] = {"image/webp", NULL};
+ return g_strdupv(mime);
+}
+
+static gboolean image_loader_webp_close(gpointer loader, GError **error)
+{
+ return TRUE;
+}
+
+static void image_loader_webp_abort(gpointer loader)
+{
+ ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ ld->abort = TRUE;
+}
+
+static void image_loader_webp_free(gpointer loader)
+{
+ ImageLoaderWEBP *ld = (ImageLoaderWEBP *) loader;
+ if (ld->pixbuf) g_object_unref(ld->pixbuf);
+ g_free(ld);
+}
+
+void image_loader_backend_set_webp(ImageLoaderBackend *funcs)
+{
+ funcs->loader_new = image_loader_webp_new;
+ funcs->set_size = image_loader_webp_set_size;
+ funcs->load = image_loader_webp_load;
+ funcs->write = NULL;
+ funcs->get_pixbuf = image_loader_webp_get_pixbuf;
+ funcs->close = image_loader_webp_close;
+ funcs->abort = image_loader_webp_abort;
+ funcs->free = image_loader_webp_free;
+ funcs->get_format_name = image_loader_webp_get_format_name;
+ funcs->get_format_mime_types = image_loader_webp_get_format_mime_types;
+}
+
+#endif
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
--- /dev/null
+/*
+ * Copyright (C) 20019 - The Geeqie Team
+ *
+ * Author: Colin Clark
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef IMAGE_LOAD_WEBP_H
+#define IMAGE_LOAD_WEBP_H
+
+#ifdef HAVE_WEBP
+void image_loader_backend_set_webp(ImageLoaderBackend *funcs);
+#endif
+
+#endif
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
# Optional pixbuf loaders
optional_loaders_array=(
-".webp WebP images"
-"webp"
".psd Photoshop images"
"psd"
".xcf Gimp files"
fi
}
-install_webp()
-{
- rm -rf webp-pixbuf-loader-master
- package_install libglib2.0-dev libgdk-pixbuf2.0-dev libwebp-dev python-minimal
- wget https://github.com/aruiz/webp-pixbuf-loader/archive/master.zip
- unzip master.zip
- cd webp-pixbuf-loader-master
- ./waf configure
- ./waf build
- sudo --askpass ./waf install
- sudo --askpass gdk-pixbuf-query-loaders --update-cache
- cd -
- rm -rf webp-pixbuf-loader-master
- rm master.zip
-}
-
install_psd()
{
rm -rf gdk-pixbuf-psd
while [ $# -gt 0 ];
do
case $1 in
- "webp" )
- install_webp
- ;;
"psd" )
install_psd
;;