aboutsummaryrefslogtreecommitdiff
path: root/fiv-io.h
diff options
context:
space:
mode:
Diffstat (limited to 'fiv-io.h')
-rw-r--r--fiv-io.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/fiv-io.h b/fiv-io.h
index 26e1b93..bc88509 100644
--- a/fiv-io.h
+++ b/fiv-io.h
@@ -31,13 +31,8 @@ typedef struct _FivIoImage FivIoImage;
void fiv_io_cmm_init(void);
// TODO(p): Make it also possible to use Skia's skcms.
+// TODO(p): Profiles might want to keep references to their CMM contexts.
typedef void *FivIoProfile;
-FivIoProfile *fiv_io_profile_new(const void *data, size_t len);
-FivIoProfile *fiv_io_profile_new_from_bytes(GBytes *bytes);
-FivIoProfile *fiv_io_profile_new_sRGB(void);
-FivIoProfile *fiv_io_profile_new_sRGB_gamma(double gamma);
-FivIoProfile *fiv_io_profile_new_parametric(
- double gamma, double whitepoint[2], double primaries[6]);
GBytes *fiv_io_profile_to_bytes(FivIoProfile *profile);
void fiv_io_profile_free(FivIoProfile *self);
@@ -48,7 +43,6 @@ G_DECLARE_FINAL_TYPE(FivIoCmm, fiv_io_cmm, FIV, CMM, GObject)
FivIoCmm *fiv_io_cmm_get_default();
-/*
FivIoProfile *fiv_io_cmm_get_profile(
FivIoCmm *self, const void *data, size_t len);
FivIoProfile *fiv_io_cmm_get_profile_from_bytes(FivIoCmm *self, GBytes *bytes);
@@ -56,7 +50,6 @@ FivIoProfile *fiv_io_cmm_get_profile_sRGB(FivIoCmm *self);
FivIoProfile *fiv_io_cmm_get_profile_sRGB_gamma(FivIoCmm *self, double gamma);
FivIoProfile *fiv_io_cmm_get_profile_parametric(
FivIoCmm *self, double gamma, double whitepoint[2], double primaries[6]);
-*/
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -103,7 +96,8 @@ enum _FivIoOrientation {
// then loaders could store it in their closures.
struct _FivIoRenderClosure {
/// The rendering is allowed to fail, returning NULL.
- FivIoImage *(*render)(FivIoRenderClosure *, FivIoProfile *, double scale);
+ FivIoImage *(*render)(
+ FivIoRenderClosure *, FivIoCmm *, FivIoProfile *, double scale);
void (*destroy)(FivIoRenderClosure *);
};
@@ -174,6 +168,7 @@ cairo_surface_t *fiv_io_image_to_surface_noref(const FivIoImage *image);
typedef struct {
const char *uri; ///< Source URI
+ FivIoCmm *cmm; ///< Colour management module or NULL
FivIoProfile *screen_profile; ///< Target colour space or NULL
int screen_dpi; ///< Target DPI
gboolean enhance; ///< Enhance JPEG (currently)