aboutsummaryrefslogtreecommitdiffstats
path: root/src/cg-icc.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-08-27 18:09:05 +0200
committerMattias Andrée <maandree@kth.se>2016-08-27 18:09:05 +0200
commitd3191be332877f0bd9d221584bf72db3144364df (patch)
tree8f15da44df12664e1dc13e7a32986178da653c6a /src/cg-icc.c
parentuse static (diff)
downloadcg-tools-d3191be332877f0bd9d221584bf72db3144364df.tar.gz
cg-tools-d3191be332877f0bd9d221584bf72db3144364df.tar.bz2
cg-tools-d3191be332877f0bd9d221584bf72db3144364df.tar.xz
doc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/cg-icc.c')
-rw-r--r--src/cg-icc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cg-icc.c b/src/cg-icc.c
index 76dd0b0..5493f82 100644
--- a/src/cg-icc.c
+++ b/src/cg-icc.c
@@ -220,7 +220,20 @@ static double icc_double(const char* restrict content, size_t width)
}
-static int parse_icc(const char* restrict content, size_t n, libcoopgamma_ramps_t* ramps, signed* depth)
+/**
+ * Parse an ICC profile
+ *
+ * @param content The content of the ICC profile file
+ * @param n The byte-size of `content`
+ * @param ramps Output parameter for the filter stored in the ICC profile,
+ * `.red_size`, `.green_size`, `.blue_size` should already be
+ * set (these values can however be modified.)
+ * @param depth Output parameter for ramps stop value type
+ * @return Zero on success, -1 on error, -2 if no usable data is
+ * available in the profile.
+ */
+static int parse_icc(const char* restrict content, size_t n, libcoopgamma_ramps_t* ramps,
+ libcoopgamma_depth_t* depth)
{
uint32_t i_tag, n_tags;
size_t i, ptr = 0, xptr;