/* * cmyk.h * * Copyright (C) 2017-2018, D. R. Commander. * For conditions of distribution and use, see the accompanying README.ijg * file. * * This file contains convenience functions for performing quick & dirty * CMYK<->RGB conversion. This algorithm is suitable for testing purposes * only. Properly converting between CMYK and RGB requires a color management * system. */ #ifndef CMYK_H #define CMYK_H #include <jinclude.h> #define JPEG_INTERNALS #include <jpeglib.h> /* Fully reversible */ INLINE LOCAL(void) rgb_to_cmyk(JSAMPLE r, JSAMPLE g, JSAMPLE b, JSAMPLE *c, JSAMPLE *m, JSAMPLE *y, JSAMPLE *k) { … } /* Fully reversible only for C/M/Y/K values generated with rgb_to_cmyk() */ INLINE LOCAL(void) cmyk_to_rgb(JSAMPLE c, JSAMPLE m, JSAMPLE y, JSAMPLE k, JSAMPLE *r, JSAMPLE *g, JSAMPLE *b) { … } #endif /* CMYK_H */