diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-12-22 22:07:49 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-12-24 14:19:22 +0100 |
commit | 40c1f8327e1fdbd48492edd2631ec05c4ade3a8b (patch) | |
tree | 565e4b7ad8fb021399a3fe59de5e0b4922c5c98a /fiv-io.h | |
parent | 6419209c9849238bf638c211875ff006211884eb (diff) | |
download | fiv-40c1f8327e1fdbd48492edd2631ec05c4ade3a8b.tar.gz fiv-40c1f8327e1fdbd48492edd2631ec05c4ade3a8b.tar.xz fiv-40c1f8327e1fdbd48492edd2631ec05c4ade3a8b.zip |
Use Little CMS for JPEG colour management
Diffstat (limited to 'fiv-io.h')
-rw-r--r-- | fiv-io.h | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -21,6 +21,17 @@ #include <gio/gio.h> #include <glib.h> +// --- Colour management ------------------------------------------------------- + +// TODO(p): Make it possible to use Skia's skcms, +// which also supports premultiplied alpha. +typedef void *FivIoProfile; +FivIoProfile fiv_io_profile_new(const void *data, size_t len); +FivIoProfile fiv_io_profile_new_sRGB(void); +void fiv_io_profile_free(FivIoProfile self); + +// --- Loading ----------------------------------------------------------------- + extern const char *fiv_io_supported_media_types[]; char **fiv_io_all_supported_media_types(void); @@ -56,9 +67,9 @@ extern cairo_user_data_key_t fiv_io_key_page_next; extern cairo_user_data_key_t fiv_io_key_page_previous; cairo_surface_t *fiv_io_open( - const gchar *path, gboolean enhance, GError **error); + const gchar *path, FivIoProfile profile, gboolean enhance, GError **error); cairo_surface_t *fiv_io_open_from_data(const char *data, size_t len, - const gchar *path, gboolean enhance, GError **error); + const gchar *path, FivIoProfile profile, gboolean enhance, GError **error); int fiv_io_filecmp(GFile *f1, GFile *f2); |