From 22f703cab05b7cd368f4de9e03991b7664dc5022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 1 Sep 2014 13:56:46 +0200 Subject: Initial import of argyll version 1.5.1-8 --- xicc/xdgb.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 xicc/xdgb.c (limited to 'xicc/xdgb.c') diff --git a/xicc/xdgb.c b/xicc/xdgb.c new file mode 100644 index 0000000..80914b8 --- /dev/null +++ b/xicc/xdgb.c @@ -0,0 +1,109 @@ + +/* + * International Color Consortium color transform expanded support + * eXpanded Device Gamut Boundary support. + * + * Author: Graeme W. Gill + * Date: 2008/11/17 + * Version: 1.00 + * + * Copyright 2008 Graeme W. Gill + * All rights reserved. + * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :- + * see the License.txt file for licencing details. + */ + +/* + * This module provides device gamut boundary functionality used to + * locate the non-monotonic device boundary surface, enabling + * fast and accurate PCS gamut boundary plotting as well (for CMYK) + * as allowing the location of device boundary overlaps, so that they + * can be eliminated. This also allows rapid K min/max finding, + * and rapid smoothed K map creation. + */ + +#include +#include +#include +#ifdef __sun +#include +#endif +#include "copyright.h" +#include "aconfig.h" +#include "numlib.h" +#include "icc.h" +#include "rspl.h" +#include "xicc.h" +#include "plot.h" +#include "xdgb.h" +#include "sort.h" + + +/* + * TTBD: + * + */ + +#undef DEBUG /* Verbose debug information */ + +/* - - - - - - - - - - - - - - - - - */ + +/* Diagnostic */ +static void plot_xdgb( +xdgb *p +) { +} + +/* - - - - - - - - - */ + +/* - - - - - - - - - */ +/* create the device surface points. */ +/* return nz on error */ +int xdgb_fit( + struct _xdgb *p, + int flags, /* Flag values */ + int di, /* Input dimensions */ + int fdi /* Output dimensions */ +) { + int i, e, f; + double *b; /* Base of parameters for this section */ + int poff; + + p->flags = flags; + if (flags & XDGB_VERB) + p->verb = 1; + else + p->verb = 0; + p->di = di; + p->fdi = fdi; + +#ifdef DEBUG + printf("xdgbc called with flags = 0x%x, di = %d, fdi = %d\n",flags,di,fdi); +#endif + + return 0; +} + +/* We're done with an xdgb */ +static void xdgb_del(xdgb *p) { + free(p); +} + +/* Create a transform fitting object */ +/* return NULL on error */ +xdgb *new_xdgb( +) { + xdgb *p; + + if ((p = (xdgb *)calloc(1, sizeof(xdgb))) == NULL) { + return NULL; + } + + /* Set method pointers */ + p->del = xdgb_del; + + return p; +} + + + -- cgit v1.2.3