Commit 67271883 authored by Jonas Smedegaard's avatar Jonas Smedegaard

New upstream version 9.21~dfsg

parent ba2f1e2f
# Copyright (C) 2001-2016 Artifex Software, Inc.
# Copyright (C) 2001-2017 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
......@@ -80,6 +80,7 @@ INSTALL_DATA = $(INSTALL) -m 644
INSTALL_SHARED = @INSTALL_SHARED@
prefix = @prefix@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
bindir = @bindir@
scriptdir = $(bindir)
......@@ -89,7 +90,6 @@ mandir = @mandir@
man1ext = 1
man1dir = $(mandir)/man$(man1ext)
datadir = @datadir@
datarootdir = @datarootdir@
# The following must be substituted using @datadir@ and @libdir@
# to avoid adding RPM generation paths (CUPS STR #1112)
......@@ -138,6 +138,7 @@ TARGET_ARCH_FILE=@ARCH_CONF_HEADER@
# are set.
GENOPT=
GENOPTAUX=
# Choose capability options.
......@@ -290,7 +291,7 @@ JBIG2_CFLAGS=@JBIG2_AUTOCONF_CFLAGS@
JPX_LIB=@JPX_DECODER@
SHARE_JPX=@SHARE_JPX@
JPXSRCDIR=@JPXDIR@
JPX_CFLAGS=@JPX_AUTOCONF_CFLAGS@ @JPX_SSE_CFLAGS@
JPX_CFLAGS=-DSHARE_JPX=$(SHARE_JPX) @JPX_AUTOCONF_CFLAGS@ @JPX_SSE_CFLAGS@
# uncomment the following three lines and one of the last two to
# compile in the Luratech lwf_jp2 codec
......@@ -316,12 +317,12 @@ LCMS2_CFLAGS=-DSHARE_LCMS=$(SHARE_LCMS) @LCMS2_ENDIAN@ @SQRTF_SUBST@ @LCMS2_PTR
WHICH_CMS=@WHICHLCMS@
EXPATSRCDIR=@SRCDIR@/expat
EXPAT_CFLAGS=-DHAVE_MEMMOVE
EXPATSRCDIR=@EXPATDIR@
EXPAT_CFLAGS=@EXPAT_CFLAGS@
EXPATGENDIR=$(GLGENDIR)
EXPATOBJDIR=$(GLOBJDIR)
EXPATINCDIR = $(EXPATSRCDIR)$(D)lib
SHARE_EXPAT=0
SHARE_EXPAT=@SHARE_EXPAT@
JPEGXR_SRCDIR=@SRCDIR@/jpegxr
SHARE_JPEGXR=0
......@@ -372,7 +373,7 @@ STRIP_XE_OPTS=
# Define the name of the C compiler (target and host (AUX))
CC=@CC@
CCAUX=@CC@
CCAUX=@CCAUX@
# Define the name of the linker for the final link step.
# Normally this is the same as the C compiler.
......@@ -382,6 +383,7 @@ CCAUXLD=$(CCAUX)
# Define the default gcc flags.
GCFLAGS=@CPPFLAGS@ @GCFLAGS@ @CFLAGS@
GCFLAGSAUX=@GCFLAGSAUX@
# Define the added flags for standard, debugging, profiling
# and shared object builds.
......@@ -391,6 +393,10 @@ CFLAGS_DEBUG=@DBG_CFLAGS@
CFLAGS_PROFILE=-pg @OPT_CFLAGS@
CFLAGS_SO=@DYNAMIC_CFLAGS@
CFLAGSAUX_STANDARD=@CFLAGSAUX_STANDARD@
CFLAGSAUX_DEBUG=@CFLAGSAUX_DEBUG@
CFLAGSAUX_PROFILE=-pg @CFLAGSAUX_STANDARD@
# Define the extra flags added for address sanitizer builds
CFLAGS_SANITIZE=@CFLAGS_SANITIZE@
......@@ -422,6 +428,7 @@ DBUS_LIBS=@DBUS_LIBS@
ACDEFS=@DEFS@
CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(AC_CFLAGS) $(XCFLAGS)
CFLAGSAUX=$(CFLAGSAUX_STANDARD) $(GCFLAGSAUX) $(XCFLAGSAUX)
# Define platform flags for ld.
# SunOS 4.n may need -Bstatic.
......@@ -435,6 +442,8 @@ AC_LDFLAGS=@X_LDFLAGS@
LDFLAGS=@LDFLAGS@ $(AC_LDFLAGS) $(XLDFLAGS)
LDFLAGSAUX=@LDFLAGSAUX@
GS_LDFLAGS=$(LDFLAGS)
PCL_LDFLAGS=$(LDFLAGS)
XPS_LDFLAGS=$(LDFLAGS)
......@@ -450,8 +459,8 @@ XPS_LDFLAGS_SO=@XPS_DYNAMIC_LDFLAGS@
# Solaris may need -lnsl -lsocket -lposix4.
# (Libraries required by individual drivers are handled automatically.)
EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@
AUXEXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @AUX_SHARED_ZLIB@
EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @EXPAT_LIBS@
AUXEXTRALIBS=@AUXEXTRALIBS@
# Define the standard libraries to search at the end of linking.
# Most platforms require -lpthread for the POSIX threads library;
......@@ -536,9 +545,6 @@ FEATURE_DEVS=$(GLD)pipe.dev $(GLD)gsnogc.dev $(GLD)htxlib.dev $(GLD)psl3lib.dev
$(GLD)psf2lib.dev $(GLD)lzwd.dev $(GLD)sicclib.dev \
$(GLD)sjbig2.dev $(GLD)sjpx.dev $(GLD)ramfs.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(GLD)pipe.dev
# The following is strictly for testing.
......@@ -612,7 +618,7 @@ DEVICE_DEVS1=@F_DEVS@
DEVICE_DEVS2=@P_DEVS@
DEVICE_DEVS3=@CUPS_DEVS@
DEVICE_DEVS4=@IJS_DEVS@
DEVICE_DEVS5=@OMNIDEVS@
DEVICE_DEVS5=
DEVICE_DEVS6=@PNG_DEVS@
DEVICE_DEVS7=@JBIG2_DEVS@
DEVICE_DEVS8=
......@@ -654,8 +660,11 @@ AK=
CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS)
CC_=$(CC) $(CCFLAGS)
CCAUX_=$(CCAUX) $(CFLAGS)
CC_LEAF=$(CC_)
CCFLAGSAUX=$(GENOPTAUX) $(CAPOPTAUX) $(CFLAGSAUX)
CCAUX_=$(CCAUX) $(CCFLAGSAUX)
# note gcc can't use -fomit-frame-pointer with -pg.
CC_LEAF_PG=$(CC_)
# These are the specific warnings we have to turn off to compile those
......
......@@ -25,6 +25,13 @@
% ie enclosed in parentheses, not PostScript name type (initial character '/'). See
% gs/doc/Use.htm#CIDFontSubstitution
%
% Alternatively:
% (substituted name) << /FileType /TrueType /Path (path) /SubfontID 1 /CSI [(ordering) supplement] >> ;
%
% This is where the CIDFont name in the document contains a space character. Using a string instead of a name
% allows this work - Ghostscript will internally convert the key string with a space to a name.
%
%
% Examples :
%
% /ShinGo-Bold /HeiseiKakuGo-W5 ;
......@@ -33,3 +40,8 @@
%
% NOTE: getenv returns a boolean to indicate success of or failure, as well as the value on success. In the example, it uses this
% to include a default value should getenv fail.
%
% (Century Gothic) << /FileType /TrueType /Path (/usr/share/fonts/truetype/fonts-japanese-gothic.ttf) /CSI [(Identity) 1] >> ;
%
% Note the use of a string to cope with the name containing a space.
%
......@@ -216,7 +216,7 @@
} bind def
/endrearrangedfont { % - endrearrangedfont -
(REARRANGED FONTS NOT IMPLEMENTED YET.) = flush
FontName .FontNames 0 get findfont end definefont pop
.FontName .FontNames 0 get findfont end definefont pop
} bind def
% ------ Character name/code selector operators ------ %
......
......@@ -29,7 +29,7 @@
% Interpreter library version number
% NOTE: the interpreter code requires that the first non-comment token
% in this file be an integer, and that it match the compiled-in version!
920
921
% Check the interpreter revision.
dup revision ne
......@@ -248,7 +248,7 @@ userdict /=string 256 string put
/printgreeting
{ mark
product (Ghostscript) search
product (GPL Ghostscript) search
{ pop pop pop
(This software comes with NO WARRANTY: see the file PUBLIC for details.\n)
}
......
......@@ -578,6 +578,12 @@ userdict /.pdfcvstring () put
} bind def
/pdfmark { % -mark- <key> <value> ... <markname> pdfmark -
counttomark 0 eq {
/pdfmark /stackunderflow signalerror
} if
dup type /nametype eq not {
/pdfmark /typecheck signalerror
} if
dup /SP eq {
% A hack for synchronizing the clipping path.
gsave
......
......@@ -567,13 +567,23 @@ status {
dup status {
pop pop pop pop exch pop % (scr) (p/c/n)
} {
.libfile {
dup .filename pop % (scr) (p/c/n) file (p/c/n')
exch closefile % (scr) (p/c/n) (p/c/n')
exch pop % (scr) (p/c/n')
} {
pop % (scr) (p/c/n)
exch
.libfile
{//true}
{
pop dup .libfile
{//true}
{//false}
ifelse
} ifelse
{
dup .filename pop
exch closefile
exch pop
}
{pop}
ifelse
} ifelse
exch copy % (p/c/n)
} bind
......
......@@ -1515,7 +1515,11 @@ currentdict /postalias undef
.getpost
.pickcmap
mark
.charkeys
% if we're loading to substitute for TTF in a PDF,
% load the font the "PDF way"
/prebuilt_encoding where
{pop .pdfcharkeys}
{.charkeys} ifelse
.ttkeys
/FontType 42
/PaintType 0
......
......@@ -527,7 +527,21 @@ currentdict /token_nofail_dict .undef
} ifelse
} bind def
/R { % <object#> <generation#> R <object>
/resolveR cvx 3 packedarray cvx
%% Parameter validation; this should not be required but we have found files
%% (Bug 697351) which are corrupted in ways that mean we see a 'R' in a stream
%% even though it is not an indirect object reference. Because a stream
%% may reference objetcs which have not been resolved, we cannot simply
%% 'undef' teh R operator, the only solution is to have it chekc the
%% types of its operands. This is poterntially slow of course, we may
%% need to remove this in future if the performance penalty is too great.
%% We cannot slow down all files significantly purely to work-around
%% files which are invalid.
1 index type /integertype eq 1 index type /integertype eq and {
/resolveR cvx 3 packedarray cvx
} {
( **** Error: indirect object reference \(R\) encountered with invalid arguments.) pdfformaterror
( Output may be incorrect.\n) pdfformaterror
} ifelse
} bind def
% If we encounter an object definition while reading sequentially,
......@@ -652,7 +666,6 @@ currentdict /token_nofail_dict .undef
% Stack: objstreamdict First N objectstream [obj#] [loc]
% bytestring loopindex object#
dup resolved? { % If we already have this object
(yyy) = pstack (yyy) = flush xxx
pop pop % Remove object and object number
1 add 2 index exch get % Get location of next object
6 index add 6 index exch % Form location of next object and get stream
......
This diff is collapsed.
This diff is collapsed.
......@@ -566,6 +566,13 @@ pdfdict begin
% Read the cross-reference and trailer sections.
% I believe the definitions here are only used when parsing the trailer
% dictionary and cross-reference table. So, following on from bug 697351
% we will validate the operands to /R here, because the trailer and xref
% are comparatively small. Note that the bug does not expose a problem
% here, but we probably ought to validate the operands. Of course, if
% they are invalid, the PDF file is probably unreadable anyway.
/traileropdict mark
(<<) cvn { /dictlevelcount dictlevelcount 1 add store mark } bind
(>>) cvn { { .dicttomark } stopped {
......@@ -579,7 +586,14 @@ pdfdict begin
% /true true % see .pdfexectoken in pdf_base.ps
% /false false % ibid.
% /null null % ibid.
/R { /resolveR cvx 3 packedarray cvx } bind % see Objects below
/R {
1 index type /integertype eq 1 index type /integertype eq and {
/resolveR cvx 3 packedarray cvx
} {
( **** Error: indirect object reference \(R\) encountered with invalid arguments.) pdfformaterror
( Output may be incorrect.\n) pdfformaterror
} ifelse
} bind % see Objects below
.dicttomark readonly def
% After reading entry count: skip whitespace, exit on a digit
......@@ -1406,7 +1420,7 @@ currentdict /xref-char-dict undef
} bind def
/pdfformatwarning { % <string> pdfformaterror -
stdoutprint
QUIET not {stdoutprint}{pop}ifelse
/Repaired //true store
PDFSTOPONWARNING {/warning cvx /undefined signalerror} if
} bind def
......@@ -2472,7 +2486,23 @@ currentdict /PDF2PS_matrix_key undef
/Annots knownoget {
{ oforce
dup //null ne {
mark exch {drawannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark
.writepdfmarks
%%
%% We don't want to preserve annotations with ps2write, because we don't convert them
%% back into pdfmarks on output.
%%
/ForOPDFRead /GetDeviceParam .special_op {
exch pop
}{
//false
}ifelse
not
and
//systemdict /PreserveAnnots .knownget not {//true} if and {
mark exch {preserveannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark
}{
mark exch {drawannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark
} ifelse
} {
pop
} ifelse
......@@ -2590,7 +2620,9 @@ currentdict /PDF2PS_matrix_key undef
} if
} if
/Form eq {
dup /Group known {pop pop true exit}{
3 index exch resourceusestransparency { not exit } if
} ifelse
} {
pop
} ifelse
......
......@@ -570,12 +570,23 @@ end def
/OPsavedict 2 dict def % for saveOP, saveBM
% colorspaces that don't require special overprint transparency handling
/okOPcs mark /DeviceGray 0 /DeviceCMYK 1 /DeviceN 2 /Separation 3 .dicttomark def
/checkOPtrans % <fillop|strokeop> checkOPtrans <bool>
% return true if OP needs special transparency treatment
% If the colorspace is not one where overprint makes sense, no special handling (return false)
% NB: This will get replaced with a quick "no-op" if the device doesn't support Overprint
{ % Check OP and BM in case we need to push a group
/stroke ne { FillOverprint } { StrokeOverprint } ifelse
.currentblendmode dup /Normal eq exch /Compatible eq or not and
okOPcs currentcolorspace 0 get dup /Indexed eq {
pop currentcolorspace 1 get % use the base space
} if
known {
/stroke ne { FillOverprint } { StrokeOverprint } ifelse
.currentblendmode dup /Normal eq exch /Compatible eq or not and
} {
pop //false
} ifelse
} bdef
/fsexec % <fillop|strokeop> fsexec -
......@@ -906,7 +917,7 @@ end readonly def
( **** Error: illegal nested BT operator detected.\n)
pdfformaterror
( Output may be incorrect.\n) pdfformaterror
ET
ET_NO_TXT_KO %% Does not push any compositor actions
} if
%% Bug #695897 see the explanation in /q defined above.
......@@ -915,15 +926,12 @@ end readonly def
( **** Error: Illegal nested BT operator (inside a gsave) detected.\n)
pdfformaterror
( Output may be incorrect.\n) pdfformaterror
ET
}if
% If we are in a W/W* "context", pack away the dictionary
% into a temporary place, and pop it off the dict stack
ET_NO_TXT_KO %% Does not push any compositor actions
} if
currentdict /n known {
currentdict end
/.W exch def
} if
currentdict /TextLineMatrix .knownget
{ identmatrix pop TextMatrix identmatrix pop }
{ matrix /TextLineMatrix gput matrix /TextMatrix gput }
......@@ -937,8 +945,17 @@ end readonly def
%% Set the special version of the path constructoin operators, so that
%% they will work as expected if they are illgeally present in a text block.
switch_to_text_marking_ops
%% If needed, let the pdf14 device know we are in a BT condition. This
%% distinguishes BT from an Annotation /FreeText show command which also
%% can come into pdf_text_begin with an opacity not equal to 1.
PDFusingtransparency .currenttextknockout and {
.begintransparencytextgroup
} if
} bdef
/ET {
/ET_NO_TXT_KO {
currentdict /TextSaveMatrix known {
TextRenderingMode 4 ge { .currentfilladjust 0 .setfilladjust clip .setfilladjust} if
newpath TextSaveMatrix setmatrix
......@@ -962,6 +979,15 @@ end readonly def
switch_to_normal_marking_ops
} if
} bdef
/ET {
//ET_NO_TXT_KO exec
% Group push occurred in pdf14_text_begin.
PDFusingtransparency .currenttextknockout and {
.endtransparencytextgroup
} if
} bdef
/Tc { /TextSpacing gput { showfirst } /Show gput } bdef
/TL { /TextLeading gput } bdef
/Tr { dup .settextrenderingmode /TextRenderingMode gput { showfirst } /Show gput } bdef
......
/* Copyright (C) 2001-2012 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact
Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, San Rafael,
CA 94903, U.S.A., +1(415)492-9861, for further information.
*/
/* ---------------- Scalar alignments ---------------- */
#define ARCH_ALIGN_SHORT_MOD @ARCH_ALIGN_SHORT_MOD@
#define ARCH_ALIGN_INT_MOD @ARCH_ALIGN_INT_MOD@
#define ARCH_ALIGN_LONG_MOD @ARCH_ALIGN_LONG_MOD@
#define ARCH_ALIGN_PTR_MOD @ARCH_ALIGN_PTR_MOD@
#define ARCH_ALIGN_FLOAT_MOD @ARCH_ALIGN_FLOAT_MOD@
#define ARCH_ALIGN_DOUBLE_MOD @ARCH_ALIGN_DOUBLE_MOD@
/* ---------------- Scalar sizes ---------------- */
#define ARCH_LOG2_SIZEOF_CHAR @ARCH_LOG2_SIZEOF_CHAR@
#define ARCH_LOG2_SIZEOF_SHORT @ARCH_LOG2_SIZEOF_SHORT@
#define ARCH_LOG2_SIZEOF_INT @ARCH_LOG2_SIZEOF_INT@
#define ARCH_LOG2_SIZEOF_LONG @ARCH_LOG2_SIZEOF_LONG@
#define ARCH_LOG2_SIZEOF_LONG_LONG @ARCH_LOG2_SIZEOF_LONG_LONG@
#define ARCH_LOG2_SIZEOF_PTR @ARCH_LOG2_SIZEOF_PTR@
#define ARCH_LOG2_SIZEOF_FLOAT @ARCH_LOG2_SIZEOF_FLOAT@
#define ARCH_LOG2_SIZEOF_DOUBLE @ARCH_LOG2_SIZEOF_DOUBLE@
#define ARCH_SIZEOF_PTR @ARCH_SIZEOF_PTR@
#define ARCH_SIZEOF_FLOAT @ARCH_SIZEOF_FLOAT@
#define ARCH_SIZEOF_DOUBLE @ARCH_SIZEOF_DOUBLE@
/* ---------------- Unsigned max values ---------------- */
#define ARCH_MAX_UCHAR ((unsigned char)~(unsigned char)0 + (unsigned char)0)
#define ARCH_MAX_USHORT ((unsigned short)~(unsigned short)0 + (unsigned short)0)
#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
/* ---------------- Floating point ---------------- */
#ifndef FLOATS_ARE_IEEE
#if defined(__STDC_IEC_559__) && __STDC_IEC_559__!=0
# define FLOATS_ARE_IEEE 1
#elif (defined(FLT_RADIX) && FLT_RADIX == 2) && (defined(FLT_MANT_DIG) && FLT_MANT_DIG == 24) \
&& (defined(FLT_MIN_EXP) && FLT_MIN_EXP == -125) && (defined(FLT_MAX_EXP) && FLT_MAX_EXP == 128)
# define FLOATS_ARE_IEEE 1
#elif (defined(__FLT_RADIX__) && __FLT_RADIX__ == 2) && (defined(__FLT_MANT_DIG__) && __FLT_MANT_DIG__ == 24) \
&& (defined(__FLT_MIN_EXP__) && __FLT_MIN_EXP__ == -125) && (defined(__FLT_MAX_EXP__) && __FLT_MAX_EXP__ == 128)
# define FLOATS_ARE_IEEE 1
#else
# define FLOATS_ARE_IEEE 0
#endif
#endif /* FLOATS_ARE_IEEE */
#if FLOATS_ARE_IEEE == 1
# define ARCH_FLOATS_ARE_IEEE 1
# define ARCH_FLOAT_MANTISSA_BITS 24
# define ARCH_DOUBLE_MANTISSA_BITS 53
#else /* FLOATS_ARE_IEEE*/
# define ARCH_FLOATS_ARE_IEEE 0
/*
* There isn't any general way to compute the number of mantissa
* bits accurately, especially if the machine uses hex rather
* than binary exponents. Use conservative values, assuming
* the exponent is stored in a 16-bit word of its own.
*/
# define ARCH_FLOAT_MANTISSA_BITS (sizeof(float) * 8 - 17)
# define ARCH_DOUBLE_MANTISSA_BITS (sizeof(double) * 8 - 17)
#endif /* FLOATS_ARE_IEEE*/
/* ---------------- Miscellaneous ---------------- */
#define ARCH_IS_BIG_ENDIAN @ARCH_IS_BIG_ENDIAN@
#define ARCH_PTRS_ARE_SIGNED @ARCH_PTRS_ARE_SIGNED@
#define ARCH_DIV_NEG_POS_TRUNCATES @ARCH_DIV_NEG_POS_TRUNCATES@
#define ARCH_ARITH_RSHIFT @ARCH_ARITH_RSHIFT@
#define ARCH_SIZEOF_GX_COLOR_INDEX @ARCH_SIZEOF_GX_COLOR_INDEX@
......@@ -28,7 +28,7 @@
#define BOBBIN_H
#if BOBBIN
#if defined(BOBBIN) && BOBBIN
#ifdef _WIN32
#include <windows.h>
......
This diff is collapsed.
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h> /* For FILE */
#ifndef restrict
#define restrict __restrict
#endif
#ifndef inline
#define inline __inline
#endif
/* Definitions for source pixel format.
* Reasonable settings are as follows:
* 8-bit: unsigned char ETS_SrcPixel; ETS_SRC_MAX = 255
* 12-bit 0..4095: unsigned short (or int) ETS_SrcPixel; ETS_SRC_MAX = 4095
* 12-bit 0..4096: unsigned short (or int) ETS_SrcPixel; ETS_SRC_MAX = 4096
* 16-bit 0..65535: unsigned short (or int) ETS_SrcPixel; ETS_SRC_MAX = 65535
* 16-bit 0..65536: unsigned int ETS_SrcPixel; ETS_SRC_MAX = 65536
*/
/* A quick and dirty switch for 8 or 16 bit data */
#define CHAR_SOURCE
#ifdef CHAR_SOURCE
typedef unsigned char ETS_SrcPixel;
#define ETS_SRC_MAX 255
#else
typedef unsigned short ETS_SrcPixel;
#define ETS_SRC_MAX 65535
#endif
/* Photoshop (and possibly other image formats define white in a CMYK image with a
value of 255 (65535). This is opposite of the PAM files that Robin has created.
The ETS code expects white to be at 0. Adjustments to the values in gray level
will be baked into the LUT if needed */
typedef enum {
ETS_BLACK_IS_ZERO = 0,
ETS_BLACK_IS_ONE
} ETS_POLARITY;
/* To use the file dump capability:
Open a file as with: fopen ("dumpfile", "wb");
Put the resulting FILE * pointer in params->dump_file.
Set params->dump_level to the desired level. ET_DUMP_ALL dumps all
inputs and outputs. Other values will lead to much smaller files,
but may not be as insightful.
If no dump file is desired, set params->dump_file to NULL.
*/
typedef enum {
ETS_DUMP_MINIMAL,
ETS_DUMP_PARAMS,
ETS_DUMP_LUTS,
ETS_DUMP_INPUT,
ETS_DUMP_ALL
} ETS_DumpLevel;
typedef enum {
ETS_RSTYLE_NONE = 0,
ETS_RSTYLE_THRESHOLD = 1,