aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-11-13 09:03:29 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-11-13 09:06:01 +0100
commitd20c6469c0f420ebf16499881b28e2b5539fa248 (patch)
tree1101ba572c2cbf3229bca212a664455e6b9d865c
parentf7c1006053225427aea0828713b9b51546d3b510 (diff)
downloadfiv-d20c6469c0f420ebf16499881b28e2b5539fa248.tar.gz
fiv-d20c6469c0f420ebf16499881b28e2b5539fa248.tar.xz
fiv-d20c6469c0f420ebf16499881b28e2b5539fa248.zip
Clean up
-rw-r--r--fastiv-browser.c2
-rw-r--r--fastiv-io.c9
-rw-r--r--meson.build2
3 files changed, 5 insertions, 8 deletions
diff --git a/fastiv-browser.c b/fastiv-browser.c
index 385096f..2db04ea 100644
--- a/fastiv-browser.c
+++ b/fastiv-browser.c
@@ -501,6 +501,8 @@ fastiv_browser_init(FastivBrowser *self)
self->glow = cairo_image_surface_create(CAIRO_FORMAT_A1, 0, 0);
}
+// NOTE: "It is important to note that when an image with an alpha channel is
+// scaled, linear encoded, pre-multiplied component values must be used!"
static cairo_surface_t *
rescale_thumbnail(cairo_surface_t *thumbnail)
{
diff --git a/fastiv-io.c b/fastiv-io.c
index ab25edd..f5b3b1a 100644
--- a/fastiv-io.c
+++ b/fastiv-io.c
@@ -44,6 +44,9 @@
#define WUFFS_CONFIG__MODULE__ZLIB
#include "wuffs-mirror-release-c/release/c/wuffs-v0.3.c"
+#include <glib/gstdio.h>
+#include <spng.h>
+
#include "xdg.h"
#include "fastiv-io.h"
@@ -592,7 +595,6 @@ fastiv_io_open_from_data(const char *data, size_t len, const gchar *path,
}
#endif // HAVE_GDKPIXBUF ------------------------------------------------------
- // TODO(p): Integrate gdk-pixbuf as a fallback (optional dependency).
set_error(error, "unsupported file type");
}
return surface;
@@ -600,11 +602,6 @@ fastiv_io_open_from_data(const char *data, size_t len, const gchar *path,
// --- Thumbnails --------------------------------------------------------------
-// NOTE: "It is important to note that when an image with an alpha channel is
-// scaled, linear encoded, pre-multiplied component values must be used!"
-#include <glib/gstdio.h>
-#include <spng.h>
-
static int // tri-state
check_spng_thumbnail_texts(struct spng_text *texts, uint32_t texts_len,
const gchar *target, time_t mtime)
diff --git a/meson.build b/meson.build
index 07e87ad..0434cff 100644
--- a/meson.build
+++ b/meson.build
@@ -32,8 +32,6 @@ executable('fastiv', 'fastiv.c', 'fastiv-view.c', 'fastiv-io.c',
install : true,
dependencies : [dependencies])
-# TODO(p): See fastiv_io_open(), consider optionally integrating this.
-gdk_pixbuf = dependency('gdk-pixbuf-2.0', required : false)
if gdk_pixbuf.found()
executable('io-benchmark', 'fastiv-io-benchmark.c', 'fastiv-io.c', 'xdg.c',
build_by_default : false,