diff --git a/packages/php-wasm/compile/Makefile b/packages/php-wasm/compile/Makefile index 905c94aaca..784c6a7fad 100644 --- a/packages/php-wasm/compile/Makefile +++ b/packages/php-wasm/compile/Makefile @@ -100,6 +100,14 @@ libwebp/jspi/dist/root/lib/lib/libwebp.a: base-image libz_jspi docker cp $$(docker create playground-php-wasm:libpng):/root/lib/lib ./libwebp/jspi/dist/root/lib docker cp $$(docker create playground-php-wasm:libpng):/root/lib/include ./libwebp/jspi/dist/root/lib +libimagick_jspi: libimagick/jspi/dist/root/lib/lib/libimagick.a +libimagick/jspi/dist/root/lib/lib/libimagick.a: base-image libz_jspi libpng16_jspi libjpeg_jspi + mkdir -p ./libimagick/jspi/dist/root/lib + docker build -f ./libimagick/Dockerfile -t playground-php-wasm:libimagick . --build-arg JSPI=1 + docker cp $$(docker create playground-php-wasm:libimagick):/root/lib/lib ./libimagick/jspi/dist/root/lib + docker cp $$(docker create playground-php-wasm:libimagick):/root/lib/include ./libimagick/jspi/dist/root/lib + + libxml2_asyncify: libxml2/asyncify/dist/root/lib/lib/libxml2.a libxml2/asyncify/dist/root/lib/lib/libxml2.a: base-image libz_asyncify mkdir -p ./libxml2/asyncify/dist/root/lib @@ -273,7 +281,7 @@ libintl/jspi/dist/root/lib/lib/libintl.a: base-image docker cp $$(docker create playground-php-wasm:libintl):/root/lib/data/. ./libintl/ all: all_jspi all_asyncify -all_jspi: libz_jspi libzip_jspi libpng16_jspi libjpeg_jspi libwebp_jspi libxml2_jspi libopenssl_jspi libsqlite3_jspi libiconv_jspi bison2.7 oniguruma_jspi libcurl_jspi libintl_jspi +all_jspi: libz_jspi libzip_jspi libpng16_jspi libjpeg_jspi libwebp_jspi libxml2_jspi libopenssl_jspi libsqlite3_jspi libiconv_jspi bison2.7 oniguruma_jspi libcurl_jspi libintl_jspi libimagick_jspi all_asyncify: libz_asyncify libzip_asyncify libpng16_asyncify libjpeg_asyncify libwebp_asyncify libxml2_asyncify libopenssl_asyncify libsqlite3_asyncify libiconv_asyncify bison2.7 oniguruma_asyncify libcurl_asyncify libintl_asyncify clean: diff --git a/packages/php-wasm/compile/libimagick/Dockerfile b/packages/php-wasm/compile/libimagick/Dockerfile new file mode 100644 index 0000000000..28de2a5da7 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/Dockerfile @@ -0,0 +1,87 @@ +# Build ImageMagick libraries for WebAssembly (Emscripten) +# - Compiles ImageMagick from official source using emscripten/emsdk +# - Produces static libs (MagickCore, MagickWand) suitable for linking +# - Copies headers and a tiny link-test into /dist + +ARG EMSDK_VERSION=3.1.64 +ARG IMAGEMAGICK_VERSION=7.1.1-34 + +FROM --platform=linux/amd64 emscripten/emsdk:${EMSDK_VERSION} AS build + +SHELL ["/bin/bash", "-lc"] + +ARG IMAGEMAGICK_VERSION +ARG JSPI + +RUN mkdir -p /root/lib/include /root/lib/lib +COPY ./libz/ /root/libz +COPY ./libpng16/ /root/libpng16 +COPY ./libjpeg/ /root/libjpeg + +RUN if [ "$JSPI" = "1" ]; then \ + cp -r /root/*/jspi/dist/root/lib/* /root/lib; \ + else \ + cp -r /root/*/asyncify/dist/root/lib/* /root/lib; \ + fi + +# Install build helpers that aren’t preinstalled in the base image +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates curl xz-utils autoconf automake libtool pkg-config \ + make cmake ninja-build git file python3 \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /src + +# Fetch ImageMagick source from Git (avoid release tarball 404s) +RUN git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick \ + && cd ImageMagick \ + && (git checkout "refs/tags/${IMAGEMAGICK_VERSION}" -b build-ref || git checkout "${IMAGEMAGICK_VERSION}") + +WORKDIR /src/ImageMagick + +# Configure for Emscripten +# Notes: +# - Disable features requiring OS/threads or delegates we won’t provide here. +# - Build static only; these .a archives are LLVM bitcode built by emcc. +# - Use emconfigure/emmake to cross-compile tests correctly. +ENV EMCC_CFLAGS="-O3 -s USE_ZLIB=1 -s USE_LIBPNG=1 -s USE_LIBJPEG=1 -s ALLOW_MEMORY_GROWTH=1" +ENV EMCC_LDFLAGS="-O3 -s USE_ZLIB=1 -s USE_LIBPNG=1 -s USE_LIBJPEG=1 -s ALLOW_MEMORY_GROWTH=1" + +RUN \ + emconfigure ./configure \ + --build i386-pc-linux-gnu \ + --host=wasm32-unknown-emscripten \ + --prefix=/root/lib/ \ + --disable-shared \ + --enable-static \ + --disable-hdri \ + --with-quantum-depth=16 \ + --disable-openmp \ + --without-utilities \ + --without-perl \ + --without-x \ + --with-modules=no \ + --with-threads=no \ + --enable-delegate-build=no \ + --with-png=/root/lib \ + --with-jpeg=/root/lib \ + --with-zlib=/root/lib \ + --with-tiff=no \ + --with-xml=no \ + --with-lcms=no \ + --with-webp=no \ + --with-openjp2=no \ + --with-heic=no \ + --with-freetype=no \ + CFLAGS="${EMCC_CFLAGS}" CXXFLAGS="${EMCC_CFLAGS}" \ + LDFLAGS="${EMCC_LDFLAGS}" LIBS="" + +# Build and install into a staging prefix +RUN emmake make -j"$(nproc)" \ + && emmake make install + +# Prepare dist directory with headers, libs, and a tiny link test +WORKDIR /work +RUN mkdir -p /dist/lib /dist/include /dist/examples + diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++.h new file mode 100644 index 0000000000..7ba39cb644 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++.h @@ -0,0 +1,25 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000 +// +// Copyright @ 2013 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Simplified includes for Magick++. +// Inclusion of this header is sufficient to use all Magick++ APIs. +// +#ifndef MagickPlusPlus_Header +#include +#include +#include +#include +#include +#include + +// Don't leak our definition of the 'restrict' keyword. 'restrict' is a valid +// identifier in C++, and leaking it could cause extraneous build failures. +#ifdef restrict +#undef restrict +#endif +#define MagickPlusPlus_Header +#endif // MagickPlusPlus_Header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Blob.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Blob.h new file mode 100644 index 0000000000..11877dc7f2 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Blob.h @@ -0,0 +1,82 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002 +// +// Copyright @ 2015 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Reference counted container class for Binary Large Objects (BLOBs) +// + +#if !defined(Magick_BlobRef_header) +#define Magick_BlobRef_header + +#include "Magick++/Include.h" +#include + +namespace Magick +{ + // Forward decl + class BlobRef; + + class MagickPPExport Blob + { + public: + + enum Allocator + { + MallocAllocator, + NewAllocator + }; + + // Default constructor + Blob(void); + + // Construct object with data, making a copy of the supplied data. + Blob(const void* data_,const size_t length_); + + // Copy constructor (reference counted) + Blob(const Blob& blob_); + + // Destructor (reference counted) + virtual ~Blob(); + + // Assignment operator (reference counted) + Blob& operator=(const Blob& blob_); + + // Update object contents from Base64-encoded string representation. + void base64(const std::string base64_); + // Return Base64-encoded string representation. + std::string base64(void) const; + + // Obtain pointer to data. The user should never try to modify or + // free this data since the Blob class manages its own data. The + // user must be finished with the data before allowing the Blob to + // be destroyed since the pointer is invalid once the Blob is + // destroyed. + const void* data(void) const; + + // Obtain data length. + size_t length(void) const; + + // Update object contents, making a copy of the supplied data. + // Any existing data in the object is deallocated. + void update(const void* data_,const size_t length_); + + // Update object contents, using supplied pointer directly (no + // copy). Any existing data in the object is deallocated. The user + // must ensure that the pointer supplied is not deleted or + // otherwise modified after it has been supplied to this method. + // Specify allocator_ as "MallocAllocator" if memory is allocated + // via the C language malloc() function, or "NewAllocator" if + // memory is allocated via C++ 'new'. + void updateNoCopy(void* data_,const size_t length_, + const Allocator allocator_=NewAllocator); + + private: + BlobRef *_blobRef; + }; + +} // namespace Magick + +#endif // Magick_BlobRef_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/CoderInfo.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/CoderInfo.h new file mode 100644 index 0000000000..cc65fac550 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/CoderInfo.h @@ -0,0 +1,90 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 2001, 2002 +// +// Copyright @ 2013 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// CoderInfo Definition +// +// Container for image format support information. +// + +#if !defined (Magick_CoderInfo_header) +#define Magick_CoderInfo_header 1 + +#include "Magick++/Include.h" +#include + +namespace Magick +{ + class MagickPPExport CoderInfo + { + public: + + enum MatchType { + AnyMatch, // match any coder + TrueMatch, // match coder if true + FalseMatch // match coder if false + }; + + // Default constructor + CoderInfo(void); + + // Copy constructor + CoderInfo(const CoderInfo &coder_); + + // Construct with coder name + CoderInfo(const std::string &name_); + + // Destructor + ~CoderInfo(void); + + // Assignment operator + CoderInfo& operator=(const CoderInfo &coder_); + + // Format can read multi-threaded + bool canReadMultithreaded(void) const; + + // Format can write multi-threaded + bool canWriteMultithreaded(void) const; + + // Format description + std::string description(void) const; + + // Format supports multiple frames + bool isMultiFrame(void) const; + + // Format is readable + bool isReadable(void) const; + + // Format is writeable + bool isWritable(void) const; + + // Format mime type + std::string mimeType(void) const; + + // Name of the module + std::string module(void) const; + + // Format name + std::string name(void) const; + + // Unregisters this coder + bool unregister(void) const; + + private: + bool _decoderThreadSupport; + std::string _description; + bool _encoderThreadSupport; + bool _isMultiFrame; + bool _isReadable; + bool _isWritable; + std::string _mimeType; + std::string _module; + std::string _name; + }; + +} // namespace Magick + +#endif // Magick_CoderInfo_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Color.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Color.h new file mode 100644 index 0000000000..41f7538ed8 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Color.h @@ -0,0 +1,446 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003, 2008 +// +// Copyright @ 2013 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Color Implementation +// +#if !defined (Magick_Color_header) +#define Magick_Color_header + +#include "Magick++/Include.h" +#include + +namespace Magick +{ + class MagickPPExport Color; + + // Compare two Color objects regardless of LHS/RHS + MagickPPExport int operator == + (const Magick::Color& left_,const Magick::Color& right_); + MagickPPExport int operator != + (const Magick::Color& left_,const Magick::Color& right_); + MagickPPExport int operator > + (const Magick::Color& left_,const Magick::Color& right_); + MagickPPExport int operator < + (const Magick::Color& left_,const Magick::Color& right_); + MagickPPExport int operator >= + (const Magick::Color& left_,const Magick::Color& right_); + MagickPPExport int operator <= + (const Magick::Color& left_,const Magick::Color& right_); + + // Base color class stores RGBA components scaled to fit Quantum + // All double arguments have a valid range of 0.0 - 1.0. + class MagickPPExport Color + { + public: + + // PixelType specifies the interpretation of PixelInfo members + // CMYKPixel: + // Cyan = red + // Magenta = green + // Yellow = blue + // Black(K) = black + // CMYKPixel: + // Cyan = red + // Magenta = green + // Yellow = blue + // Black(K) = black + // Alpha = alpha + // RGBPixel: + // Red = red; + // Green = green; + // Blue = blue; + // RGBAPixel: + // Red = red; + // Green = green; + // Blue = blue; + // Alpha = alpha; + enum PixelType + { + CMYKPixel, + CMYKAPixel, + RGBPixel, + RGBAPixel + }; + + // Default constructor + Color(void); + + // Construct Color using the specified RGB values + Color(const Magick::Quantum red_,const Magick::Quantum green_, + const Magick::Quantum blue_); + + // Construct Color using the specified RGBA values + Color(const Magick::Quantum red_,const Magick::Quantum green_, + const Magick::Quantum blue_,const Magick::Quantum alpha_); + + // Construct Color using the specified CMYKA values + Color(const Magick::Quantum cyan_,const Magick::Quantum magenta_, + const Magick::Quantum yellow_,const Magick::Quantum black_, + const Magick::Quantum alpha_); + + // Construct Color using the specified color string + Color(const char *color_); + + // Copy constructor + Color(const Color &color_); + + // Construct color via ImageMagick PixelInfo + Color(const PixelInfo &color_); + + // Constructor Color using the specified color string + Color(const std::string &color_); + + // Destructor + virtual ~Color(void); + + // Assignment operator + Color& operator=(const Color &color_); + + // Set color via X11 color specification string + const Color& operator=(const char *color); + + // Set color via ImageMagick PixelInfo + const Color& operator=(const PixelInfo &color_); + + // Set color via color specification string + const Color& operator=(const std::string &color); + + // Return ImageMagick PixelInfo + operator PixelInfo() const; + + // Return color specification string + operator std::string() const; + + // Returns true if the distance between the other color is less than the + // specified distance in a linear three(or four) % dimensional color space. + bool isFuzzyEquivalent(const Color &color_,const double fuzz_) const; + + // Does object contain valid color? + void isValid(const bool valid_); + bool isValid(void) const; + + // Returns pixel type of the color + Magick::Color::PixelType pixelType(void) const; + + // Alpha level (range OpaqueAlpha=0 to TransparentAlpha=QuantumRange) + void quantumAlpha(const Quantum alpha_); + Quantum quantumAlpha(void) const; + + // Black color (range 0 to QuantumRange) + void quantumBlack(const Quantum black_); + Quantum quantumBlack(void) const; + + // Blue/Yellow color (range 0 to QuantumRange) + void quantumBlue(const Quantum blue_); + Quantum quantumBlue(void) const; + + // Green/Magenta color (range 0 to QuantumRange) + void quantumGreen(const Quantum green_); + Quantum quantumGreen(void) const; + + // Red/Cyan color (range 0 to QuantumRange) + void quantumRed(const Quantum red_); + Quantum quantumRed(void) const; + + protected: + + // Constructor to construct with PixelInfo* + // Used to point Color at a pixel in an image + Color(PixelInfo *rep_,PixelType pixelType_); + + // Constructor to construct with PixelType + Color(PixelType pixelType_); + + // Set pixel + // Used to point Color at a pixel in an image + void pixel(PixelInfo *rep_,PixelType pixelType_); + + // Scale a value expressed as a double (0-1) to Quantum range (0-QuantumRange) + static Quantum scaleDoubleToQuantum(const double double_); + + // Scale a value expressed as a Quantum (0-QuantumRange) to double range (0-1) + static double scaleQuantumToDouble(const Quantum quantum_); + + // PixelInfo represents a color pixel: + // red = red (range 0 to QuantumRange) + // green = green (range 0 to QuantumRange) + // blue = blue (range 0 to QuantumRange) + // alpha = alpha (range OpaqueAlpha=0 to TransparentAlpha=QuantumRange) + // index = PseudoColor colormap index + PixelInfo *_pixel; + + private: + + bool _isValid; // Set true if pixel is "valid" + bool _pixelOwn; // Set true if we allocated pixel + PixelType _pixelType; // Color type supported by _pixel + + // Common initializer for PixelInfo representation + void initPixel(); + + void setAlpha(const Magick::Quantum alpha_); + + // Sets the pixel type using the specified PixelInfo. + void setPixelType(const PixelInfo &color_); + }; + + class MagickPPExport ColorCMYK: public Color + { + public: + + // Default constructor + ColorCMYK(void); + + // Copy constructor + ColorCMYK(const Color &color_); + + // Construct ColorCMYK using the specified CMYK values + ColorCMYK(const double cyan_,const double magenta_,const double yellow_, + const double black_); + + // Construct ColorCMYK using the specified CMYKA values + ColorCMYK(const double cyan_,const double magenta_,const double yellow_, + const double black_,const double alpha_); + + // Destructor + ~ColorCMYK(void); + + // Assignment operator from base class + ColorCMYK& operator=(const Color& color_); + + // Alpha level (range 0 to 1.0) + void alpha(const double alpha_); + double alpha(void) const; + + // Black/Key color (range 0 to 1.0) + void black(const double black_); + double black(void) const; + + // Black/Key color (range 0.0 to 1.0) + void cyan(const double cyan_); + double cyan(void) const; + + // Magenta color (range 0 to 1.0) + void magenta(const double magenta_); + double magenta(void) const; + + // Yellow color (range 0 to 1.0) + void yellow(const double yellow_); + double yellow(void) const; + + protected: + + // Constructor to construct with PixelInfo* + ColorCMYK(PixelInfo *rep_,PixelType pixelType_); + }; + + // + // Grayscale RGB color + // + // Grayscale is simply RGB with equal parts of red, green, and blue + // All double arguments have a valid range of 0.0 - 1.0. + class MagickPPExport ColorGray: public Color + { + public: + + // Default constructor + ColorGray(void); + + // Copy constructor + ColorGray(const Color &color_); + + // Construct ColorGray using the specified shade + ColorGray(const double shade_); + + // Destructor + ~ColorGray(); + + // Shade + void shade(const double shade_); + double shade(void) const; + + // Assignment operator from base class + ColorGray& operator=(const Color& color_); + + protected: + + // Constructor to construct with PixelInfo* + ColorGray(PixelInfo *rep_,PixelType pixelType_); + }; + + // + // HSL Colorspace colors + // + // All double arguments have a valid range of 0.0 - 1.0. + class MagickPPExport ColorHSL: public Color + { + public: + + // Default constructor + ColorHSL(void); + + // Copy constructor + ColorHSL(const Color &color_); + + // Construct ColorHSL using the specified HSL values + ColorHSL(const double hue_,const double saturation_, + const double lightness_); + + // Destructor + ~ColorHSL(); + + // Assignment operator from base class + ColorHSL& operator=(const Color& color_); + + // Hue color + void hue(const double hue_); + double hue(void) const; + + // Lightness color + void lightness(const double lightness_); + double lightness(void) const; + + // Saturation color + void saturation(const double saturation_); + double saturation(void) const; + + protected: + + // Constructor to construct with PixelInfo* + ColorHSL(PixelInfo *rep_,PixelType pixelType_); + }; + + // + // Monochrome color + // + // Color arguments are constrained to 'false' (black pixel) and 'true' + // (white pixel) + class MagickPPExport ColorMono: public Color + { + public: + + // Default constructor + ColorMono(void); + + // Construct ColorMono (false=black, true=white) + ColorMono(const bool mono_); + + // Copy constructor + ColorMono(const Color &color_); + + // Destructor + ~ColorMono(); + + // Assignment operator from base class + ColorMono& operator=(const Color& color_); + + // Mono color + void mono(const bool mono_); + bool mono(void) const; + + protected: + + // Constructor to construct with PixelInfo* + ColorMono(PixelInfo* rep_,PixelType pixelType_); + }; + + class MagickPPExport ColorRGB: public Color + { + public: + + // Default constructor + ColorRGB(void); + + // Copy constructor + ColorRGB(const Color &color_); + + // Construct ColorRGB using the specified RGB values + ColorRGB(const double red_,const double green_,const double blue_); + + // Construct ColorRGB using the specified RGBA values + ColorRGB(const double red_,const double green_,const double blue_, + const double alpha_); + + // Destructor + ~ColorRGB(void); + + // Assignment operator from base class + ColorRGB& operator=(const Color& color_); + + // Alpha level (range 0 to 1.0) + void alpha(const double alpha_); + double alpha(void) const; + + // Blue color (range 0.0 to 1.0) + void blue(const double blue_); + double blue(void) const; + + // Green color (range 0 to 1.0) + void green(const double green_); + double green(void) const; + + // Red color (range 0 to 1.0) + void red(const double red_); + double red(void) const; + + protected: + + // Constructor to construct with PixelInfo* + ColorRGB(PixelInfo *rep_,PixelType pixelType_); + }; + + // + // YUV Colorspace color + // + // Argument ranges: + // Y: 0.0 through 1.0 + // U: -0.5 through 0.5 + // V: -0.5 through 0.5 + class MagickPPExport ColorYUV: public Color + { + public: + + // Default constructor + ColorYUV(void); + + // Copy constructor + ColorYUV(const Color &color_); + + // Construct ColorYUV using the specified YUV values + ColorYUV(const double y_,const double u_,const double v_); + + // Destructor + ~ColorYUV(void); + + // Assignment operator from base class + ColorYUV& operator=(const Color& color_); + + // Color U (0.0 through 1.0) + void u(const double u_); + double u(void) const; + + // Color V (-0.5 through 0.5) + void v(const double v_); + double v(void) const; + + // Color Y (-0.5 through 0.5) + void y(const double y_); + double y(void) const; + + protected: + + // Constructor to construct with PixelInfo* + ColorYUV(PixelInfo *rep_,PixelType pixelType_); + + private: + + void convert(const double y_,const double u_,const double v_); + + }; +} // namespace Magick + +#endif // Magick_Color_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Drawable.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Drawable.h new file mode 100644 index 0000000000..802adbc358 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Drawable.h @@ -0,0 +1,3140 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002 +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition of Drawable (Graphic objects) +// +// The technique used for instantiating classes which derive from STL +// templates is described in Microsoft MSDN Article ID: Q168958 +// "HOWTO: Exporting STL Components Inside & Outside of a Class". +// "http://support.microsoft.com/kb/168958" +// +// Note that version 3.0 of this article says that only STL +// container template which supports DLL export is and we are +// not using as part of the Drawable implementation. +// + +#if !defined(Magick_Drawable_header) +#define Magick_Drawable_header + +#include "Magick++/Include.h" + +#include +#include +#include +#include +#include "Magick++/Color.h" +#include "Magick++/Geometry.h" + +#if defined(MagickDLLExplicitTemplate) +# if defined(MAGICK_PLUSPLUS_IMPLEMENTATION) +# define MagickDrawableExtern +# else +# pragma warning( disable: 4231 ) // Disable warning regarding using extern +# define MagickDrawableExtern extern +# endif // MAGICK_PLUSPLUS_IMPLEMENTATION +#else +# define MagickDrawableExtern +#endif // MagickDLLExplicitTemplate + +namespace Magick +{ + // + // Representation of an x,y coordinate + // + class MagickPPExport Coordinate + { + public: + + Coordinate(void) + : _x(0), + _y(0) {} + + Coordinate(double x_,double y_) + : _x(x_), + _y(y_) {} + + virtual ~Coordinate() {} + + void x(double x_) { _x=x_; } + double x(void) const { return _x; } + + void y(double y_) { _y=y_; } + double y(void) const { return _y; } + + private: + double _x; + double _y; + }; + + typedef std::vector CoordinateList; + +#if defined(MagickDLLExplicitTemplate) + + MagickDrawableExtern template class MagickPPExport + std::allocator; + +#endif // MagickDLLExplicitTemplate + + // Compare two Coordinate objects regardless of LHS/RHS + extern MagickPPExport int operator == + (const Coordinate& left_,const Coordinate& right_); + extern MagickPPExport int operator != + (const Coordinate& left_, const Coordinate& right_); + extern MagickPPExport int operator > + (const Coordinate& left_, const Coordinate& right_); + extern MagickPPExport int operator < + (const Coordinate& left_, const Coordinate& right_); + extern MagickPPExport int operator >= + (const Coordinate& left_, const Coordinate& right_); + extern MagickPPExport int operator <= + (const Coordinate& left_, const Coordinate& right_); + + // + // Base class for all drawable objects + // + class MagickPPExport DrawableBase + { + public: + + // Default constructor + DrawableBase(void); + + // Destructor + virtual ~DrawableBase(void); + + // Operator to invoke equivalent draw API call + virtual void operator()(MagickCore::DrawingWand *) const; + + // Return polymorphic copy of object + virtual DrawableBase* copy() const; + }; + + // + // Representation of a drawable surrogate object to manage drawable objects + // + #undef Drawable // Conflict with + class MagickPPExport Drawable + { + public: + + // Default constructor + Drawable(void); + + // Construct from DrawableBase + Drawable(const DrawableBase& original_); + + // Destructor + ~Drawable(void); + + // Copy constructor + Drawable(const Drawable& original_); + + // Assignment operator + Drawable& operator=(const Drawable& original_); + + // Operator to invoke contained object + void operator()(MagickCore::DrawingWand *) const; + + private: + DrawableBase* dp; + }; + + typedef std::vector DrawableList; + +#if defined(MagickDLLExplicitTemplate) + + MagickDrawableExtern template class MagickPPExport + std::allocator; + +#endif // MagickDLLExplicitTemplate + +// +// Base class for all drawable path elements for use with +// DrawablePath +// +class MagickPPExport VPathBase +{ +public: + // Constructor + VPathBase ( void ) + { } + + // Destructor + virtual ~VPathBase ( void ); + + // Assignment operator + // const VPathBase& operator= (const VPathBase& original_ ); + + // Operator to invoke equivalent draw API call + virtual void operator()( MagickCore::DrawingWand *context_ ) const = 0; + + // Return polymorphic copy of object + virtual VPathBase* copy() const = 0; +}; + +// +// Representation of a drawable path element surrogate object to +// manage drawable path elements so they may be passed as a list to +// DrawablePath. +// +class MagickPPExport VPath +{ +public: + // Constructor + VPath ( void ); + + // Construct from VPathBase + VPath ( const VPathBase& original_ ); + + // Destructor + virtual ~VPath ( void ); + + // Copy constructor + VPath ( const VPath& original_ ); + + // Assignment operator + VPath& operator= (const VPath& original_ ); + + // Operator to invoke contained object + void operator()( MagickCore::DrawingWand *context_ ) const; + +private: + VPathBase* dp; +}; + +typedef std::vector VPathList; + +#if defined(MagickDLLExplicitTemplate) + +MagickDrawableExtern template class MagickPPExport +std::allocator; + +// MagickDrawableExtern template class MagickPPExport +// std::vector >; + +#endif // MagickDLLExplicitTemplate + +// +// Drawable Objects +// + +// Affine (scaling, rotation, and translation) +class MagickPPExport DrawableAffine : public DrawableBase +{ +public: + DrawableAffine ( double sx_, double sy_, + double rx_, double ry_, + double tx_, double ty_ ); + + DrawableAffine ( void ); + + /*virtual*/ ~DrawableAffine( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ + DrawableBase* copy() const; + + void sx( const double sx_ ) + { + _affine.sx = sx_; + } + double sx( void ) const + { + return _affine.sx; + } + + void sy( const double sy_ ) + { + _affine.sy = sy_; + } + double sy( void ) const + { + return _affine.sy; + } + + void rx( const double rx_ ) + { + _affine.rx = rx_; + } + double rx( void ) const + { + return _affine.rx; + } + + void ry( const double ry_ ) + { + _affine.ry = ry_; + } + double ry( void ) const + { + return _affine.ry; + } + + void tx( const double tx_ ) + { + _affine.tx = tx_; + } + double tx( void ) const + { + return _affine.tx; + } + + void ty( const double ty_ ) + { + _affine.ty = ty_; + } + double ty( void ) const + { + return _affine.ty; + } + +private: + MagickCore::AffineMatrix _affine; +}; + +// Change pixel alpha value to transparent using PaintMethod +class MagickPPExport DrawableAlpha : public DrawableBase +{ +public: + + DrawableAlpha(double x_, double y_,PaintMethod paintMethod_) + : _x(x_), + _y(y_), + _paintMethod(paintMethod_) + { + } + + ~DrawableAlpha(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + void x(double x_) + { + _x=x_; + } + + double x(void) const + { + return(_x); + } + + void y(double y_) + { + _y=y_; + } + + double y(void) const + { + return(_y); + } + + void paintMethod(PaintMethod paintMethod_) + { + _paintMethod=paintMethod_; + } + + PaintMethod paintMethod(void) const + { + return(_paintMethod); + } + + private: + + double _x; + double _y; + PaintMethod _paintMethod; +}; + +// Arc +class MagickPPExport DrawableArc : public DrawableBase +{ +public: + DrawableArc ( double startX_, double startY_, + double endX_, double endY_, + double startDegrees_, double endDegrees_ ) + : _startX(startX_), + _startY(startY_), + _endX(endX_), + _endY(endY_), + _startDegrees(startDegrees_), + _endDegrees(endDegrees_) + { } + + /*virtual*/ ~DrawableArc( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void startX( double startX_ ) + { + _startX = startX_; + } + double startX( void ) const + { + return _startX; + } + + void startY( double startY_ ) + { + _startY = startY_; + } + double startY( void ) const + { + return _startY; + } + + void endX( double endX_ ) + { + _endX = endX_; + } + double endX( void ) const + { + return _endX; + } + + void endY( double endY_ ) + { + _endY = endY_; + } + double endY( void ) const + { + return _endY; + } + + void startDegrees( double startDegrees_ ) + { + _startDegrees = startDegrees_; + } + double startDegrees( void ) const + { + return _startDegrees; + } + + void endDegrees( double endDegrees_ ) + { + _endDegrees = endDegrees_; + } + double endDegrees( void ) const + { + return _endDegrees; + } + +private: + double _startX; + double _startY; + double _endX; + double _endY; + double _startDegrees; + double _endDegrees; +}; + +// Bezier curve (Coordinate list must contain at least three members) +class MagickPPExport DrawableBezier : public DrawableBase +{ +public: + // Construct from coordinates + DrawableBezier ( const CoordinateList &coordinates_ ); + + // Copy constructor + DrawableBezier ( const DrawableBezier& original_ ); + + // Destructor + /*virtual*/ ~DrawableBezier ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + CoordinateList _coordinates; +}; + + // Sets the border color to be used for drawing bordered objects. + class MagickPPExport DrawableBorderColor : public DrawableBase + { + public: + + DrawableBorderColor(const Color &color_); + + DrawableBorderColor(const DrawableBorderColor &original_); + + ~DrawableBorderColor(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + void color(const Color &color_); + Color color(void) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + private: + Color _color; + }; + + // Sets the polygon fill rule to be used by the clipping path. + class MagickPPExport DrawableClipRule : public DrawableBase + { + public: + + DrawableClipRule(const FillRule fillRule_); + + ~DrawableClipRule(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + void fillRule(const FillRule fillRule_); + FillRule fillRule(void) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + private: + FillRule _fillRule; + }; + + // Sets the interpretation of clip path units. + class MagickPPExport DrawableClipUnits : public DrawableBase + { + public: + + DrawableClipUnits(const ClipPathUnits units_); + + ~DrawableClipUnits(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + void units(const ClipPathUnits units_); + ClipPathUnits units(void) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + private: + ClipPathUnits _units; + }; + +// Pop (terminate) clip path definition +class MagickPPExport DrawablePopClipPath : public DrawableBase +{ +public: + DrawablePopClipPath ( void ) + : _dummy(0) + { + } + + /*virtual*/ ~DrawablePopClipPath ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + ::ssize_t _dummy; +}; + +// Push (create) Clip path definition +class MagickPPExport DrawablePushClipPath : public DrawableBase +{ +public: + DrawablePushClipPath ( const std::string &id_); + + DrawablePushClipPath ( const DrawablePushClipPath& original_ ); + + /*virtual*/ ~DrawablePushClipPath ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + std::string _id; +}; + +// Named Clip Path +class MagickPPExport DrawableClipPath : public DrawableBase +{ +public: + DrawableClipPath ( const std::string &id_ ); + DrawableClipPath ( const DrawableClipPath& original_ ); + + /*virtual*/ ~DrawableClipPath ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void clip_path( const std::string &id_ ) + { + _id = id_.c_str(); //multithread safe + } + std::string clip_path( void ) const + { + return _id; + } + +private: + std::string _id; +}; + +// Circle +class MagickPPExport DrawableCircle : public DrawableBase +{ +public: + DrawableCircle ( double originX_, double originY_, + double perimX_, double perimY_ ) + : _originX(originX_), + _originY(originY_), + _perimX(perimX_), + _perimY(perimY_) + { + } + + /*virtual*/ ~DrawableCircle ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void originX( double originX_ ) + { + _originX = originX_; + } + double originX( void ) const + { + return _originX; + } + + void originY( double originY_ ) + { + _originY = originY_; + } + double originY( void ) const + { + return _originY; + } + + void perimX( double perimX_ ) + { + _perimX = perimX_; + } + double perimX( void ) const + { + return _perimX; + } + + void perimY( double perimY_ ) + { + _perimY = perimY_; + } + double perimY( void ) const + { + return _perimY; + } + +private: + double _originX; + double _originY; + double _perimX; + double _perimY; +}; + +// Colorize at point using PaintMethod +class MagickPPExport DrawableColor : public DrawableBase +{ +public: + DrawableColor ( double x_, double y_, + PaintMethod paintMethod_ ) + : _x(x_), + _y(y_), + _paintMethod(paintMethod_) + { } + + /*virtual*/ ~DrawableColor ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + + void paintMethod( PaintMethod paintMethod_ ) + { + _paintMethod = paintMethod_; + } + PaintMethod paintMethod( void ) const + { + return _paintMethod; + } + +private: + double _x; + double _y; + PaintMethod _paintMethod; +}; + +// Draw image at point, scaled to size specified by width and height +class MagickPPExport Image; +class MagickPPExport DrawableCompositeImage : public DrawableBase +{ +public: + DrawableCompositeImage ( double x_, double y_, + const std::string &filename_ ); + + DrawableCompositeImage ( double x_, double y_, + const Image &image_ ); + + DrawableCompositeImage ( double x_, double y_, + double width_, double height_, + const std::string &filename_ ); + + DrawableCompositeImage ( double x_, double y_, + double width_, double height_, + const Image &image_ ); + + DrawableCompositeImage ( double x_, double y_, + double width_, double height_, + const std::string &filename_, + CompositeOperator composition_ ); + + DrawableCompositeImage ( double x_, double y_, + double width_, double height_, + const Image &image_, + CompositeOperator composition_ ); + + // Copy constructor + DrawableCompositeImage ( const DrawableCompositeImage& original_ ); + + // Destructor + /*virtual*/ ~DrawableCompositeImage( void ); + + // Assignment operator + DrawableCompositeImage& operator= + (const DrawableCompositeImage& original_ ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void composition( CompositeOperator composition_ ) + { + _composition = composition_; + } + CompositeOperator composition( void ) const + { + return _composition; + } + + void filename( const std::string &image_ ); + std::string filename( void ) const; + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + + void width( double width_ ) + { + _width = width_; + } + double width( void ) const + { + return _width; + } + + void height( double height_ ) + { + _height = height_; + } + double height( void ) const + { + return _height; + } + + void image( const Image &image_ ); + Magick::Image image( void ) const; + + // Specify image format used to output Base64 inlined image data. + void magick( std::string magick_ ); + std::string magick( void ); + +private: + CompositeOperator _composition; + double _x; + double _y; + double _width; + double _height; + Image* _image; +}; + +// Density +class MagickPPExport DrawableDensity : public DrawableBase +{ +public: + + DrawableDensity(const Point &density_); + + DrawableDensity(const std::string &density_); + + ~DrawableDensity(void); + + void operator()(MagickCore::DrawingWand *context_) const; + + DrawableBase* copy() const; + +private: + std::string _density; +}; + +// Ellipse +class MagickPPExport DrawableEllipse : public DrawableBase +{ +public: + DrawableEllipse ( double originX_, double originY_, + double radiusX_, double radiusY_, + double arcStart_, double arcEnd_ ) + : _originX(originX_), + _originY(originY_), + _radiusX(radiusX_), + _radiusY(radiusY_), + _arcStart(arcStart_), + _arcEnd(arcEnd_) + { } + + /*virtual*/ ~DrawableEllipse( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void originX( double originX_ ) + { + _originX = originX_; + } + double originX( void ) const + { + return _originX; + } + + void originY( double originY_ ) + { + _originY = originY_; + } + double originY( void ) const + { + return _originY; + } + + void radiusX( double radiusX_ ) + { + _radiusX = radiusX_; + } + double radiusX( void ) const + { + return _radiusX; + } + + void radiusY( double radiusY_ ) + { + _radiusY = radiusY_; + } + double radiusY( void ) const + { + return _radiusY; + } + + void arcStart( double arcStart_ ) + { + _arcStart = arcStart_; + } + double arcStart( void ) const + { + return _arcStart; + } + + void arcEnd( double arcEnd_ ) + { + _arcEnd = arcEnd_; + } + double arcEnd( void ) const + { + return _arcEnd; + } + +private: + double _originX; + double _originY; + double _radiusX; + double _radiusY; + double _arcStart; + double _arcEnd; +}; + +// Specify drawing fill color +class MagickPPExport DrawableFillColor : public DrawableBase +{ +public: + DrawableFillColor ( const Color &color_ ); + + DrawableFillColor ( const DrawableFillColor& original_ ); + + /*virtual*/ ~DrawableFillColor( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void color( const Color &color_ ) + { + _color = color_; + } + Color color( void ) const + { + return _color; + } + +private: + Color _color; +}; + + // Sets the URL to use as a fill pattern for filling objects. Only local + // URLs("#identifier") are supported at this time. These local URLs are + // normally created by defining a named fill pattern with + // DrawablePushPattern/DrawablePopPattern. + class MagickPPExport DrawableFillPatternUrl : public DrawableBase + { + public: + + DrawableFillPatternUrl(const std::string &url_); + + ~DrawableFillPatternUrl(void); + + DrawableFillPatternUrl(const DrawableFillPatternUrl& original_); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + void url(const std::string &url_); + std::string url(void) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + private: + std::string _url; + }; + +// Specify fill rule (fill-rule) +class MagickPPExport DrawableFillRule : public DrawableBase +{ +public: + DrawableFillRule ( const FillRule fillRule_ ) + : _fillRule(fillRule_) + { + } + + /*virtual*/ ~DrawableFillRule ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void fillRule( const FillRule fillRule_ ) + { + _fillRule = fillRule_; + } + FillRule fillRule( void ) const + { + return _fillRule; + } + +private: + FillRule _fillRule; +}; + +// Specify drawing fill alpha +class MagickPPExport DrawableFillOpacity : public DrawableBase +{ +public: + + DrawableFillOpacity(double opacity_) + : _opacity(opacity_) + { + } + + ~DrawableFillOpacity ( void ); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + void opacity(double opacity_) + { + _opacity=opacity_; + } + + double opacity(void) const + { + return(_opacity); + } + +private: + double _opacity; +}; + +// Specify text font +class MagickPPExport DrawableFont : public DrawableBase +{ +public: + DrawableFont ( const std::string &font_ ); + + DrawableFont ( const std::string &family_, + StyleType style_, + const unsigned int weight_, + StretchType stretch_ ); + DrawableFont ( const DrawableFont& original_ ); + + /*virtual*/ ~DrawableFont ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void font( const std::string &font_ ) + { + _font = font_; + } + std::string font( void ) const + { + return _font; + } + +private: + std::string _font; + std::string _family; + StyleType _style; + unsigned int _weight; + StretchType _stretch; +}; + +// Specify text positioning gravity +class MagickPPExport DrawableGravity : public DrawableBase +{ +public: + DrawableGravity ( GravityType gravity_ ) + : _gravity(gravity_) + { + } + + /*virtual*/ ~DrawableGravity ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void gravity( GravityType gravity_ ) + { + _gravity = gravity_; + } + GravityType gravity( void ) const + { + return _gravity; + } + +private: + GravityType _gravity; +}; + +// Line +class MagickPPExport DrawableLine : public DrawableBase +{ +public: + DrawableLine ( double startX_, double startY_, + double endX_, double endY_ ) + : _startX(startX_), + _startY(startY_), + _endX(endX_), + _endY(endY_) + { } + + /*virtual*/ ~DrawableLine ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void startX( double startX_ ) + { + _startX = startX_; + } + double startX( void ) const + { + return _startX; + } + + void startY( double startY_ ) + { + _startY = startY_; + } + double startY( void ) const + { + return _startY; + } + + void endX( double endX_ ) + { + _endX = endX_; + } + double endX( void ) const + { + return _endX; + } + + void endY( double endY_ ) + { + _endY = endY_; + } + double endY( void ) const + { + return _endY; + } + +private: + double _startX; + double _startY; + double _endX; + double _endY; +}; + +// Drawable Path +class MagickPPExport DrawablePath : public DrawableBase +{ +public: + DrawablePath ( const VPathList &path_ ); + + DrawablePath ( const DrawablePath& original_ ); + + /*virtual*/ ~DrawablePath ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + VPathList _path; +}; + +// Point +class MagickPPExport DrawablePoint : public DrawableBase +{ +public: + DrawablePoint ( double x_, double y_ ) + : _x(x_), + _y(y_) + { } + + /*virtual*/ ~DrawablePoint ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + +private: + double _x; + double _y; +}; + +// Text pointsize +class MagickPPExport DrawablePointSize : public DrawableBase +{ +public: + DrawablePointSize ( double pointSize_ ) + : _pointSize(pointSize_) + { } + + /*virtual*/ ~DrawablePointSize ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void pointSize( double pointSize_ ) + { + _pointSize = pointSize_; + } + double pointSize( void ) const + { + return _pointSize; + } + +private: + double _pointSize; +}; + +// Polygon (Coordinate list must contain at least three members) +class MagickPPExport DrawablePolygon : public DrawableBase +{ +public: + DrawablePolygon ( const CoordinateList &coordinates_ ); + + DrawablePolygon ( const DrawablePolygon& original_ ); + + /*virtual*/ ~DrawablePolygon ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + CoordinateList _coordinates; +}; + +// Polyline (Coordinate list must contain at least three members) +class MagickPPExport DrawablePolyline : public DrawableBase +{ +public: + DrawablePolyline ( const CoordinateList &coordinates_ ); + + DrawablePolyline ( const DrawablePolyline& original_ ); + + /*virtual*/ ~DrawablePolyline ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + CoordinateList _coordinates; +}; + +// Pop Graphic Context +class MagickPPExport DrawablePopGraphicContext : public DrawableBase +{ +public: + DrawablePopGraphicContext ( void ) + : _dummy(0) + { + } + + /*virtual*/ ~DrawablePopGraphicContext ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + ::ssize_t _dummy; +}; + +// Push Graphic Context +class MagickPPExport DrawablePushGraphicContext : public DrawableBase +{ +public: + DrawablePushGraphicContext ( void ) + : _dummy(0) + { + } + + /*virtual*/ ~DrawablePushGraphicContext ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + ::ssize_t _dummy; +}; + +// Pop (terminate) Pattern definition +class MagickPPExport DrawablePopPattern : public DrawableBase +{ +public: + DrawablePopPattern ( void ) + : _dummy(0) + { + } + + /*virtual*/ ~DrawablePopPattern ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + ::ssize_t _dummy; +}; + +// Push (create) Pattern definition +class MagickPPExport DrawablePushPattern : public DrawableBase +{ +public: + DrawablePushPattern ( const std::string &id_, ::ssize_t x_, ::ssize_t y_, + size_t width_, size_t height_ ); + + DrawablePushPattern ( const DrawablePushPattern& original_ ); + + /*virtual*/ ~DrawablePushPattern ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +private: + std::string _id; + ::ssize_t _x; + ::ssize_t _y; + size_t _width; + size_t _height; +}; + +// Rectangle +class MagickPPExport DrawableRectangle : public DrawableBase +{ +public: + DrawableRectangle ( double upperLeftX_, double upperLeftY_, + double lowerRightX_, double lowerRightY_ ) + : _upperLeftX(upperLeftX_), + _upperLeftY(upperLeftY_), + _lowerRightX(lowerRightX_), + _lowerRightY(lowerRightY_) + { } + + /*virtual*/ ~DrawableRectangle ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void upperLeftX( double upperLeftX_ ) + { + _upperLeftX = upperLeftX_; + } + double upperLeftX( void ) const + { + return _upperLeftX; + } + + void upperLeftY( double upperLeftY_ ) + { + _upperLeftY = upperLeftY_; + } + double upperLeftY( void ) const + { + return _upperLeftY; + } + + void lowerRightX( double lowerRightX_ ) + { + _lowerRightX = lowerRightX_; + } + double lowerRightX( void ) const + { + return _lowerRightX; + } + + void lowerRightY( double lowerRightY_ ) + { + _lowerRightY = lowerRightY_; + } + double lowerRightY( void ) const + { + return _lowerRightY; + } + +private: + double _upperLeftX; + double _upperLeftY; + double _lowerRightX; + double _lowerRightY; +}; + +// Apply Rotation +class MagickPPExport DrawableRotation : public DrawableBase +{ +public: + DrawableRotation ( double angle_ ) + : _angle( angle_ ) + { } + + /*virtual*/ ~DrawableRotation ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void angle( double angle_ ) + { + _angle = angle_; + } + double angle( void ) const + { + return _angle; + } + +private: + double _angle; +}; + +// Round Rectangle +class MagickPPExport DrawableRoundRectangle : public DrawableBase +{ +public: + DrawableRoundRectangle ( double upperLeftX_, double upperLeftY_, + double lowerRightX_, double lowerRightY_, + double cornerWidth_, double cornerHeight_ ) + : _upperLeftX(upperLeftX_), + _upperLeftY(upperLeftY_), + _lowerRightX(lowerRightX_), + _lowerRightY(lowerRightY_), + _cornerWidth(cornerWidth_), + _cornerHeight(cornerHeight_) + { } + + /*virtual*/ ~DrawableRoundRectangle ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + + void centerX( double centerX_ ) + { + _upperLeftX = centerX_; + } + double centerX( void ) const + { + return _upperLeftX; + } + + void centerY( double centerY_ ) + { + _upperLeftY = centerY_; + } + double centerY( void ) const + { + return _upperLeftY; + } + + void width( double width_ ) + { + _lowerRightX = width_; + } + double width( void ) const + { + return _lowerRightX; + } + + void hight( double hight_ ) + { + _lowerRightY = hight_; + } + double hight( void ) const + { + return _lowerRightY; + } + +#endif + + void upperLeftX( double upperLeftX_ ) + { + _upperLeftX = upperLeftX_; + } + double upperLeftX( void ) const + { + return _upperLeftX; + } + + void upperLeftY( double upperLeftY_ ) + { + _upperLeftY = upperLeftY_; + } + double upperLeftY( void ) const + { + return _upperLeftY; + } + + void lowerRightX( double lowerRightX_ ) + { + _lowerRightX = lowerRightX_; + } + double lowerRightX( void ) const + { + return _lowerRightX; + } + + void lowerRightY( double lowerRightY_ ) + { + _lowerRightY = lowerRightY_; + } + double lowerRightY( void ) const + { + return _lowerRightY; + } + + void cornerWidth( double cornerWidth_ ) + { + _cornerWidth = cornerWidth_; + } + double cornerWidth( void ) const + { + return _cornerWidth; + } + + void cornerHeight( double cornerHeight_ ) + { + _cornerHeight = cornerHeight_; + } + double cornerHeight( void ) const + { + return _cornerHeight; + } + +private: + double _upperLeftX; + double _upperLeftY; + double _lowerRightX; + double _lowerRightY; + double _cornerWidth; + double _cornerHeight; +}; + +// Apply Scaling +class MagickPPExport DrawableScaling : public DrawableBase +{ +public: + DrawableScaling ( double x_, double y_ ) + : _x(x_), + _y(y_) + { } + + /*virtual*/ ~DrawableScaling ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + +private: + double _x; + double _y; +}; + +// Apply Skew in X direction +class MagickPPExport DrawableSkewX : public DrawableBase +{ +public: + DrawableSkewX ( double angle_ ) + : _angle(angle_) + { } + + /*virtual*/ ~DrawableSkewX ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void angle( double angle_ ) + { + _angle = angle_; + } + double angle( void ) const + { + return _angle; + } + +private: + double _angle; +}; + +// Apply Skew in Y direction +class MagickPPExport DrawableSkewY : public DrawableBase +{ +public: + DrawableSkewY ( double angle_ ) + : _angle(angle_) + { } + + /*virtual*/ ~DrawableSkewY ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void angle( double angle_ ) + { + _angle = angle_; + } + double angle( void ) const + { + return _angle; + } + +private: + double _angle; +}; + + // Stroke dasharray + // + // dasharray_ is an allocated array terminated by value 0.0 or 0. + // The array is copied so the original does not need to be preserved. + // Pass a null pointer to clear an existing dash array setting. + class MagickPPExport DrawableStrokeDashArray : public DrawableBase + { + public: + + DrawableStrokeDashArray(const double* dasharray_); + + DrawableStrokeDashArray(const Magick::DrawableStrokeDashArray &original_); + + ~DrawableStrokeDashArray(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + void dasharray(const double* dasharray_); + const double* dasharray(void) const; + + DrawableStrokeDashArray& operator=( + const Magick::DrawableStrokeDashArray &original_); + + private: + size_t _size; + double *_dasharray; + }; + + // Stroke dashoffset + class MagickPPExport DrawableStrokeDashOffset : public DrawableBase + { + public: + DrawableStrokeDashOffset(const double offset_) + : _offset(offset_) + { } + + ~DrawableStrokeDashOffset(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + void offset(const double offset_); + double offset(void) const; + + private: + double _offset; + }; + +// Stroke linecap +class MagickPPExport DrawableStrokeLineCap : public DrawableBase +{ +public: + DrawableStrokeLineCap ( LineCap linecap_ ) + : _linecap(linecap_) + { } + + /*virtual*/ ~DrawableStrokeLineCap ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void linecap( LineCap linecap_ ) + { + _linecap = linecap_; + } + LineCap linecap( void ) const + { + return _linecap; + } + +private: + LineCap _linecap; +}; + +// Stroke linejoin +class MagickPPExport DrawableStrokeLineJoin : public DrawableBase +{ +public: + DrawableStrokeLineJoin ( LineJoin linejoin_ ) + : _linejoin(linejoin_) + { } + + /*virtual*/ ~DrawableStrokeLineJoin ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void linejoin( LineJoin linejoin_ ) + { + _linejoin = linejoin_; + } + LineJoin linejoin( void ) const + { + return _linejoin; + } + +private: + LineJoin _linejoin; +}; + +// Stroke miterlimit +class MagickPPExport DrawableMiterLimit : public DrawableBase +{ +public: + DrawableMiterLimit ( size_t miterlimit_ ) + : _miterlimit(miterlimit_) + { } + + /*virtual*/ ~DrawableMiterLimit ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void miterlimit( size_t miterlimit_ ) + { + _miterlimit = miterlimit_; + } + size_t miterlimit( void ) const + { + return _miterlimit; + } + +private: + size_t _miterlimit; +}; + +// Sets the pattern used for stroking object outlines. +class MagickPPExport DrawableStrokePatternUrl : public DrawableBase +{ +public: + + DrawableStrokePatternUrl(const std::string &url_); + + ~DrawableStrokePatternUrl(void); + + DrawableStrokePatternUrl(const DrawableStrokePatternUrl& original_); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + void url(const std::string &url_); + std::string url(void) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + +private: + std::string _url; +}; + +// Stroke antialias +class MagickPPExport DrawableStrokeAntialias : public DrawableBase +{ +public: + DrawableStrokeAntialias ( bool flag_ ) + : _flag(flag_) + { } + + /*virtual*/ ~DrawableStrokeAntialias ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void flag( bool flag_ ) + { + _flag = flag_; + } + bool flag( void ) const + { + return _flag; + } + +private: + bool _flag; +}; + +// Stroke color +class MagickPPExport DrawableStrokeColor : public DrawableBase +{ +public: + DrawableStrokeColor ( const Color &color_ ); + + DrawableStrokeColor ( const DrawableStrokeColor& original_ ); + + /*virtual*/ ~DrawableStrokeColor ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void color( const Color& color_ ) + { + _color = color_; + } + Color color( void ) const + { + return _color; + } + +private: + Color _color; +}; + +// Stroke opacity +class MagickPPExport DrawableStrokeOpacity : public DrawableBase +{ +public: + + DrawableStrokeOpacity(double opacity_) + : _opacity(opacity_) + { + } + + ~DrawableStrokeOpacity(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + + void opacity(double opacity_) + { + _opacity=opacity_; + } + + double opacity(void) const + { + return(_opacity); + } + +private: + double _opacity; +}; + +// Stroke width +class MagickPPExport DrawableStrokeWidth : public DrawableBase +{ +public: + DrawableStrokeWidth ( double width_ ) + : _width(width_) + { } + + /*virtual*/ ~DrawableStrokeWidth ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void width( double width_ ) + { + _width = width_; + } + double width( void ) const + { + return _width; + } + +private: + double _width; +}; + +// Draw text at point +class MagickPPExport DrawableText : public DrawableBase +{ +public: + DrawableText ( const double x_, const double y_, + const std::string &text_ ); + DrawableText ( const double x_, const double y_, + const std::string &text_, const std::string &encoding_); + + DrawableText ( const DrawableText& original_ ); + + /*virtual*/ ~DrawableText ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void encoding(const std::string &encoding_) + { + _encoding = encoding_; + } + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + + void text( const std::string &text_ ) + { + _text = text_; + } + std::string text( void ) const + { + return _text; + } + +private: + double _x; + double _y; + std::string _text; + std::string _encoding; +}; + +// Text alignment +class MagickPPExport DrawableTextAlignment : public DrawableBase +{ +public: + + DrawableTextAlignment(AlignType alignment_); + + DrawableTextAlignment(const DrawableTextAlignment& original_); + + ~DrawableTextAlignment(void); + + // Operator to invoke equivalent draw API call + void operator()(MagickCore::DrawingWand *context_) const; + + void alignment(AlignType alignment_); + AlignType alignment(void) const; + + // Return polymorphic copy of object + DrawableBase* copy() const; + +private: + AlignType _alignment; +}; + +// Text antialias +class MagickPPExport DrawableTextAntialias : public DrawableBase +{ +public: + DrawableTextAntialias ( bool flag_ ); + + DrawableTextAntialias( const DrawableTextAntialias &original_ ); + + /*virtual*/ ~DrawableTextAntialias ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void flag( bool flag_ ) + { + _flag = flag_; + } + bool flag( void ) const + { + return _flag; + } + +private: + bool _flag; +}; + +// Decoration (text decoration) +class MagickPPExport DrawableTextDecoration : public DrawableBase +{ +public: + DrawableTextDecoration ( DecorationType decoration_ ); + + DrawableTextDecoration ( const DrawableTextDecoration& original_ ); + + /*virtual*/ ~DrawableTextDecoration( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void decoration( DecorationType decoration_ ) + { + _decoration = decoration_; + } + DecorationType decoration( void ) const + { + return _decoration; + } + +private: + DecorationType _decoration; +}; + + // Render text right-to-left or left-to-right. + class MagickPPExport DrawableTextDirection : public DrawableBase + { + public: + + DrawableTextDirection(DirectionType direction_); + + ~DrawableTextDirection(void); + + void operator()(MagickCore::DrawingWand *context_) const; + + void direction(DirectionType direction_); + DirectionType direction(void) const; + + DrawableBase* copy() const; + + private: + DirectionType _direction; + }; + + // Specify text inter-line spacing + class MagickPPExport DrawableTextInterlineSpacing : public DrawableBase + { + public: + + DrawableTextInterlineSpacing(double spacing_); + + ~DrawableTextInterlineSpacing(void); + + void operator()(MagickCore::DrawingWand *context_) const; + + void spacing(double spacing_); + double spacing(void) const; + + DrawableBase* copy() const; + + private: + double _spacing; + }; + + // Specify text inter-word spacing + class MagickPPExport DrawableTextInterwordSpacing : public DrawableBase + { + public: + + DrawableTextInterwordSpacing(double spacing_); + + ~DrawableTextInterwordSpacing(void); + + void operator()(MagickCore::DrawingWand *context_) const; + + void spacing(double spacing_); + double spacing(void) const; + + DrawableBase *copy() const; + + private: + double _spacing; + }; + + // Specify text kerning + class MagickPPExport DrawableTextKerning : public DrawableBase + { + public: + + DrawableTextKerning(double kerning_); + + ~DrawableTextKerning(void); + + void operator()(MagickCore::DrawingWand *context_) const; + + void kerning(double kerning_); + double kerning(void) const; + + DrawableBase *copy() const; + + private: + double _kerning; + }; + +// Text undercolor box +class MagickPPExport DrawableTextUnderColor : public DrawableBase +{ +public: + DrawableTextUnderColor ( const Color &color_ ); + + DrawableTextUnderColor ( const DrawableTextUnderColor& original_ ); + + /*virtual*/ ~DrawableTextUnderColor ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void color( const Color& color_ ) + { + _color = color_; + } + Color color( void ) const + { + return _color; + } + +private: + Color _color; +}; + +// Apply Translation +class MagickPPExport DrawableTranslation : public DrawableBase +{ +public: + DrawableTranslation ( double x_, double y_ ) + : _x(x_), + _y(y_) + { } + + /*virtual*/ ~DrawableTranslation ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ DrawableBase* copy() const; + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + +private: + double _x; + double _y; +}; + +// Set the size of the viewbox +class MagickPPExport DrawableViewbox : public DrawableBase +{ +public: + DrawableViewbox(::ssize_t x1_, ::ssize_t y1_, + ::ssize_t x2_, ::ssize_t y2_) + : _x1(x1_), + _y1(y1_), + _x2(x2_), + _y2(y2_) { } + + /*virtual*/ ~DrawableViewbox ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ + DrawableBase* copy() const; + + void x1( ::ssize_t x1_ ) + { + _x1 = x1_; + } + ::ssize_t x1( void ) const + { + return _x1; + } + + void y1( ::ssize_t y1_ ) + { + _y1 = y1_; + } + ::ssize_t y1( void ) const + { + return _y1; + } + + void x2( ::ssize_t x2_ ) + { + _x2 = x2_; + } + ::ssize_t x2( void ) const + { + return _x2; + } + + void y2( ::ssize_t y2_ ) + { + _y2 = y2_; + } + ::ssize_t y2( void ) const + { + return _y2; + } + +private: + ::ssize_t _x1; + ::ssize_t _y1; + ::ssize_t _x2; + ::ssize_t _y2; +}; + +// +// Path Element Classes To Support DrawablePath +// +class MagickPPExport PathArcArgs +{ +public: + PathArcArgs( void ); + + PathArcArgs( double radiusX_, double radiusY_, + double xAxisRotation_, bool largeArcFlag_, + bool sweepFlag_, double x_, double y_ ); + + PathArcArgs( const PathArcArgs &original_ ); + + ~PathArcArgs ( void ); + + void radiusX( double radiusX_ ) + { + _radiusX = radiusX_; + } + double radiusX( void ) const + { + return _radiusX; + } + + void radiusY( double radiusY_ ) + { + _radiusY = radiusY_; + } + double radiusY( void ) const + { + return _radiusY; + } + + void xAxisRotation( double xAxisRotation_ ) + { + _xAxisRotation = xAxisRotation_; + } + double xAxisRotation( void ) const + { + return _xAxisRotation; + } + + void largeArcFlag( bool largeArcFlag_ ) + { + _largeArcFlag = largeArcFlag_; + } + bool largeArcFlag( void ) const + { + return _largeArcFlag; + } + + void sweepFlag( bool sweepFlag_ ) + { + _sweepFlag = sweepFlag_; + } + bool sweepFlag( void ) const + { + return _sweepFlag; + } + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + +private: + double _radiusX; // X radius + double _radiusY; // Y radius + double _xAxisRotation; // Rotation relative to X axis + bool _largeArcFlag; // Draw longer of the two matching arcs + bool _sweepFlag; // Draw arc matching clock-wise rotation + double _x; // End-point X + double _y; // End-point Y +}; + +// Compare two PathArcArgs objects regardless of LHS/RHS +extern MagickPPExport int operator == ( const PathArcArgs& left_, + const PathArcArgs& right_ ); +extern MagickPPExport int operator != ( const PathArcArgs& left_, + const PathArcArgs& right_ ); +extern MagickPPExport int operator > ( const PathArcArgs& left_, + const PathArcArgs& right_ ); +extern MagickPPExport int operator < ( const PathArcArgs& left_, + const PathArcArgs& right_ ); +extern MagickPPExport int operator >= ( const PathArcArgs& left_, + const PathArcArgs& right_ ); +extern MagickPPExport int operator <= ( const PathArcArgs& left_, + const PathArcArgs& right_ ); + +typedef std::vector PathArcArgsList; + +#if defined(MagickDLLExplicitTemplate) + +MagickDrawableExtern template class MagickPPExport +std::allocator; + +// MagickDrawableExtern template class MagickPPExport +// std::vector >; + +#endif // MagickDLLExplicitTemplate + +// Path Arc (Elliptical Arc) +class MagickPPExport PathArcAbs : public VPathBase +{ +public: + // Draw a single arc segment + PathArcAbs ( const PathArcArgs &coordinates_ ); + + // Draw multiple arc segments + PathArcAbs ( const PathArcArgsList &coordinates_ ); + + // Copy constructor + PathArcAbs ( const PathArcAbs& original_ ); + + // Destructor + /*virtual*/ ~PathArcAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + PathArcArgsList _coordinates; +}; +class MagickPPExport PathArcRel : public VPathBase +{ +public: + // Draw a single arc segment + PathArcRel ( const PathArcArgs &coordinates_ ); + + // Draw multiple arc segments + PathArcRel ( const PathArcArgsList &coordinates_ ); + + PathArcRel ( const PathArcRel& original_ ); + + /*virtual*/ ~PathArcRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + PathArcArgsList _coordinates; +}; + +// Path Closepath +class MagickPPExport PathClosePath : public VPathBase +{ +public: + PathClosePath ( void ) + : _dummy(0) + { + } + + /*virtual*/ ~PathClosePath ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + ::ssize_t _dummy; +}; + +// +// Curveto (Cubic Bezier) +// +class MagickPPExport PathCurvetoArgs +{ +public: + PathCurvetoArgs( void ); + + PathCurvetoArgs( double x1_, double y1_, + double x2_, double y2_, + double x_, double y_ ); + + PathCurvetoArgs( const PathCurvetoArgs &original_ ); + + ~PathCurvetoArgs ( void ); + + void x1( double x1_ ) + { + _x1 = x1_; + } +double x1( void ) const +{ + return _x1; +} + +void y1( double y1_ ) +{ + _y1 = y1_; +} +double y1( void ) const +{ + return _y1; +} + +void x2( double x2_ ) +{ + _x2 = x2_; +} +double x2( void ) const +{ + return _x2; +} + +void y2( double y2_ ) +{ + _y2 = y2_; +} +double y2( void ) const +{ + return _y2; +} + +void x( double x_ ) +{ + _x = x_; +} +double x( void ) const +{ + return _x; +} + +void y( double y_ ) +{ + _y = y_; +} +double y( void ) const +{ + return _y; +} + +private: +double _x1; +double _y1; +double _x2; +double _y2; +double _x; +double _y; +}; + +// Compare two PathCurvetoArgs objects regardless of LHS/RHS +extern MagickPPExport int operator == ( const PathCurvetoArgs& left_, + const PathCurvetoArgs& right_ ); +extern MagickPPExport int operator != ( const PathCurvetoArgs& left_, + const PathCurvetoArgs& right_ ); +extern MagickPPExport int operator > ( const PathCurvetoArgs& left_, + const PathCurvetoArgs& right_ ); +extern MagickPPExport int operator < ( const PathCurvetoArgs& left_, + const PathCurvetoArgs& right_ ); +extern MagickPPExport int operator >= ( const PathCurvetoArgs& left_, + const PathCurvetoArgs& right_ ); +extern MagickPPExport int operator <= ( const PathCurvetoArgs& left_, + const PathCurvetoArgs& right_ ); + +typedef std::vector PathCurveToArgsList; + +#if defined(MagickDLLExplicitTemplate) + +MagickDrawableExtern template class MagickPPExport +std::allocator; + +// MagickDrawableExtern template class MagickPPExport +// std::vector >; + +#endif // MagickDLLExplicitTemplate + +class MagickPPExport PathCurvetoAbs : public VPathBase +{ +public: + // Draw a single curve + PathCurvetoAbs ( const PathCurvetoArgs &args_ ); + + // Draw multiple curves + PathCurvetoAbs ( const PathCurveToArgsList &args_ ); + + // Copy constructor + PathCurvetoAbs ( const PathCurvetoAbs& original_ ); + + // Destructor + /*virtual*/ ~PathCurvetoAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + PathCurveToArgsList _args; +}; +class MagickPPExport PathCurvetoRel : public VPathBase +{ +public: + // Draw a single curve + PathCurvetoRel ( const PathCurvetoArgs &args_ ); + + // Draw multiple curves + PathCurvetoRel ( const PathCurveToArgsList &args_ ); + + // Copy constructor + PathCurvetoRel ( const PathCurvetoRel& original_ ); + + /*virtual*/ ~PathCurvetoRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + PathCurveToArgsList _args; +}; +class MagickPPExport PathSmoothCurvetoAbs : public VPathBase +{ +public: + // Draw a single curve + PathSmoothCurvetoAbs ( const Magick::Coordinate &coordinates_ ); + + // Draw multiple curves + PathSmoothCurvetoAbs ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathSmoothCurvetoAbs ( const PathSmoothCurvetoAbs& original_ ); + + /*virtual*/ ~PathSmoothCurvetoAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ + VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; +class MagickPPExport PathSmoothCurvetoRel : public VPathBase +{ +public: + // Draw a single curve + PathSmoothCurvetoRel ( const Coordinate &coordinates_ ); + + // Draw multiple curves + PathSmoothCurvetoRel ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathSmoothCurvetoRel ( const PathSmoothCurvetoRel& original_ ); + + // Destructor + /*virtual*/ ~PathSmoothCurvetoRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ + VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; + +// +// Quadratic Curveto (Quadratic Bezier) +// +class MagickPPExport PathQuadraticCurvetoArgs +{ +public: + PathQuadraticCurvetoArgs( void ); + + PathQuadraticCurvetoArgs( double x1_, double y1_, + double x_, double y_ ); + + PathQuadraticCurvetoArgs( const PathQuadraticCurvetoArgs &original_ ); + + ~PathQuadraticCurvetoArgs ( void ); + + void x1( double x1_ ) + { + _x1 = x1_; + } + double x1( void ) const + { + return _x1; + } + + void y1( double y1_ ) + { + _y1 = y1_; + } + double y1( void ) const + { + return _y1; + } + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + +private: + double _x1; + double _y1; + double _x; + double _y; +}; + +// Compare two PathQuadraticCurvetoArgs objects regardless of LHS/RHS +extern MagickPPExport int operator == ( const PathQuadraticCurvetoArgs& left_, + const PathQuadraticCurvetoArgs& right_ ); +extern MagickPPExport int operator != ( const PathQuadraticCurvetoArgs& left_, + const PathQuadraticCurvetoArgs& right_); +extern MagickPPExport int operator > ( const PathQuadraticCurvetoArgs& left_, + const PathQuadraticCurvetoArgs& right_); +extern MagickPPExport int operator < ( const PathQuadraticCurvetoArgs& left_, + const PathQuadraticCurvetoArgs& right_); +extern MagickPPExport int operator >= ( const PathQuadraticCurvetoArgs& left_, + const PathQuadraticCurvetoArgs& right_ ); +extern MagickPPExport int operator <= ( const PathQuadraticCurvetoArgs& left_, + const PathQuadraticCurvetoArgs& right_ ); + +typedef std::vector PathQuadraticCurvetoArgsList; + +#if defined(MagickDLLExplicitTemplate) + +MagickDrawableExtern template class MagickPPExport +std::allocator; + +// MagickDrawableExtern template class MagickPPExport +// std::vector >; + +#endif // MagickDLLExplicitTemplate + +class MagickPPExport PathQuadraticCurvetoAbs : public VPathBase +{ +public: + // Draw a single curve + PathQuadraticCurvetoAbs ( const Magick::PathQuadraticCurvetoArgs &args_ ); + + // Draw multiple curves + PathQuadraticCurvetoAbs ( const PathQuadraticCurvetoArgsList &args_ ); + + // Copy constructor + PathQuadraticCurvetoAbs ( const PathQuadraticCurvetoAbs& original_ ); + + // Destructor + /*virtual*/ ~PathQuadraticCurvetoAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + PathQuadraticCurvetoArgsList _args; +}; +class MagickPPExport PathQuadraticCurvetoRel : public VPathBase +{ +public: + // Draw a single curve + PathQuadraticCurvetoRel ( const Magick::PathQuadraticCurvetoArgs &args_ ); + + // Draw multiple curves + PathQuadraticCurvetoRel ( const PathQuadraticCurvetoArgsList &args_ ); + + // Copy constructor + PathQuadraticCurvetoRel ( const PathQuadraticCurvetoRel& original_ ); + + // Destructor + /*virtual*/ ~PathQuadraticCurvetoRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + PathQuadraticCurvetoArgsList _args; +}; +class MagickPPExport PathSmoothQuadraticCurvetoAbs : public VPathBase +{ +public: + // Draw a single curve + PathSmoothQuadraticCurvetoAbs ( const Magick::Coordinate &coordinate_ ); + + // Draw multiple curves + PathSmoothQuadraticCurvetoAbs ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathSmoothQuadraticCurvetoAbs ( const PathSmoothQuadraticCurvetoAbs& original_ ); + + // Destructor + /*virtual*/ ~PathSmoothQuadraticCurvetoAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; +class MagickPPExport PathSmoothQuadraticCurvetoRel : public VPathBase +{ +public: + // Draw a single curve + PathSmoothQuadraticCurvetoRel ( const Magick::Coordinate &coordinate_ ); + + // Draw multiple curves + PathSmoothQuadraticCurvetoRel ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathSmoothQuadraticCurvetoRel ( const PathSmoothQuadraticCurvetoRel& original_ ); + + // Destructor + /*virtual*/ ~PathSmoothQuadraticCurvetoRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; + +// +// Path Lineto +// +class MagickPPExport PathLinetoAbs : public VPathBase +{ +public: + // Draw to a single point + PathLinetoAbs ( const Magick::Coordinate& coordinate_ ); + + // Draw to multiple points + PathLinetoAbs ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathLinetoAbs ( const PathLinetoAbs& original_ ); + + // Destructor + /*virtual*/ ~PathLinetoAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; +class MagickPPExport PathLinetoRel : public VPathBase +{ +public: + // Draw to a single point + PathLinetoRel ( const Magick::Coordinate& coordinate_ ); + + // Draw to multiple points + PathLinetoRel ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathLinetoRel ( const PathLinetoRel& original_ ); + + // Destructor + /*virtual*/ ~PathLinetoRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; + +// Path Horizontal Lineto +class MagickPPExport PathLinetoHorizontalAbs : public VPathBase +{ +public: + PathLinetoHorizontalAbs ( double x_ ) + : _x(x_) + { + } + + /*virtual*/ ~PathLinetoHorizontalAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + +private: + double _x; +}; +class MagickPPExport PathLinetoHorizontalRel : public VPathBase +{ +public: + PathLinetoHorizontalRel ( double x_ ) + : _x(x_) + { + } + + /*virtual*/ ~PathLinetoHorizontalRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + + void x( double x_ ) + { + _x = x_; + } + double x( void ) const + { + return _x; + } + +private: + double _x; +}; + +// Path Vertical Lineto +class MagickPPExport PathLinetoVerticalAbs : public VPathBase +{ +public: + PathLinetoVerticalAbs ( double y_ ) + : _y(y_) + { + } + + /*virtual*/ ~PathLinetoVerticalAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + +private: + double _y; +}; +class MagickPPExport PathLinetoVerticalRel : public VPathBase +{ +public: + PathLinetoVerticalRel ( double y_ ) + : _y(y_) + { + } + + /*virtual*/ ~PathLinetoVerticalRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + + void y( double y_ ) + { + _y = y_; + } + double y( void ) const + { + return _y; + } + +private: + double _y; +}; + +// Path Moveto +class MagickPPExport PathMovetoAbs : public VPathBase +{ +public: + // Simple moveto + PathMovetoAbs ( const Magick::Coordinate &coordinate_ ); + + // Moveto followed by implicit linetos + PathMovetoAbs ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathMovetoAbs ( const PathMovetoAbs& original_ ); + + // Destructor + /*virtual*/ ~PathMovetoAbs ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; +class MagickPPExport PathMovetoRel : public VPathBase +{ +public: + // Simple moveto + PathMovetoRel ( const Magick::Coordinate &coordinate_ ); + + // Moveto followed by implicit linetos + PathMovetoRel ( const CoordinateList &coordinates_ ); + + // Copy constructor + PathMovetoRel ( const PathMovetoRel& original_ ); + + // Destructor + /*virtual*/ ~PathMovetoRel ( void ); + + // Operator to invoke equivalent draw API call + /*virtual*/ void operator()( MagickCore::DrawingWand *context_ ) const; + + // Return polymorphic copy of object + /*virtual*/ VPathBase* copy() const; + +private: + CoordinateList _coordinates; +}; + +} // namespace Magick + +#endif // Magick_Drawable_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Exception.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Exception.h new file mode 100644 index 0000000000..e93b561c69 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Exception.h @@ -0,0 +1,427 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003 +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition of Magick::Exception and derived classes +// Magick::Warning* and Magick::Error*. Derived from C++ STD +// 'exception' class for convenience. +// +// These classes form part of the Magick++ user interface. +// + +#if !defined(Magick_Exception_header) +#define Magick_Exception_header + +#include "Magick++/Include.h" +#include +#include + +namespace Magick +{ + class MagickPPExport Exception: public std::exception + { + public: + + // Construct with message string + Exception(const std::string& what_); + + // Construct with message string and nested exception + Exception(const std::string& what_, Exception* nested_); + + // Copy constructor + Exception(const Exception& original_); + + // Destructor + virtual ~Exception() throw(); + + // Assignment operator + Exception& operator=(const Exception& original_); + + // Get string identifying exception + virtual const char* what() const throw(); + + // Get nested exception + const Exception* nested() const throw(); + + ////////////////////////////////////////////////////////////////////// + // + // No user-serviceable parts beyond this point + // + ////////////////////////////////////////////////////////////////////// + + void nested(Exception* nested_) throw(); + + private: + std::string _what; + Exception* _nested; + }; + + // + // Error exceptions + // + + class MagickPPExport Error: public Exception + { + public: + explicit Error(const std::string& what_); + explicit Error(const std::string& what_,Exception *nested_); + ~Error() throw(); + }; + + class MagickPPExport ErrorBlob: public Error + { + public: + explicit ErrorBlob(const std::string& what_); + explicit ErrorBlob(const std::string& what_,Exception *nested_); + ~ErrorBlob() throw(); + }; + + class MagickPPExport ErrorCache: public Error + { + public: + explicit ErrorCache(const std::string& what_); + explicit ErrorCache(const std::string& what_,Exception *nested_); + ~ErrorCache() throw(); + }; + + class MagickPPExport ErrorCoder: public Error + { + public: + explicit ErrorCoder(const std::string& what_); + explicit ErrorCoder(const std::string& what_,Exception *nested_); + ~ErrorCoder() throw(); + }; + + class MagickPPExport ErrorConfigure: public Error + { + public: + explicit ErrorConfigure(const std::string& what_); + explicit ErrorConfigure(const std::string& what_,Exception *nested_); + ~ErrorConfigure() throw(); + }; + + class MagickPPExport ErrorCorruptImage: public Error + { + public: + explicit ErrorCorruptImage(const std::string& what_); + explicit ErrorCorruptImage(const std::string& what_,Exception *nested_); + ~ErrorCorruptImage() throw(); + }; + + class MagickPPExport ErrorDelegate: public Error + { + public: + explicit ErrorDelegate(const std::string& what_); + explicit ErrorDelegate(const std::string& what_,Exception *nested_); + ~ErrorDelegate() throw(); + }; + + class MagickPPExport ErrorDraw: public Error + { + public: + explicit ErrorDraw(const std::string& what_); + explicit ErrorDraw(const std::string& what_,Exception *nested_); + ~ErrorDraw() throw(); + }; + + class MagickPPExport ErrorFileOpen: public Error + { + public: + explicit ErrorFileOpen(const std::string& what_); + explicit ErrorFileOpen(const std::string& what_,Exception *nested_); + ~ErrorFileOpen() throw(); + }; + + class MagickPPExport ErrorImage: public Error + { + public: + explicit ErrorImage(const std::string& what_); + explicit ErrorImage(const std::string& what_,Exception *nested_); + ~ErrorImage() throw(); + }; + + class MagickPPExport ErrorMissingDelegate: public Error + { + public: + explicit ErrorMissingDelegate(const std::string& what_); + explicit ErrorMissingDelegate(const std::string& what_,Exception *nested_); + ~ErrorMissingDelegate() throw(); + }; + + class MagickPPExport ErrorModule: public Error + { + public: + explicit ErrorModule(const std::string& what_); + explicit ErrorModule(const std::string& what_,Exception *nested_); + ~ErrorModule() throw(); + }; + + class MagickPPExport ErrorMonitor: public Error + { + public: + explicit ErrorMonitor(const std::string& what_); + explicit ErrorMonitor(const std::string& what_,Exception *nested_); + ~ErrorMonitor() throw(); + }; + + class MagickPPExport ErrorOption: public Error + { + public: + explicit ErrorOption(const std::string& what_); + explicit ErrorOption(const std::string& what_,Exception *nested_); + ~ErrorOption() throw(); + }; + + class MagickPPExport ErrorPolicy: public Error + { + public: + explicit ErrorPolicy(const std::string& what_); + explicit ErrorPolicy(const std::string& what_,Exception *nested_); + ~ErrorPolicy() throw(); + }; + + class MagickPPExport ErrorRegistry: public Error + { + public: + explicit ErrorRegistry(const std::string& what_); + explicit ErrorRegistry(const std::string& what_,Exception *nested_); + ~ErrorRegistry() throw(); + }; + + class MagickPPExport ErrorResourceLimit: public Error + { + public: + explicit ErrorResourceLimit(const std::string& what_); + explicit ErrorResourceLimit(const std::string& what_,Exception *nested_); + ~ErrorResourceLimit() throw(); + }; + + class MagickPPExport ErrorStream: public Error + { + public: + explicit ErrorStream(const std::string& what_); + explicit ErrorStream(const std::string& what_,Exception *nested_); + ~ErrorStream() throw(); + }; + + class MagickPPExport ErrorType: public Error + { + public: + explicit ErrorType(const std::string& what_); + explicit ErrorType(const std::string& what_,Exception *nested_); + ~ErrorType() throw(); + }; + + class MagickPPExport ErrorUndefined: public Error + { + public: + explicit ErrorUndefined(const std::string& what_); + explicit ErrorUndefined(const std::string& what_,Exception *nested_); + ~ErrorUndefined() throw(); + }; + + class MagickPPExport ErrorXServer: public Error + { + public: + explicit ErrorXServer(const std::string& what_); + explicit ErrorXServer(const std::string& what_,Exception *nested_); + ~ErrorXServer() throw(); + }; + + // + // Warnings + // + + class MagickPPExport Warning: public Exception + { + public: + explicit Warning(const std::string& what_); + explicit Warning(const std::string& what_,Exception *nested_); + ~Warning() throw(); + }; + + class MagickPPExport WarningBlob: public Warning + { + public: + explicit WarningBlob(const std::string& what_); + explicit WarningBlob(const std::string& what_,Exception *nested_); + ~WarningBlob() throw(); + }; + + class MagickPPExport WarningCache: public Warning + { + public: + explicit WarningCache(const std::string& what_); + explicit WarningCache(const std::string& what_,Exception *nested_); + ~WarningCache() throw(); + }; + + class MagickPPExport WarningCoder: public Warning + { + public: + explicit WarningCoder(const std::string& what_); + explicit WarningCoder(const std::string& what_,Exception *nested_); + ~WarningCoder() throw(); + }; + + class MagickPPExport WarningConfigure: public Warning + { + public: + explicit WarningConfigure(const std::string& what_); + explicit WarningConfigure(const std::string& what_,Exception *nested_); + ~WarningConfigure() throw(); + }; + + class MagickPPExport WarningCorruptImage: public Warning + { + public: + explicit WarningCorruptImage(const std::string& what_); + explicit WarningCorruptImage(const std::string& what_,Exception *nested_); + ~WarningCorruptImage() throw(); + }; + + class MagickPPExport WarningDelegate: public Warning + { + public: + explicit WarningDelegate(const std::string& what_); + explicit WarningDelegate(const std::string& what_,Exception *nested_); + ~WarningDelegate() throw(); + }; + + class MagickPPExport WarningDraw : public Warning + { + public: + explicit WarningDraw(const std::string& what_); + explicit WarningDraw(const std::string& what_,Exception *nested_); + ~WarningDraw() throw(); + }; + + class MagickPPExport WarningFileOpen: public Warning + { + public: + explicit WarningFileOpen(const std::string& what_); + explicit WarningFileOpen(const std::string& what_,Exception *nested_); + ~WarningFileOpen() throw(); + }; + + class MagickPPExport WarningImage: public Warning + { + public: + explicit WarningImage(const std::string& what_); + explicit WarningImage(const std::string& what_,Exception *nested_); + ~WarningImage() throw(); + }; + + class MagickPPExport WarningMissingDelegate: public Warning + { + public: + explicit WarningMissingDelegate(const std::string& what_); + explicit WarningMissingDelegate(const std::string& what_, + Exception *nested_); + ~WarningMissingDelegate() throw(); + }; + + class MagickPPExport WarningModule: public Warning + { + public: + explicit WarningModule(const std::string& what_); + explicit WarningModule(const std::string& what_,Exception *nested_); + ~WarningModule() throw(); + }; + + class MagickPPExport WarningMonitor: public Warning + { + public: + explicit WarningMonitor(const std::string& what_); + explicit WarningMonitor(const std::string& what_,Exception *nested_); + ~WarningMonitor() throw(); + }; + + class MagickPPExport WarningOption: public Warning + { + public: + explicit WarningOption(const std::string& what_); + explicit WarningOption(const std::string& what_,Exception *nested_); + ~WarningOption() throw(); + }; + + class MagickPPExport WarningPolicy: public Warning + { + public: + explicit WarningPolicy(const std::string& what_); + explicit WarningPolicy(const std::string& what_,Exception *nested_); + ~WarningPolicy() throw(); + }; + + class MagickPPExport WarningRegistry: public Warning + { + public: + explicit WarningRegistry(const std::string& what_); + explicit WarningRegistry(const std::string& what_,Exception *nested_); + ~WarningRegistry() throw(); + }; + + class MagickPPExport WarningResourceLimit: public Warning + { + public: + explicit WarningResourceLimit(const std::string& what_); + explicit WarningResourceLimit(const std::string& what_,Exception *nested_); + ~WarningResourceLimit() throw(); + }; + + class MagickPPExport WarningStream: public Warning + { + public: + explicit WarningStream(const std::string& what_); + explicit WarningStream(const std::string& what_,Exception *nested_); + ~WarningStream() throw(); + }; + + class MagickPPExport WarningType: public Warning + { + public: + explicit WarningType(const std::string& what_); + explicit WarningType(const std::string& what_,Exception *nested_); + ~WarningType() throw(); + }; + + class MagickPPExport WarningUndefined: public Warning + { + public: + explicit WarningUndefined(const std::string& what_); + explicit WarningUndefined(const std::string& what_,Exception *nested_); + ~WarningUndefined() throw(); + }; + + class MagickPPExport WarningXServer: public Warning + { + public: + explicit WarningXServer(const std::string& what_); + explicit WarningXServer(const std::string& what_,Exception *nested_); + ~WarningXServer() throw(); + }; + + // + // No user-serviceable components beyond this point. + // + + std::string formatExceptionMessage( + const MagickCore::ExceptionInfo *exception_); + + Exception* createException(const MagickCore::ExceptionInfo *exception_); + + // Throw exception based on raw data + extern MagickPPExport void throwExceptionExplicit( + const MagickCore::ExceptionType severity_,const char* reason_, + const char* description_=(char *) NULL); + + // Thow exception based on ImageMagick's ExceptionInfo + extern MagickPPExport void throwException( + MagickCore::ExceptionInfo *exception_,const bool quiet_=false); + +} // namespace Magick + +#endif // Magick_Exception_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Functions.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Functions.h new file mode 100644 index 0000000000..d992ee1513 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Functions.h @@ -0,0 +1,42 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2003 +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Simple C++ function wrappers for often used or otherwise +// inconvenient ImageMagick equivalents +// + +#if !defined(Magick_Functions_header) +#define Magick_Functions_header + +#include "Magick++/Include.h" +#include + +namespace Magick +{ + // Clone C++ string as allocated C string, de-allocating any existing string + MagickPPExport void CloneString(char **destination_, + const std::string &source_); + + // Disable OpenCL acceleration (only works when build with OpenCL support) + MagickPPExport void DisableOpenCL(void); + + // Enable OpenCL acceleration (only works when build with OpenCL support) + MagickPPExport bool EnableOpenCL(void); + + // C library initialization routine + MagickPPExport void InitializeMagick(const char *path_); + + // Seed a new sequence of pseudo-random numbers + MagickPPExport void SetRandomSeed(const unsigned long seed); + + // Set the ImageMagick security policy. + MagickPPExport bool SetSecurityPolicy(const std::string &policy_); + + // C library initialization routine + MagickPPExport void TerminateMagick(); +} +#endif // Magick_Functions_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Geometry.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Geometry.h new file mode 100644 index 0000000000..1b8d3772e4 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Geometry.h @@ -0,0 +1,263 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002 +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Geometry Definition +// +// Representation of an ImageMagick geometry specification +// X11 geometry specification plus hints + +#if !defined (Magick_Geometry_header) +#define Magick_Geometry_header + +#include "Magick++/Include.h" +#include + +namespace Magick +{ + class MagickPPExport Geometry; + + // Compare two Geometry objects regardless of LHS/RHS + MagickPPExport int operator == + (const Magick::Geometry& left_,const Magick::Geometry& right_); + MagickPPExport int operator != + (const Magick::Geometry& left_,const Magick::Geometry& right_); + MagickPPExport int operator > + (const Magick::Geometry& left_,const Magick::Geometry& right_); + MagickPPExport int operator < + (const Magick::Geometry& left_,const Magick::Geometry& right_); + MagickPPExport int operator >= + (const Magick::Geometry& left_,const Magick::Geometry& right_); + MagickPPExport int operator <= + (const Magick::Geometry& left_,const Magick::Geometry& right_); + + class MagickPPExport Geometry + { + public: + + // Default constructor + Geometry(); + + // Construct Geometry from specified string + Geometry(const char *geometry_); + + // Copy constructor + Geometry(const Geometry &geometry_); + + // Construct Geometry from specified string + Geometry(const std::string &geometry_); + + // Construct Geometry from specified dimensions + Geometry(size_t width_,size_t height_,::ssize_t xOff_=0, + ::ssize_t yOff_=0); + + // Destructor + ~Geometry(void); + + // Set via geometry string + const Geometry& operator=(const char *geometry_); + + // Assignment operator + Geometry& operator=(const Geometry& Geometry_); + + // Set via geometry string + const Geometry& operator=(const std::string &geometry_); + + // Return geometry string + operator std::string() const; + + // Resize without preserving aspect ratio (!) + void aspect(bool aspect_); + bool aspect(void) const; + + // Resize the image based on the smallest fitting dimension (^) + void fillArea(bool fillArea_); + bool fillArea(void) const; + + // Resize if image is greater than size (>) + void greater(bool greater_); + bool greater(void) const; + + // Height + void height(size_t height_); + size_t height(void) const; + + // Does object contain valid geometry? + void isValid(bool isValid_); + bool isValid(void) const; + + // Resize if image is less than size (<) + void less(bool less_); + bool less(void) const; + + // Resize using a pixel area count limit (@) + void limitPixels(bool limitPixels_); + bool limitPixels(void) const; + + // Width and height are expressed as percentages + void percent(bool percent_); + bool percent(void) const; + + // Width + void width(size_t width_); + size_t width(void) const; + + // X offset from origin + void xOff(::ssize_t xOff_); + ::ssize_t xOff(void) const; + + // Y offset from origin + void yOff(::ssize_t yOff_); + ::ssize_t yOff(void) const; + + // + // Public methods below this point are for Magick++ use only. + // + + // Construct from RectangleInfo + Geometry(const MagickCore::RectangleInfo &rectangle_); + + // Set via RectangleInfo + const Geometry& operator=(const MagickCore::RectangleInfo &rectangle_); + + // Return an ImageMagick RectangleInfo struct + operator MagickCore::RectangleInfo() const; + + private: + size_t _width; + size_t _height; + ::ssize_t _xOff; + ::ssize_t _yOff; + bool _isValid; + bool _percent; // Interpret width & height as percentages (%) + bool _aspect; // Force exact size (!) + bool _greater; // Resize only if larger than geometry (>) + bool _less; // Resize only if smaller than geometry (<) + bool _fillArea; // Resize the image based on the smallest fitting dimension (^) + bool _limitPixels; // Resize using a pixel area count limit (@) + }; + + class MagickPPExport Offset; + + // Compare two Offset objects + MagickPPExport int operator == + (const Magick::Offset& left_,const Magick::Offset& right_); + MagickPPExport int operator != + (const Magick::Offset& left_,const Magick::Offset& right_); + + class MagickPPExport Offset + { + public: + + // Default constructor + Offset(); + + // Construct Offset from specified string + Offset(const char *offset_); + + // Copy constructor + Offset(const Offset &offset_); + + // Construct Offset from specified string + Offset(const std::string &offset_); + + // Construct Offset from specified x and y + Offset(ssize_t x_,ssize_t y_); + + // Destructor + ~Offset(void); + + // Set via offset string + const Offset& operator=(const char *offset_); + + // Assignment operator + Offset& operator=(const Offset& offset_); + + // Set via offset string + const Offset& operator=(const std::string &offset_); + + // X offset from origin + ssize_t x(void) const; + + // Y offset from origin + ssize_t y(void) const; + + // + // Public methods below this point are for Magick++ use only. + // + + // Return an ImageMagick OffsetInfo struct + operator MagickCore::OffsetInfo() const; + + private: + ssize_t _x; + ssize_t _y; + }; + + class MagickPPExport Point; + + // Compare two Point objects + MagickPPExport int operator == + (const Magick::Point& left_,const Magick::Point& right_); + MagickPPExport int operator != + (const Magick::Point& left_,const Magick::Point& right_); + + class MagickPPExport Point + { + public: + + // Default constructor + Point(); + + // Construct Point from specified string + Point(const char *point_); + + // Copy constructor + Point(const Point &point_); + + // Construct Point from specified string + Point(const std::string &point_); + + // Construct Point from specified x and y + Point(double x_,double y_); + + // Construct Point from specified x y + Point(double xy_); + + // Destructor + ~Point(void); + + // Set via point string + const Point& operator=(const char *point_); + + // Set via double value + const Point& operator=(double xy_); + + // Assignment operator + Point& operator=(const Point& point_); + + // Set via point string + const Point& operator=(const std::string &point_); + + // Return point string + operator std::string() const; + + // Does object contain valid point? + bool isValid() const; + + // X offset from origin + double x(void) const; + + // Y offset from origin + double y(void) const; + + private: + double _x; + double _y; + }; +} // namespace Magick + +#endif // Magick_Geometry_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Image.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Image.h new file mode 100644 index 0000000000..d76d642c41 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Image.h @@ -0,0 +1,1564 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003 +// +// Copyright @ 2013 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition of Image, the representation of a single image in Magick++ +// + +#if !defined(Magick_Image_header) +#define Magick_Image_header + +#include "Magick++/Include.h" +#include +#include +#include "Magick++/Blob.h" +#include "Magick++/Color.h" +#include "Magick++/Drawable.h" +#include "Magick++/Exception.h" +#include "Magick++/Geometry.h" +#include "Magick++/Statistic.h" +#include "Magick++/TypeMetric.h" + +namespace Magick +{ + // Forward declarations + class Options; + class ImageRef; + + extern MagickPPExport const char *borderGeometryDefault; + extern MagickPPExport const char *frameGeometryDefault; + extern MagickPPExport const char *raiseGeometryDefault; + + // Compare two Image objects regardless of LHS/RHS + // Image sizes and signatures are used as basis of comparison + MagickPPExport int operator == + (const Magick::Image &left_,const Magick::Image &right_); + MagickPPExport int operator != + (const Magick::Image &left_,const Magick::Image &right_); + MagickPPExport int operator > + (const Magick::Image &left_,const Magick::Image &right_); + MagickPPExport int operator < + (const Magick::Image &left_,const Magick::Image &right_); + MagickPPExport int operator >= + (const Magick::Image &left_,const Magick::Image &right_); + MagickPPExport int operator <= + (const Magick::Image &left_,const Magick::Image &right_); + + // + // Image is the representation of an image. In reality, it actually + // a handle object which contains a pointer to a shared reference + // object (ImageRef). As such, this object is extremely space efficient. + // + class MagickPPExport Image + { + public: + + // Default constructor + Image(void); + + // Construct Image from in-memory BLOB + Image(const Blob &blob_); + + // Construct Image of specified size from in-memory BLOB + Image(const Blob &blob_,const Geometry &size_); + + // Construct Image of specified size and depth from in-memory BLOB + Image(const Blob &blob_,const Geometry &size_,const size_t depth_); + + // Construct Image of specified size, depth, and format from + // in-memory BLOB + Image(const Blob &blob_,const Geometry &size_,const size_t depth_, + const std::string &magick_); + + // Construct Image of specified size, and format from in-memory BLOB + Image(const Blob &blob_,const Geometry &size_,const std::string &magick_); + + // Construct a blank image canvas of specified size and color + Image(const Geometry &size_,const Color &color_); + + // Copy constructor + Image(const Image &image_); + + // Copy constructor to copy part of the image + Image(const Image &image_,const Geometry &geometry_); + + // Construct an image based on an array of raw pixels, of + // specified type and mapping, in memory + Image(const size_t width_,const size_t height_,const std::string &map_, + const StorageType type_,const void *pixels_); + + // Construct from image file or image specification + Image(const std::string &imageSpec_); + + // Destructor + virtual ~Image(); + + // Assignment operator + Image& operator=(const Image &image_); + + // Join images into a single multi-image file + void adjoin(const bool flag_); + bool adjoin(void) const; + + // Image supports transparency (alpha channel) + void alpha(const bool alphaFlag_); + bool alpha(void) const; + + // Transparent color + void matteColor(const Color &matteColor_); + Color matteColor(void) const; + + // Time in 1/100ths of a second which must expire before + // displaying the next image in an animated sequence. + void animationDelay(const size_t delay_); + size_t animationDelay(void) const; + + // Number of iterations to loop an animation (e.g. Netscape loop + // extension) for. + void animationIterations(const size_t iterations_); + size_t animationIterations(void) const; + + // Image background color + void backgroundColor(const Color &color_); + Color backgroundColor(void) const; + + // Name of texture image to tile onto the image background + void backgroundTexture(const std::string &backgroundTexture_); + std::string backgroundTexture(void) const; + + // Base image width (before transformations) + size_t baseColumns(void) const; + + // Base image filename (before transformations) + std::string baseFilename(void) const; + + // Base image height (before transformations) + size_t baseRows(void) const; + + // Use black point compensation. + void blackPointCompensation(const bool flag_); + bool blackPointCompensation(void) const; + + // Image border color + void borderColor(const Color &color_); + Color borderColor(void) const; + + // Return smallest bounding box enclosing non-border pixels. The + // current fuzz value is used when discriminating between pixels. + // This is the crop bounding box used by crop(Geometry(0,0)); + Geometry boundingBox(void) const; + + // Text bounding-box base color (default none) + void boxColor(const Color &boxColor_); + Color boxColor(void) const; + + // Set or obtain modulus channel depth + void channelDepth(const ChannelType channel_,const size_t depth_); + size_t channelDepth(const ChannelType channel_); + + // Returns the number of channels in this image. + size_t channels() const; + + // Image class (DirectClass or PseudoClass) + // NOTE: setting a DirectClass image to PseudoClass will result in + // the loss of color information if the number of colors in the + // image is greater than the maximum palette size (either 256 or + // 65536 entries depending on the value of MAGICKCORE_QUANTUM_DEPTH when + // ImageMagick was built). + void classType(const ClassType class_); + ClassType classType(void) const; + + // Colors within this distance are considered equal + void colorFuzz(const double fuzz_); + double colorFuzz(void) const; + + // Colormap size (number of colormap entries) + void colorMapSize(const size_t entries_); + size_t colorMapSize(void) const; + + // Image Color Space + void colorSpace(const ColorspaceType colorSpace_); + ColorspaceType colorSpace(void) const; + + void colorSpaceType(const ColorspaceType colorSpace_); + ColorspaceType colorSpaceType(void) const; + + // Image width + size_t columns(void) const; + + // Comment image (add comment string to image) + void comment(const std::string &comment_); + std::string comment(void) const; + + // Composition operator to be used when composition is implicitly + // used (such as for image flattening). + void compose(const CompositeOperator compose_); + CompositeOperator compose(void) const; + + // Compression type + void compressType(const CompressionType compressType_); + CompressionType compressType(void) const; + + // Enable printing of debug messages from ImageMagick + void debug(const bool flag_); + bool debug(void) const; + + // Vertical and horizontal resolution in pixels of the image + void density(const Point &density_); + Point density(void) const; + + // Image depth (bits allocated to red/green/blue components) + void depth(const size_t depth_); + size_t depth(void) const; + + // Tile names from within an image montage + std::string directory(void) const; + + // Endianness (little like Intel or big like SPARC) for image + // formats which support endian-specific options. + void endian(const EndianType endian_); + EndianType endian(void) const; + + // Exif profile (BLOB) + void exifProfile(const Blob &exifProfile_); + Blob exifProfile(void) const; + + // Image file name + void fileName(const std::string &fileName_); + std::string fileName(void) const; + + // Number of bytes of the image on disk + MagickSizeType fileSize(void) const; + + // Color to use when filling drawn objects + void fillColor(const Color &fillColor_); + Color fillColor(void) const; + + // Rule to use when filling drawn objects + void fillRule(const FillRule &fillRule_); + FillRule fillRule(void) const; + + // Pattern to use while filling drawn objects. + void fillPattern(const Image &fillPattern_); + Image fillPattern(void) const; + + // Filter to use when resizing image + void filterType(const FilterType filterType_); + FilterType filterType(void) const; + + // Text rendering font + void font(const std::string &font_); + std::string font(void) const; + + // Font family + void fontFamily(const std::string &family_); + std::string fontFamily(void) const; + + // Font point size + void fontPointsize(const double pointSize_); + double fontPointsize(void) const; + + // Font style + void fontStyle(const StyleType style_); + StyleType fontStyle(void) const; + + // Font weight + void fontWeight(const size_t weight_); + size_t fontWeight(void) const; + + // Long image format description + std::string format(void) const; + + // Formats the specified expression + // More info here: https://imagemagick.org/script/escape.php + std::string formatExpression(const std::string expression); + + // Gamma level of the image + double gamma(void) const; + + // Preferred size of the image when encoding + Geometry geometry(void) const; + + // GIF disposal method + void gifDisposeMethod(const DisposeType disposeMethod_); + DisposeType gifDisposeMethod(void) const; + + bool hasChannel(const PixelChannel channel) const; + + // When comparing images, emphasize pixel differences with this color. + void highlightColor(const Color color_); + + // ICC color profile (BLOB) + void iccColorProfile(const Blob &colorProfile_); + Blob iccColorProfile(void) const; + + // Type of interlacing to use + void interlaceType(const InterlaceType interlace_); + InterlaceType interlaceType(void) const; + + // Pixel color interpolation method to use + void interpolate(const PixelInterpolateMethod interpolate_); + PixelInterpolateMethod interpolate(void) const; + + // IPTC profile (BLOB) + void iptcProfile(const Blob &iptcProfile_); + Blob iptcProfile(void) const; + + // Returns true if none of the pixels in the image have an alpha value + // other than OpaqueAlpha (QuantumRange). + bool isOpaque(void) const; + + // Does object contain valid image? + void isValid(const bool isValid_); + bool isValid(void) const; + + // Image label + void label(const std::string &label_); + std::string label(void) const; + + // When comparing images, de-emphasize pixel differences with this color. + void lowlightColor(const Color color_); + + // File type magick identifier (.e.g "GIF") + void magick(const std::string &magick_); + std::string magick(void) const; + + // When comparing images, set pixels with a read mask to this color. + void masklightColor(const Color color_); + + // The mean error per pixel computed when an image is color reduced + double meanErrorPerPixel(void) const; + + // Image modulus depth (minimum number of bits required to support + // red/green/blue components without loss of accuracy) + void modulusDepth(const size_t modulusDepth_); + size_t modulusDepth(void) const; + + // Transform image to black and white + void monochrome(const bool monochromeFlag_); + bool monochrome(void) const; + + // Tile size and offset within an image montage + Geometry montageGeometry(void) const; + + // The normalized max error per pixel computed when an image is + // color reduced. + double normalizedMaxError(void) const; + + // The normalized mean error per pixel computed when an image is + // color reduced. + double normalizedMeanError(void) const; + + // Image orientation + void orientation(const OrientationType orientation_); + OrientationType orientation(void) const; + + // Preferred size and location of an image canvas. + void page(const Geometry &pageSize_); + Geometry page(void) const; + + // JPEG/MIFF/PNG compression level (default 75). + void quality(const size_t quality_); + size_t quality(void) const; + + // Maximum number of colors to quantize to + void quantizeColors(const size_t colors_); + size_t quantizeColors(void) const; + + // Colorspace to quantize in. + void quantizeColorSpace(const ColorspaceType colorSpace_); + ColorspaceType quantizeColorSpace(void) const; + + // Dither image during quantization (default true). + void quantizeDither(const bool ditherFlag_); + bool quantizeDither(void) const; + + // Dither method + void quantizeDitherMethod(const DitherMethod ditherMethod_); + DitherMethod quantizeDitherMethod(void) const; + + // Quantization tree-depth + void quantizeTreeDepth(const size_t treeDepth_); + size_t quantizeTreeDepth(void) const; + + // Suppress all warning messages. Error messages are still reported. + void quiet(const bool quiet_); + bool quiet(void) const; + + // The type of rendering intent + void renderingIntent(const RenderingIntent renderingIntent_); + RenderingIntent renderingIntent(void) const; + + // Units of image resolution + void resolutionUnits(const ResolutionType resolutionUnits_); + ResolutionType resolutionUnits(void) const; + + // The number of pixel rows in the image + size_t rows(void) const; + + // Image sampling factor + void samplingFactor(const std::string &samplingFactor_); + std::string samplingFactor(void) const; + + // Image scene number + void scene(const size_t scene_); + size_t scene(void) const; + + // Width and height of a raw image + void size(const Geometry &geometry_); + Geometry size(void) const; + + // enabled/disable stroke anti-aliasing + void strokeAntiAlias(const bool flag_); + bool strokeAntiAlias(void) const; + + // Color to use when drawing object outlines + void strokeColor(const Color &strokeColor_); + Color strokeColor(void) const; + + // Specify the pattern of dashes and gaps used to stroke + // paths. The strokeDashArray represents a zero-terminated array + // of numbers that specify the lengths of alternating dashes and + // gaps in pixels. If an odd number of values is provided, then + // the list of values is repeated to yield an even number of + // values. A typical strokeDashArray_ array might contain the + // members 5 3 2 0, where the zero value indicates the end of the + // pattern array. + void strokeDashArray(const double *strokeDashArray_); + const double *strokeDashArray(void) const; + + // While drawing using a dash pattern, specify distance into the + // dash pattern to start the dash (default 0). + void strokeDashOffset(const double strokeDashOffset_); + double strokeDashOffset(void) const; + + // Specify the shape to be used at the end of open subpaths when + // they are stroked. Values of LineCap are UndefinedCap, ButtCap, + // RoundCap, and SquareCap. + void strokeLineCap(const LineCap lineCap_); + LineCap strokeLineCap(void) const; + + // Specify the shape to be used at the corners of paths (or other + // vector shapes) when they are stroked. Values of LineJoin are + // UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. + void strokeLineJoin(const LineJoin lineJoin_); + LineJoin strokeLineJoin(void) const; + + // Specify miter limit. When two line segments meet at a sharp + // angle and miter joins have been specified for 'lineJoin', it is + // possible for the miter to extend far beyond the thickness of + // the line stroking the path. The miterLimit' imposes a limit on + // the ratio of the miter length to the 'lineWidth'. The default + // value of this parameter is 4. + void strokeMiterLimit(const size_t miterLimit_); + size_t strokeMiterLimit(void) const; + + // Pattern image to use while stroking object outlines. + void strokePattern(const Image &strokePattern_); + Image strokePattern(void) const; + + // Stroke width for drawing vector objects (default one) + void strokeWidth(const double strokeWidth_); + double strokeWidth(void) const; + + // Subimage of an image sequence + void subImage(const size_t subImage_); + size_t subImage(void) const; + + // Number of images relative to the base image + void subRange(const size_t subRange_); + size_t subRange(void) const; + + // Anti-alias Postscript and TrueType fonts (default true) + void textAntiAlias(const bool flag_); + bool textAntiAlias(void) const; + + // Render text right-to-left or left-to-right. + void textDirection(DirectionType direction_); + DirectionType textDirection() const; + + // Annotation text encoding (e.g. "UTF-16") + void textEncoding(const std::string &encoding_); + std::string textEncoding(void) const; + + // Text gravity. + void textGravity(GravityType gravity_); + GravityType textGravity() const; + + // Text inter-line spacing + void textInterlineSpacing(double spacing_); + double textInterlineSpacing(void) const; + + // Text inter-word spacing + void textInterwordSpacing(double spacing_); + double textInterwordSpacing(void) const; + + // Text inter-character kerning + void textKerning(double kerning_); + double textKerning(void) const; + + // Text undercolor box + void textUnderColor(const Color &underColor_); + Color textUnderColor(void) const; + + // Number of colors in the image + size_t totalColors(void) const; + + // Rotation to use when annotating with text or drawing + void transformRotation(const double angle_); + + // Skew to use in X axis when annotating with text or drawing + void transformSkewX(const double skewx_); + + // Skew to use in Y axis when annotating with text or drawing + void transformSkewY(const double skewy_); + + // Image representation type (also see type operation) + // Available types: + // Bilevel PaletteBilevelAlpha + // Grayscale GrayscaleAlpha + // Palette PaletteAlpha + // TrueColor TrueColorAlpha + // ColorSeparation ColorSeparationAlpha + void type(const ImageType type_); + ImageType type(void) const; + + // Print detailed information about the image + void verbose(const bool verboseFlag_); + bool verbose(void) const; + + // Virtual pixel method + void virtualPixelMethod(const VirtualPixelMethod virtualPixelMethod_); + VirtualPixelMethod virtualPixelMethod(void) const; + + // X11 display to display to, obtain fonts from, or to capture + // image from + void x11Display(const std::string &display_); + std::string x11Display(void) const; + + // x resolution of the image + double xResolution(void) const; + + // y resolution of the image + double yResolution(void) const; + + // Adaptive-blur image with specified blur factor + // The radius_ parameter specifies the radius of the Gaussian, in + // pixels, not counting the center pixel. The sigma_ parameter + // specifies the standard deviation of the Laplacian, in pixels. + void adaptiveBlur(const double radius_=0.0,const double sigma_=1.0); + + // This is shortcut function for a fast interpolative resize using mesh + // interpolation. It works well for small resizes of less than +/- 50% + // of the original image size. For larger resizing on images a full + // filtered and slower resize function should be used instead. + void adaptiveResize(const Geometry &geometry_); + + // Adaptively sharpens the image by sharpening more intensely near image + // edges and less intensely far from edges. We sharpen the image with a + // Gaussian operator of the given radius and standard deviation (sigma). + // For reasonable results, radius should be larger than sigma. + void adaptiveSharpen(const double radius_=0.0,const double sigma_=1.0); + void adaptiveSharpenChannel(const ChannelType channel_, + const double radius_=0.0,const double sigma_=1.0); + + // Local adaptive threshold image + // http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm + // Width x height define the size of the pixel neighborhood + // bias = constant to subtract from pixel neighborhood mean + void adaptiveThreshold(const size_t width_,const size_t height_, + const double bias_=0.0); + + // Add noise to image with specified noise type + void addNoise(const NoiseType noiseType_,const double attenuate_=1.0); + void addNoiseChannel(const ChannelType channel_, + const NoiseType noiseType_,const double attenuate_=1.0); + + // Transform image by specified affine (or free transform) matrix. + void affineTransform(const DrawableAffine &affine); + + // Set or attenuate the alpha channel in the image. If the image + // pixels are opaque then they are set to the specified alpha + // value, otherwise they are blended with the supplied alpha + // value. The value of alpha_ ranges from 0 (completely opaque) + // to QuantumRange. The defines OpaqueAlpha and TransparentAlpha are + // available to specify completely opaque or completely + // transparent, respectively. + void alpha(const unsigned int alpha_); + + // AlphaChannel() activates, deactivates, resets, or sets the alpha + // channel. + void alphaChannel(AlphaChannelOption alphaOption_); + + // + // Annotate image (draw text on image) + // + // Gravity effects text placement in bounding area according to rules: + // NorthWestGravity text bottom-left corner placed at top-left + // NorthGravity text bottom-center placed at top-center + // NorthEastGravity text bottom-right corner placed at top-right + // WestGravity text left-center placed at left-center + // CenterGravity text center placed at center + // EastGravity text right-center placed at right-center + // SouthWestGravity text top-left placed at bottom-left + // SouthGravity text top-center placed at bottom-center + // SouthEastGravity text top-right placed at bottom-right + + // Annotate using specified text, and placement location + void annotate(const std::string &text_,const Geometry &location_); + + // Annotate using specified text, bounding area, and placement + // gravity + void annotate(const std::string &text_,const Geometry &boundingArea_, + const GravityType gravity_); + + // Annotate with text using specified text, bounding area, + // placement gravity, and rotation. + void annotate(const std::string &text_,const Geometry &boundingArea_, + const GravityType gravity_,const double degrees_); + + // Annotate with text (bounding area is entire image) and placement + // gravity. + void annotate(const std::string &text_,const GravityType gravity_); + + // Inserts the artifact with the specified name and value into + // the artifact tree of the image. + void artifact(const std::string &name_,const std::string &value_); + + // Returns the value of the artifact with the specified name. + std::string artifact(const std::string &name_) const; + + // Access/Update a named image attribute + void attribute(const std::string name_,const char *value_); + void attribute(const std::string name_,const std::string value_); + std::string attribute(const std::string name_) const; + + // Extracts the 'mean' from the image and adjust the image to try + // make set its gamma appropriately. + void autoGamma(void); + void autoGammaChannel(const ChannelType channel_); + + // Adjusts the levels of a particular image channel by scaling the + // minimum and maximum values to the full quantum range. + void autoLevel(void); + void autoLevelChannel(const ChannelType channel_); + + // Adjusts an image so that its orientation is suitable for viewing. + void autoOrient(void); + + // Automatically selects a threshold and replaces each pixel in the image + // with a black pixel if the image intensity is less than the selected + // threshold otherwise white. + void autoThreshold(const AutoThresholdMethod method_); + + // Forces all pixels below the threshold into black while leaving all + // pixels at or above the threshold unchanged. + void blackThreshold(const std::string &threshold_); + void blackThresholdChannel(const ChannelType channel_, + const std::string &threshold_); + + // Simulate a scene at nighttime in the moonlight. + void blueShift(const double factor_=1.5); + + // Blur image with specified blur factor + // The radius_ parameter specifies the radius of the Gaussian, in + // pixels, not counting the center pixel. The sigma_ parameter + // specifies the standard deviation of the Laplacian, in pixels. + void blur(const double radius_=0.0,const double sigma_=1.0); + void blurChannel(const ChannelType channel_,const double radius_=0.0, + const double sigma_=1.0); + + // Border image (add border to image) + void border(const Geometry &geometry_=borderGeometryDefault); + + // Changes the brightness and/or contrast of an image. It converts the + // brightness and contrast parameters into slope and intercept and calls + // a polynomial function to apply to the image. + void brightnessContrast(const double brightness_=0.0, + const double contrast_=0.0); + void brightnessContrastChannel(const ChannelType channel_, + const double brightness_=0.0,const double contrast_=0.0); + + // Uses a multi-stage algorithm to detect a wide range of edges in images. + void cannyEdge(const double radius_=0.0,const double sigma_=1.0, + const double lowerPercent_=0.1,const double upperPercent_=0.3); + + // Accepts a lightweight Color Correction Collection + // (CCC) file which solely contains one or more color corrections and + // applies the correction to the image. + void cdl(const std::string &cdl_); + + // Extract channel from image + void channel(const ChannelType channel_); + + // Charcoal effect image (looks like charcoal sketch) + // The radius_ parameter specifies the radius of the Gaussian, in + // pixels, not counting the center pixel. The sigma_ parameter + // specifies the standard deviation of the Laplacian, in pixels. + void charcoal(const double radius_=0.0,const double sigma_=1.0); + void charcoalChannel(const ChannelType channel_,const double radius_=0.0, + const double sigma_=1.0); + + // Chop image (remove vertical or horizontal subregion of image) + // FIXME: describe how geometry argument is used to select either + // horizontal or vertical subregion of image. + void chop(const Geometry &geometry_); + + // Chromaticity blue primary point. + void chromaBluePrimary(const double x_,const double y_,const double z_); + void chromaBluePrimary(double *x_,double *y_,double *z_) const; + + // Chromaticity green primary point. + void chromaGreenPrimary(const double x_,const double y_,const double z_); + void chromaGreenPrimary(double *x_,double *y_,double *z_) const; + + // Chromaticity red primary point. + void chromaRedPrimary(const double x_,const double y_,const double z_); + void chromaRedPrimary(double *x_,double *y_,double *z_) const; + + // Chromaticity white point. + void chromaWhitePoint(const double x_,const double y_,const double z_); + void chromaWhitePoint(double *x_,double *y_,double *z_) const; + + // Set each pixel whose value is below zero to zero and any the + // pixel whose value is above the quantum range to the quantum range (e.g. + // 65535) otherwise the pixel value remains unchanged. + void clamp(void); + void clampChannel(const ChannelType channel_); + + // Sets the image clip mask based on any clipping path information + // if it exists. + void clip(void); + void clipPath(const std::string pathname_,const bool inside_); + + // Apply a color lookup table (CLUT) to the image. + void clut(const Image &clutImage_,const PixelInterpolateMethod method); + void clutChannel(const ChannelType channel_,const Image &clutImage_, + const PixelInterpolateMethod method); + + // Colorize image with pen color, using specified percent alpha. + void colorize(const unsigned int alpha_,const Color &penColor_); + + // Colorize image with pen color, using specified percent alpha + // for red, green, and blue quantums + void colorize(const unsigned int alphaRed_,const unsigned int alphaGreen_, + const unsigned int alphaBlue_,const Color &penColor_); + + // Color at colormap position index_ + void colorMap(const size_t index_,const Color &color_); + Color colorMap(const size_t index_) const; + + // Apply a color matrix to the image channels. The user supplied + // matrix may be of order 1 to 5 (1x1 through 5x5). + void colorMatrix(const size_t order_,const double *color_matrix_); + + // Compare current image with another image + // False is returned if the images are not identical. + bool compare(const Image &reference_) const; + + // Compare current image with another image + // Returns the distortion based on the specified metric. + double compare(const Image &reference_,const MetricType metric_); + double compareChannel(const ChannelType channel_, + const Image &reference_, + const MetricType metric_ ); + + // Compare current image with another image + // Sets the distortion and returns the difference image. + Image compare(const Image &reference_,const MetricType metric_, + double *distortion); + Image compareChannel(const ChannelType channel_,const Image &reference_, + const MetricType metric_,double *distortion); + + // Compose an image onto another at specified offset and using + // specified algorithm + void composite(const Image &compositeImage_,const Geometry &offset_, + const CompositeOperator compose_=InCompositeOp); + void composite(const Image &compositeImage_,const GravityType gravity_, + const CompositeOperator compose_=InCompositeOp); + void composite(const Image &compositeImage_,const ::ssize_t xOffset_, + const ::ssize_t yOffset_,const CompositeOperator compose_=InCompositeOp); + + // Determines the connected-components of the image + void connectedComponents(const size_t connectivity_); + + // Contrast image (enhance intensity differences in image) + void contrast(const bool sharpen_); + + // A simple image enhancement technique that attempts to improve the + // contrast in an image by 'stretching' the range of intensity values + // it contains to span a desired range of values. It differs from the + // more sophisticated histogram equalization in that it can only apply a + // linear scaling function to the image pixel values. As a result the + // 'enhancement' is less harsh. + void contrastStretch(const double blackPoint_,const double whitePoint_); + void contrastStretchChannel(const ChannelType channel_, + const double blackPoint_,const double whitePoint_); + + // Convolve image. Applies a user-specified convolution to the image. + // order_ represents the number of columns and rows in the filter kernel. + // kernel_ is an array of doubles representing the convolution kernel. + void convolve(const size_t order_,const double *kernel_); + + // Copies pixels from the source image as defined by the geometry the + // destination image at the specified offset. + void copyPixels(const Image &source_,const Geometry &geometry_, + const Offset &offset_); + + // Crop image (subregion of original image) + void crop(const Geometry &geometry_); + + // Cycle image colormap + void cycleColormap(const ::ssize_t amount_); + + // Converts cipher pixels to plain pixels. + void decipher(const std::string &passphrase_); + + // Tagged image format define. Similar to the defineValue() method + // except that passing the flag_ value 'true' creates a value-less + // define with that format and key. Passing the flag_ value 'false' + // removes any existing matching definition. The method returns 'true' + // if a matching key exists, and 'false' if no matching key exists. + void defineSet(const std::string &magick_,const std::string &key_, + bool flag_); + bool defineSet(const std::string &magick_,const std::string &key_) const; + + // Tagged image format define (set/access coder-specific option) The + // magick_ option specifies the coder the define applies to. The key_ + // option provides the key specific to that coder. The value_ option + // provides the value to set (if any). See the defineSet() method if the + // key must be removed entirely. + void defineValue(const std::string &magick_,const std::string &key_, + const std::string &value_); + std::string defineValue(const std::string &magick_, + const std::string &key_) const; + + // Removes skew from the image. Skew is an artifact that occurs in scanned + // images because of the camera being misaligned, imperfections in the + // scanning or surface, or simply because the paper was not placed + // completely flat when scanned. The value of threshold_ ranges from 0 + // to QuantumRange. + void deskew(const double threshold_); + + // Despeckle image (reduce speckle noise) + void despeckle(void); + + // Display image on screen + void display(void); + + // Distort image. distorts an image using various distortion methods, by + // mapping color lookups of the source image to a new destination image + // usually of the same size as the source image, unless 'bestfit' is set to + // true. + void distort(const DistortMethod method_, + const size_t numberArguments_,const double *arguments_, + const bool bestfit_=false); + + // Draw on image using a single drawable + void draw(const Drawable &drawable_); + + // Draw on image using a drawable list + void draw(const std::vector &drawable_); + + // Edge image (highlight edges in image) + void edge(const double radius_=0.0); + + // Emboss image (highlight edges with 3D effect) + // The radius_ parameter specifies the radius of the Gaussian, in + // pixels, not counting the center pixel. The sigma_ parameter + // specifies the standard deviation of the Laplacian, in pixels. + void emboss(const double radius_=0.0,const double sigma_=1.0); + + // Converts pixels to cipher-pixels. + void encipher(const std::string &passphrase_); + + // Enhance image (minimize noise) + void enhance(void); + + // Equalize image (histogram equalization) + void equalize(void); + + // Erase image to current "background color" + void erase(void); + + // Apply a value with an arithmetic, relational, or logical operator. + void evaluate(const ChannelType channel_, + const MagickEvaluateOperator operator_,double rvalue_); + + // Apply a value with an arithmetic, relational, or logical operator. + void evaluate(const ChannelType channel_,const MagickFunction function_, + const size_t number_parameters_,const double *parameters_); + + // Apply a value with an arithmetic, relational, or logical operator. + void evaluate(const ChannelType channel_,const ::ssize_t x_, + const ::ssize_t y_,const size_t columns_,const size_t rows_, + const MagickEvaluateOperator operator_,const double rvalue_); + + // Extend the image as defined by the geometry. + void extent(const Geometry &geometry_); + void extent(const Geometry &geometry_,const Color &backgroundColor); + void extent(const Geometry &geometry_,const Color &backgroundColor, + const GravityType gravity_); + void extent(const Geometry &geometry_,const GravityType gravity_); + + // Flip image (reflect each scanline in the vertical direction) + void flip(void); + + // Floodfill pixels matching color (within fuzz factor) of target + // pixel(x,y) with replacement alpha value. + void floodFillAlpha(const ::ssize_t x_,const ::ssize_t y_, + const unsigned int alpha_,const bool invert_=false); + + // Floodfill designated area with replacement alpha value + void floodFillAlpha(const ssize_t x_,const ssize_t y_, + const unsigned int alpha_,const Color &target_,const bool invert_=false); + + // Flood-fill color across pixels that match the color of the + // target pixel and are neighbors of the target pixel. + // Uses current fuzz setting when determining color match. + void floodFillColor(const Geometry &point_,const Color &fillColor_, + const bool invert_=false); + void floodFillColor(const ::ssize_t x_,const ::ssize_t y_, + const Color &fillColor_,const bool invert_=false); + + // Flood-fill color across pixels starting at target-pixel and + // stopping at pixels matching specified border color. + // Uses current fuzz setting when determining color match. + void floodFillColor(const Geometry &point_,const Color &fillColor_, + const Color &borderColor_,const bool invert_=false); + void floodFillColor(const ::ssize_t x_,const ::ssize_t y_, + const Color &fillColor_,const Color &borderColor_, + const bool invert_=false); + + // Flood-fill texture across pixels that match the color of the + // target pixel and are neighbors of the target pixel. + // Uses current fuzz setting when determining color match. + void floodFillTexture(const Geometry &point_,const Image &texture_, + const bool invert_=false); + void floodFillTexture(const ::ssize_t x_,const ::ssize_t y_, + const Image &texture_,const bool invert_=false); + + // Flood-fill texture across pixels starting at target-pixel and + // stopping at pixels matching specified border color. + // Uses current fuzz setting when determining color match. + void floodFillTexture(const Geometry &point_,const Image &texture_, + const Color &borderColor_,const bool invert_=false); + void floodFillTexture(const ::ssize_t x_,const ::ssize_t y_, + const Image &texture_,const Color &borderColor_, + const bool invert_=false); + + // Flop image (reflect each scanline in the horizontal direction) + void flop(void); + + // Obtain font metrics for text string given current font, + // pointsize, and density settings. + void fontTypeMetrics(const std::string &text_,TypeMetric *metrics); + + // Obtain multi line font metrics for text string given current font, + // pointsize, and density settings. + void fontTypeMetricsMultiline(const std::string &text_, + TypeMetric *metrics); + + // Frame image + void frame(const Geometry &geometry_=frameGeometryDefault); + void frame(const size_t width_,const size_t height_, + const ::ssize_t innerBevel_=6,const ::ssize_t outerBevel_=6); + + // Applies a mathematical expression to the image. + void fx(const std::string expression_); + void fx(const std::string expression_,const Magick::ChannelType channel_); + + // Gamma correct image + void gamma(const double gamma_); + void gamma(const double gammaRed_,const double gammaGreen_, + const double gammaBlue_); + + // Gaussian blur image + // The number of neighbor pixels to be included in the convolution + // mask is specified by 'radius_'. The standard deviation of the + // gaussian bell curve is specified by 'sigma_'. + void gaussianBlur(const double radius_,const double sigma_); + void gaussianBlurChannel(const ChannelType channel_,const double radius_, + const double sigma_); + + // Transfers read-only pixels from the image to the pixel cache as + // defined by the specified region. + const Quantum *getConstPixels(const ::ssize_t x_, const ::ssize_t y_, + const size_t columns_,const size_t rows_) const; + + // Obtain immutable image pixel metacontent. The selected region is defined + // by the prior getPixels(), getConstPixels(), or setPixels() call. + const void *getConstMetacontent(void) const; + + // Obtain mutable image pixel metacontent. The selected region is defined + // by a prior getPixels(), getConstPixels(), or setPixels() call. + void *getMetacontent(void); + + // Transfers pixels from the image to the pixel cache as defined + // by the specified region. Modified pixels may be subsequently + // transferred back to the image via syncPixels. This method is + // valid for DirectClass images. + Quantum *getPixels(const ::ssize_t x_,const ::ssize_t y_, + const size_t columns_,const size_t rows_); + + // Converts the colors in the image to gray. + void grayscale(const PixelIntensityMethod method_); + + // Apply a color lookup table (Hald CLUT) to the image. + void haldClut(const Image &clutImage_); + + // Identifies lines in the image. + void houghLine(const size_t width_,const size_t height_, + const size_t threshold_=40); + + // Identifies the potential color type of the image. This method can be + // used to detect if the type can be changed to GrayScale. + ImageType identifyType(void) const; + + // Implode image (special effect) + void implode(const double factor_); + + // Implements the inverse discrete Fourier transform (DFT) of the image + // either as a magnitude / phase or real / imaginary image pair. + void inverseFourierTransform(const Image &phase_); + void inverseFourierTransform(const Image &phase_,const bool magnitude_); + + // An edge preserving noise reduction filter. + void kuwahara(const double radius_=0.0,const double sigma_=1.0); + void kuwaharaChannel(const ChannelType channel_,const double radius_=0.0, + const double sigma_=1.0); + + // Level image. Adjust the levels of the image by scaling the + // colors falling between specified white and black points to the + // full available quantum range. The parameters provided represent + // the black, mid (gamma), and white points. The black point + // specifies the darkest color in the image. Colors darker than + // the black point are set to zero. Mid point (gamma) specifies a + // gamma correction to apply to the image. White point specifies + // the lightest color in the image. Colors brighter than the + // white point are set to the maximum quantum value. The black and + // white point have the valid range 0 to QuantumRange while mid (gamma) + // has a useful range of 0 to ten. + void level(const double blackPoint_,const double whitePoint_, + const double gamma_=1.0); + void levelChannel(const ChannelType channel_,const double blackPoint_, + const double whitePoint_,const double gamma_=1.0); + + // Maps the given color to "black" and "white" values, linearly spreading + // out the colors, and level values on a channel by channel bases, as + // per level(). The given colors allows you to specify different level + // ranges for each of the color channels separately. + void levelColors(const Color &blackColor_,const Color &whiteColor_, + const bool invert_=true); + void levelColorsChannel(const ChannelType channel_, + const Color &blackColor_,const Color &whiteColor_, + const bool invert_=true); + + // Levelize applies the reversed level operation to just the specific + // channels specified.It compresses the full range of color values, so + // that they lie between the given black and white points. Gamma is + // applied before the values are mapped. + void levelize(const double blackPoint_,const double whitePoint_, + const double gamma_=1.0); + void levelizeChannel(const ChannelType channel_,const double blackPoint_, + const double whitePoint_,const double gamma_=1.0); + + // Discards any pixels below the black point and above the white point and + // levels the remaining pixels. + void linearStretch(const double blackPoint_,const double whitePoint_); + + // Rescales image with seam carving. + void liquidRescale(const Geometry &geometry_); + + // Local contrast enhancement + void localContrast(const double radius_,const double strength_); + void localContrastChannel(const ChannelType channel_,const double radius_, + const double strength_); + + // Magnify image by integral size + void magnify(void); + + // Remap image colors with closest color from reference image + void map(const Image &mapImage_,const bool dither_=false); + + // Delineate arbitrarily shaped clusters in the image. + void meanShift(const size_t width_,const size_t height_, + const double color_distance_); + + // Filter image by replacing each pixel component with the median + // color in a circular neighborhood + void medianFilter(const double radius_=0.0); + + // Reduce image by integral size + void minify(void); + + // Modulate percent hue, saturation, and brightness of an image + void modulate(const double brightness_,const double saturation_, + const double hue_); + + // Returns the normalized moments of one or more image channels. + ImageMoments moments(void) const; + + // Applies a kernel to the image according to the given morphology method. + void morphology(const MorphologyMethod method_,const std::string kernel_, + const ssize_t iterations_=1); + void morphology(const MorphologyMethod method_, + const KernelInfoType kernel_,const std::string arguments_, + const ssize_t iterations_=1); + void morphologyChannel(const ChannelType channel_, + const MorphologyMethod method_,const std::string kernel_, + const ssize_t iterations_=1); + void morphologyChannel(const ChannelType channel_, + const MorphologyMethod method_,const KernelInfoType kernel_, + const std::string arguments_,const ssize_t iterations_=1); + + // Motion blur image with specified blur factor + // The radius_ parameter specifies the radius of the Gaussian, in + // pixels, not counting the center pixel. The sigma_ parameter + // specifies the standard deviation of the Laplacian, in pixels. + // The angle_ parameter specifies the angle the object appears + // to be coming from (zero degrees is from the right). + void motionBlur(const double radius_,const double sigma_, + const double angle_); + + // Negate colors in image. Set grayscale to only negate grayscale + // values in image. + void negate(const bool grayscale_=false); + void negateChannel(const ChannelType channel_,const bool grayscale_=false); + + // Normalize image (increase contrast by normalizing the pixel + // values to span the full range of color values) + void normalize(void); + + // Oilpaint image (image looks like oil painting) + void oilPaint(const double radius_=0.0,const double sigma=1.0); + + // Change color of opaque pixel to specified pen color. + void opaque(const Color &opaqueColor_,const Color &penColor_, + const bool invert_=false); + + // Perform a ordered dither based on a number of pre-defined dithering + // threshold maps, but over multiple intensity levels. + void orderedDither(std::string thresholdMap_); + void orderedDitherChannel(const ChannelType channel_, + std::string thresholdMap_); + + // Set each pixel whose value is less than epsilon to epsilon or + // -epsilon (whichever is closer) otherwise the pixel value remains + // unchanged. + void perceptible(const double epsilon_); + void perceptibleChannel(const ChannelType channel_,const double epsilon_); + + // Returns the perceptual hash for this image. + Magick::ImagePerceptualHash perceptualHash() const; + + // Ping is similar to read except only enough of the image is read + // to determine the image columns, rows, and filesize. Access the + // columns(), rows(), and fileSize() attributes after invoking + // ping. The image data is not valid after calling ping. + void ping(const std::string &imageSpec_); + + // Ping is similar to read except only enough of the image is read + // to determine the image columns, rows, and filesize. Access the + // columns(), rows(), and fileSize() attributes after invoking + // ping. The image data is not valid after calling ping. + void ping(const Blob &blob_); + + // Get/set pixel color at location x & y. + void pixelColor(const ::ssize_t x_,const ::ssize_t y_,const Color &color_); + Color pixelColor(const ::ssize_t x_,const ::ssize_t y_ ) const; + + // Simulates a Polaroid picture. + void polaroid(const std::string &caption_,const double angle_, + const PixelInterpolateMethod method_); + + // Reduces the image to a limited number of colors for a "poster" effect. + void posterize(const size_t levels_,const DitherMethod method_); + void posterizeChannel(const ChannelType channel_,const size_t levels_, + const DitherMethod method_); + + // Execute a named process module using an argc/argv syntax similar to + // that accepted by a C 'main' routine. An exception is thrown if the + // requested process module doesn't exist, fails to load, or fails during + // execution. + void process(std::string name_,const ::ssize_t argc_,const char **argv_); + + // Add or remove a named profile to/from the image. Remove the + // profile by passing an empty Blob (e.g. Blob()). Valid names are + // "*", "8BIM", "ICM", "IPTC", or a user/format-defined profile name. + void profile(const std::string name_,const Blob &colorProfile_); + + // Retrieve a named profile from the image. Valid names are: + // "8BIM", "8BIMTEXT", "APP1", "APP1JPEG", "ICC", "ICM", & "IPTC" + // or an existing user/format-defined profile name. + Blob profile(const std::string name_) const; + + // Quantize image (reduce number of colors) + void quantize(const bool measureError_=false); + + // Raise image (lighten or darken the edges of an image to give a + // 3-D raised or lowered effect) + void raise(const Geometry &geometry_=raiseGeometryDefault, + const bool raisedFlag_=false); + + // Random threshold image. + // + // Changes the value of individual pixels based on the intensity + // of each pixel compared to a random threshold. The result is a + // low-contrast, two color image. + void randomThreshold(const double low_,const double high_); + void randomThresholdChannel(const ChannelType channel_,const double low_, + const double high_); + + // Read single image frame from in-memory BLOB + void read(const Blob &blob_); + + // Read single image frame of specified size from in-memory BLOB + void read(const Blob &blob_,const Geometry &size_); + + // Read single image frame of specified size and depth from + // in-memory BLOB + void read(const Blob &blob_,const Geometry &size_,const size_t depth_); + + // Read single image frame of specified size, depth, and format + // from in-memory BLOB + void read(const Blob &blob_,const Geometry &size_,const size_t depth_, + const std::string &magick_); + + // Read single image frame of specified size, and format from + // in-memory BLOB + void read(const Blob &blob_,const Geometry &size_, + const std::string &magick_); + + // Read single image frame of specified size into current object + void read(const Geometry &size_,const std::string &imageSpec_); + + // Read single image frame from an array of raw pixels, with + // specified storage type (ConstituteImage), e.g. + // image.read( 640, 480, "RGB", 0, pixels ); + void read(const size_t width_,const size_t height_,const std::string &map_, + const StorageType type_,const void *pixels_); + + // Read single image frame into current object + void read(const std::string &imageSpec_); + + // Associate a mask with the image. The mask must be the same dimensions + // as the image. Pass an invalid image to unset an existing mask. + void readMask(const Image &mask_); + Image readMask(void) const; + + // Transfers one or more pixel components from a buffer or file + // into the image pixel cache of an image. + // Used to support image decoders. + void readPixels(const QuantumType quantum_,const unsigned char *source_); + + // Reduce noise in image using a noise peak elimination filter + void reduceNoise(void); + void reduceNoise(const size_t order_); + + // Resets the image page canvas and position. + void repage(); + + // Resize image in terms of its pixel size. + void resample(const Point &density_); + + // Resize image to specified size. + void resize(const Geometry &geometry_); + + // Roll image (rolls image vertically and horizontally) by specified + // number of columns and rows) + void roll(const Geometry &roll_); + void roll(const ssize_t columns_,const ssize_t rows_); + + // Rotate image clockwise by specified number of degrees. Specify a + // negative number for degrees to rotate counter-clockwise. + void rotate(const double degrees_); + + // Rotational blur image. + void rotationalBlur(const double angle_); + void rotationalBlurChannel(const ChannelType channel_,const double angle_); + + // Resize image by using pixel sampling algorithm + void sample(const Geometry &geometry_); + + // Resize image by using simple ratio algorithm + void scale(const Geometry &geometry_); + + // Segment (coalesce similar image components) by analyzing the + // histograms of the color components and identifying units that + // are homogeneous with the fuzzy c-means technique. Also uses + // QuantizeColorSpace and Verbose image attributes + void segment(const double clusterThreshold_=1.0, + const double smoothingThreshold_=1.5); + + // Selectively blur pixels within a contrast threshold. It is similar to + // the unsharpen mask that sharpens everything with contrast above a + // certain threshold. + void selectiveBlur(const double radius_,const double sigma_, + const double threshold_); + void selectiveBlurChannel(const ChannelType channel_,const double radius_, + const double sigma_,const double threshold_); + + // Separates a channel from the image and returns it as a grayscale image. + Image separate(const ChannelType channel_) const; + + // Applies a special effect to the image, similar to the effect achieved in + // a photo darkroom by sepia toning. Threshold ranges from 0 to + // QuantumRange and is a measure of the extent of the sepia toning. + // A threshold of 80% is a good starting point for a reasonable tone. + void sepiaTone(const double threshold_); + + // Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError + // in the current image. True is returned if the images are identical. + bool setColorMetric(const Image &reference_); + + // Allocates a pixel cache region to store image pixels as defined + // by the region rectangle. This area is subsequently transferred + // from the pixel cache to the image via syncPixels. + Quantum *setPixels(const ::ssize_t x_, const ::ssize_t y_, + const size_t columns_,const size_t rows_); + + // Shade image using distant light source + void shade(const double azimuth_=30,const double elevation_=30, + const bool colorShading_=false); + + // Simulate an image shadow + void shadow(const double percentAlpha_=80.0,const double sigma_=0.5, + const ssize_t x_=5,const ssize_t y_=5); + + // Sharpen pixels in image + // The radius_ parameter specifies the radius of the Gaussian, in + // pixels, not counting the center pixel. The sigma_ parameter + // specifies the standard deviation of the Laplacian, in pixels. + void sharpen(const double radius_=0.0,const double sigma_=1.0); + void sharpenChannel(const ChannelType channel_,const double radius_=0.0, + const double sigma_=1.0); + + // Shave pixels from image edges. + void shave(const Geometry &geometry_); + + // Shear image (create parallelogram by sliding image by X or Y axis) + void shear(const double xShearAngle_,const double yShearAngle_); + + // adjust the image contrast with a non-linear sigmoidal contrast algorithm + void sigmoidalContrast(const bool sharpen_,const double contrast, + const double midpoint=(double) QuantumRange/2.0); + + // Image signature. Set force_ to true in order to re-calculate + // the signature regardless of whether the image data has been + // modified. + std::string signature(const bool force_=false) const; + + // Simulates a pencil sketch. We convolve the image with a Gaussian + // operator of the given radius and standard deviation (sigma). For + // reasonable results, radius should be larger than sigma. Use a + // radius of 0 and SketchImage() selects a suitable radius for you. + void sketch(const double radius_=0.0,const double sigma_=1.0, + const double angle_=0.0); + + // Solarize image (similar to effect seen when exposing a + // photographic film to light during the development process) + void solarize(const double factor_=50.0); + + // Sparse color image, given a set of coordinates, interpolates the colors + // found at those coordinates, across the whole image, using various + // methods. + void sparseColor(const ChannelType channel_, + const SparseColorMethod method_,const size_t numberArguments_, + const double *arguments_); + + // Splice the background color into the image. + void splice(const Geometry &geometry_); + void splice(const Geometry &geometry_,const Color &backgroundColor_); + void splice(const Geometry &geometry_,const Color &backgroundColor_, + const GravityType gravity_); + + // Spread pixels randomly within image by specified amount + void spread(const double amount_=3.0); + + // Returns the statistics for this image. + Magick::ImageStatistics statistics() const; + + // Add a digital watermark to the image (based on second image) + void stegano(const Image &watermark_); + + // Create an image which appears in stereo when viewed with + // red-blue glasses (Red image on left, blue on right) + void stereo(const Image &rightImage_); + + // Strip strips an image of all profiles and comments. + void strip(void); + + // Search for the specified image at EVERY possible location in this image. + // This is slow! very very slow.. It returns a similarity image such that + // an exact match location is completely white and if none of the pixels + // match, black, otherwise some gray level in-between. + Image subImageSearch(const Image &reference_,const MetricType metric_, + Geometry *offset_,double *similarityMetric_, + const double similarityThreshold=(-1.0)); + + // Swirl image (image pixels are rotated by degrees) + void swirl(const double degrees_); + + // Transfers the image cache pixels to the image. + void syncPixels(void); + + // Channel a texture on image background + void texture(const Image &texture_); + + // Threshold image + void threshold(const double threshold_); + + // Resize image to thumbnail size + void thumbnail(const Geometry &geometry_); + + // Applies a color vector to each pixel in the image. The length of the + // vector is 0 for black and white and at its maximum for the midtones. + // The vector weighting function is f(x)=(1-(4.0*((x-0.5)*(x-0.5)))) + void tint(const std::string opacity_); + + // Origin of coordinate system to use when annotating with text or drawing + void transformOrigin(const double x_,const double y_); + + // Reset transformation parameters to default + void transformReset(void); + + // Scale to use when annotating with text or drawing + void transformScale(const double sx_,const double sy_); + + // Add matte image to image, setting pixels matching color to + // transparent + void transparent(const Color &color_,const bool inverse_=false); + + // Add matte image to image, for all the pixels that lies in between + // the given two color + void transparentChroma(const Color &colorLow_,const Color &colorHigh_); + + // Creates a horizontal mirror image by reflecting the pixels around the + // central y-axis while rotating them by 90 degrees. + void transpose(void); + + // Creates a vertical mirror image by reflecting the pixels around the + // central x-axis while rotating them by 270 degrees. + void transverse(void); + + // Trim edges that are the background color from the image + void trim(void); + + // Returns the unique colors of an image. + Image uniqueColors(void) const; + + // Replace image with a sharpened version of the original image + // using the unsharp mask algorithm. + // radius_ + // the radius of the Gaussian, in pixels, not counting the + // center pixel. + // sigma_ + // the standard deviation of the Gaussian, in pixels. + // amount_ + // the percentage of the difference between the original and + // the blur image that is added back into the original. + // threshold_ + // the threshold in pixels needed to apply the difference amount. + void unsharpmask(const double radius_,const double sigma_, + const double amount_,const double threshold_); + void unsharpmaskChannel(const ChannelType channel_,const double radius_, + const double sigma_,const double amount_,const double threshold_); + + // Softens the edges of the image in vignette style. + void vignette(const double radius_=0.0,const double sigma_=1.0, + const ssize_t x_=0,const ssize_t y_=0); + + // Map image pixels to a sine wave + void wave(const double amplitude_=25.0,const double wavelength_=150.0); + + // Removes noise from the image using a wavelet transform. + void waveletDenoise(const double threshold_,const double softness_); + + // Forces all pixels above the threshold into white while leaving all + // pixels at or below the threshold unchanged. + void whiteThreshold(const std::string &threshold_); + void whiteThresholdChannel(const ChannelType channel_, + const std::string &threshold_); + + // Write single image frame to in-memory BLOB, with optional + // format and adjoin parameters. + void write(Blob *blob_); + void write(Blob *blob_,const std::string &magick_); + void write(Blob *blob_,const std::string &magick_,const size_t depth_); + + // Write single image frame to an array of pixels with storage + // type specified by user (DispatchImage), e.g. + // image.write( 0, 0, 640, 1, "RGB", 0, pixels ); + void write(const ::ssize_t x_,const ::ssize_t y_,const size_t columns_, + const size_t rows_,const std::string &map_,const StorageType type_, + void *pixels_); + + // Write single image frame to a file + void write(const std::string &imageSpec_); + + // Associate a mask with the image. The mask must be the same dimensions + // as the image. Pass an invalid image to unset an existing mask. + void writeMask(const Image &mask_); + Image writeMask(void) const; + + // Transfers one or more pixel components from the image pixel + // cache to a buffer or file. + // Used to support image encoders. + void writePixels(const QuantumType quantum_,unsigned char *destination_); + + // Zoom image to specified size. + void zoom(const Geometry &geometry_); + + ////////////////////////////////////////////////////////////////////// + // + // No user-serviceable parts beyond this point + // + ////////////////////////////////////////////////////////////////////// + + // Construct with MagickCore::Image and default options + Image(MagickCore::Image *image_); + + // Retrieve Image* + MagickCore::Image *&image(void); + const MagickCore::Image *constImage(void) const; + + // Retrieve ImageInfo* + MagickCore::ImageInfo *imageInfo(void); + const MagickCore::ImageInfo *constImageInfo(void) const; + + // Retrieve Options* + Options *options(void); + const Options *constOptions(void) const; + + // Retrieve QuantizeInfo* + MagickCore::QuantizeInfo *quantizeInfo(void); + const MagickCore::QuantizeInfo *constQuantizeInfo(void) const; + + // Prepare to update image (copy if reference > 1) + void modifyImage(void); + + // Replace current image (reference counted) + MagickCore::Image *replaceImage(MagickCore::Image *replacement_); + + private: + + void floodFill(const ssize_t x_,const ssize_t y_, + const Magick::Image *fillPattern_,const Color &fill_, + const PixelInfo *target,const bool invert_); + + void mask(const Image &mask_,const PixelMask); + Image mask(const PixelMask) const; + + void read(MagickCore::Image *image, + MagickCore::ExceptionInfo *exceptionInfo); + + ImageRef *_imgRef; + }; + +} // end of namespace Magick + +#endif // Magick_Image_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Include.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Include.h new file mode 100644 index 0000000000..d7e4a9607c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Include.h @@ -0,0 +1,1582 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002 +// +// Copyright @ 2013 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Inclusion of ImageMagick headers (with namespace magic) + +#ifndef Magick_Include_header +#define Magick_Include_header + +#if !defined(_MAGICK_CONFIG_H) +# define _MAGICK_CONFIG_H +# if !defined(vms) +# include "MagickCore/magick-config.h" +# else +# include "magick-config.h" +# endif +# undef inline // Remove possible definition from config.h +# undef class +#endif + +// Needed for stdio FILE +#include +#include +#include +#include +#include +#include + +#include +#include + +// +// Include ImageMagick headers into namespace "MagickCore". If +// MAGICKCORE_IMPLEMENTATION is defined, include ImageMagick development +// headers. This scheme minimizes the possibility of conflict with +// user code. +// +namespace MagickCore +{ +#include +#include +#undef inline // Remove possible definition from config.h + +#undef class +} + +// +// Provide appropriate DLL imports/exports for Visual C++, +// Borland C++Builder and MinGW builds. +// +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# define MagickCplusPlusDLLSupported +#endif +#if defined(MagickCplusPlusDLLSupported) +# if defined(_MT) && defined(_DLL) && !defined(_LIB) && !defined(STATIC_MAGICK) +// +// In a native Windows build, the following defines are used: +// +// _MT = Multithreaded +// _DLL = Using code is part of a DLL +// _LIB = Using code is being built as a library. +// _MAGICKMOD_ = Build uses loadable modules (Magick++ does not care about this) +// +// In the case where ImageMagick is built as a static library but the +// using code is dynamic, STATIC_MAGICK may be defined in the project to +// override triggering dynamic library behavior. +// +# if defined(_VISUALC_) +# define MagickDLLExplicitTemplate +# pragma warning( disable: 4275 ) +# pragma warning( disable: 4273 ) /* Disable the stupid dll linkage warnings */ +# pragma warning( disable: 4251 ) +# endif +# if !defined(MAGICKCORE_IMPLEMENTATION) +# if defined(__GNUC__) +# define MagickPPExport __attribute__ ((dllimport)) +# else +# define MagickPPExport __declspec(dllimport) +# endif +# define MagickPPPrivate extern __declspec(dllimport) +# else +# if defined(__BORLANDC__) || defined(__MINGW32__) +# define MagickPPExport __declspec(dllexport) +# define MagickPPPrivate __declspec(dllexport) +# else +# if defined(__GNUC__) +# define MagickPPExport __attribute__ ((dllexport)) +# else +# define MagickPPExport __declspec(dllexport) +# endif +# define MagickPPPrivate extern __declspec(dllexport) +# endif +# endif +# else +# define MagickPPExport +# define MagickPPPrivate +# if defined(_MSC_VER) && defined(STATIC_MAGICK) && !defined(NOAUTOLINK_MAGICK) +# if defined(_DEBUG) +# if defined(MAGICKCORE_BZLIB_DELEGATE) +# pragma comment(lib, "CORE_DB_bzlib_.lib") +# endif +# if defined(MAGICKCORE_CAIRO_DELEGATE) +# pragma comment(lib, "CORE_DB_cairo_.lib") +# endif +# if defined(MAGICKCORE_OPENEXR_DELEGATE) +# pragma comment(lib, "CORE_DB_deflate_.lib") +# pragma comment(lib, "CORE_DB_exr_.lib") +# endif +# if defined(MAGICKCORE_FLIF_DELEGATE) +# pragma comment(lib, "CORE_DB_flif_.lib") +# endif +# if defined(MAGICKCORE_FREETYPE_DELEGATE) +# pragma comment(lib, "CORE_DB_freetype_.lib") +# endif +# if defined(MAGICKCORE_JBIG_DELEGATE) +# pragma comment(lib, "CORE_DB_jbig_.lib") +# endif +# if defined(MAGICKCORE_JP2_DELEGATE) +# pragma comment(lib, "CORE_DB_jasper_.lib") +# endif +# if defined(MAGICKCORE_JPEG_DELEGATE) +# pragma comment(lib, "CORE_DB_jpeg-turbo_.lib") +# endif +# if defined(MAGICKCORE_JXL_DELEGATE) +# pragma comment(lib, "CORE_DB_highway_.lib") +# pragma comment(lib, "CORE_DB_brotli_.lib") +# pragma comment(lib, "CORE_DB_jpeg-xl_.lib") +# endif +# if defined(MAGICKCORE_LCMS_DELEGATE) +# pragma comment(lib, "CORE_DB_lcms_.lib") +# endif +# if defined(MAGICKCORE_HEIC_DELEGATE) +# pragma comment(lib, "CORE_DB_aom_.lib") +# pragma comment(lib, "CORE_DB_de265_.lib") +# pragma comment(lib, "CORE_DB_heif_.lib") +# endif +# if defined(MAGICKCORE_LZMA_DELEGATE) +# pragma comment(lib, "CORE_DB_lzma_.lib") +# endif +# if defined(MAGICKCORE_RAW_R_DELEGATE) +# pragma comment(lib, "CORE_DB_raw_.lib") +# endif +# if defined(MAGICKCORE_RSVG_DELEGATE) +# pragma comment(lib, "CORE_DB_croco_.lib") +# pragma comment(lib, "CORE_DB_rsvg_.lib") +# endif +# if defined(MAGICKCORE_XML_DELEGATE) +# pragma comment(lib, "CORE_DB_xml_.lib") +# endif +# if defined(MAGICKCORE_ZIP_DELEGATE) +# pragma comment(lib, "CORE_DB_zip_.lib") +# endif +# if defined(MAGICKCORE_LQR_DELEGATE) +# pragma comment(lib, "CORE_DB_ffi_.lib") +# pragma comment(lib, "CORE_DB_glib_.lib") +# pragma comment(lib, "CORE_DB_lqr_.lib") +# pragma comment(lib, "winmm.lib") +# endif +# if defined(MAGICKCORE_LIBOPENJP2_DELEGATE) +# pragma comment(lib, "CORE_DB_openjpeg_.lib") +# endif +# if defined(MAGICKCORE_PANGOCAIRO_DELEGATE) +# pragma comment(lib, "CORE_DB_fribidi_.lib") +# pragma comment(lib, "CORE_DB_harfbuzz_.lib") +# pragma comment(lib, "CORE_DB_pango_.lib") +# pragma comment(lib, "CORE_DB_pixman_.lib") +# endif +# if defined(MAGICKCORE_PNG_DELEGATE) +# pragma comment(lib, "CORE_DB_png_.lib") +# endif +# if defined(MAGICKCORE_RAQM_DELEGATE) +# pragma comment(lib, "CORE_DB_raqm_.lib") +# endif +# if defined(MAGICKCORE_TIFF_DELEGATE) +# pragma comment(lib, "CORE_DB_tiff_.lib") +# endif +# if defined(MAGICKCORE_WEBP_DELEGATE) +# pragma comment(lib, "CORE_DB_webp_.lib") +# endif +# if defined(MAGICKCORE_ZLIB_DELEGATE) +# pragma comment(lib, "CORE_DB_zlib_.lib") +# endif +# pragma comment(lib, "CORE_DB_coders_.lib") +# pragma comment(lib, "CORE_DB_filters_.lib") +# pragma comment(lib, "CORE_DB_Magick++_.lib") +# pragma comment(lib, "CORE_DB_MagickCore_.lib") +# pragma comment(lib, "CORE_DB_MagickWand_.lib") +# else +# if defined(MAGICKCORE_BZLIB_DELEGATE) +# pragma comment(lib, "CORE_RL_bzlib_.lib") +# endif +# if defined(MAGICKCORE_CAIRO_DELEGATE) +# pragma comment(lib, "CORE_RL_cairo_.lib") +# endif +# if defined(MAGICKCORE_OPENEXR_DELEGATE) +# pragma comment(lib, "CORE_RL_deflate_.lib") +# pragma comment(lib, "CORE_RL_exr_.lib") +# endif +# if defined(MAGICKCORE_FLIF_DELEGATE) +# pragma comment(lib, "CORE_RL_flif_.lib") +# endif +# if defined(MAGICKCORE_FREETYPE_DELEGATE) +# pragma comment(lib, "CORE_RL_freetype_.lib") +# endif +# if defined(MAGICKCORE_JBIG_DELEGATE) +# pragma comment(lib, "CORE_RL_jbig_.lib") +# endif +# if defined(MAGICKCORE_JP2_DELEGATE) +# pragma comment(lib, "CORE_RL_jasper_.lib") +# endif +# if defined(MAGICKCORE_JPEG_DELEGATE) +# pragma comment(lib, "CORE_RL_jpeg-turbo_.lib") +# endif +# if defined(MAGICKCORE_JXL_DELEGATE) +# pragma comment(lib, "CORE_RL_highway_.lib") +# pragma comment(lib, "CORE_RL_brotli_.lib") +# pragma comment(lib, "CORE_RL_jpeg-xl_.lib") +# endif +# if defined(MAGICKCORE_LCMS_DELEGATE) +# pragma comment(lib, "CORE_RL_lcms_.lib") +# endif +# if defined(MAGICKCORE_HEIC_DELEGATE) +# pragma comment(lib, "CORE_RL_aom_.lib") +# pragma comment(lib, "CORE_RL_de265_.lib") +# pragma comment(lib, "CORE_RL_heif_.lib") +# endif +# if defined(MAGICKCORE_LZMA_DELEGATE) +# pragma comment(lib, "CORE_RL_lzma_.lib") +# endif +# if defined(MAGICKCORE_RAW_R_DELEGATE) +# pragma comment(lib, "CORE_RL_raw_.lib") +# endif +# if defined(MAGICKCORE_RSVG_DELEGATE) +# pragma comment(lib, "CORE_RL_croco_.lib") +# pragma comment(lib, "CORE_RL_rsvg_.lib") +# endif +# if defined(MAGICKCORE_XML_DELEGATE) +# pragma comment(lib, "CORE_RL_xml_.lib") +# endif +# if defined(MAGICKCORE_ZIP_DELEGATE) +# pragma comment(lib, "CORE_RL_zip_.lib") +# endif +# if defined(MAGICKCORE_LQR_DELEGATE) +# pragma comment(lib, "CORE_RL_ffi_.lib") +# pragma comment(lib, "CORE_RL_glib_.lib") +# pragma comment(lib, "CORE_RL_lqr_.lib") +# pragma comment(lib, "winmm.lib") +# endif +# if defined(MAGICKCORE_LIBOPENJP2_DELEGATE) +# pragma comment(lib, "CORE_RL_openjpeg_.lib") +# endif +# if defined(MAGICKCORE_PANGOCAIRO_DELEGATE) +# pragma comment(lib, "CORE_RL_fribidi_.lib") +# pragma comment(lib, "CORE_RL_harfbuzz_.lib") +# pragma comment(lib, "CORE_RL_pango_.lib") +# pragma comment(lib, "CORE_RL_pixman_.lib") +# endif +# if defined(MAGICKCORE_PNG_DELEGATE) +# pragma comment(lib, "CORE_RL_png_.lib") +# endif +# if defined(MAGICKCORE_RAQM_DELEGATE) +# pragma comment(lib, "CORE_RL_raqm_.lib") +# endif +# if defined(MAGICKCORE_TIFF_DELEGATE) +# pragma comment(lib, "CORE_RL_tiff_.lib") +# endif +# if defined(MAGICKCORE_WEBP_DELEGATE) +# pragma comment(lib, "CORE_RL_webp_.lib") +# endif +# if defined(MAGICKCORE_ZLIB_DELEGATE) +# pragma comment(lib, "CORE_RL_zlib_.lib") +# endif +# pragma comment(lib, "CORE_RL_coders_.lib") +# pragma comment(lib, "CORE_RL_filters_.lib") +# pragma comment(lib, "CORE_RL_Magick++_.lib") +# pragma comment(lib, "CORE_RL_MagickCore_.lib") +# pragma comment(lib, "CORE_RL_MagickWand_.lib") +# endif +# if defined(_WIN32_WCE) +# pragma comment(lib, "wsock32.lib") +# else +# pragma comment(lib, "ws2_32.lib") +# endif +# pragma comment(lib, "urlmon.lib") +# endif +# endif +#else +# if __GNUC__ >= 4 +# define MagickPPExport __attribute__ ((visibility ("default"))) +# define MagickPPPrivate __attribute__ ((visibility ("hidden"))) +# else +# define MagickPPExport +# define MagickPPPrivate +# endif +#endif + +#if (defined(WIN32) || defined(WIN64)) && defined(_VISUALC_) +# pragma warning(disable : 4996) /* function deprecation warnings */ +#endif + +// +// Import ImageMagick symbols and types which are used as part of the +// Magick++ API definition into namespace "Magick". +// +namespace Magick +{ + // The datatype for an RGB component + using MagickCore::Quantum; + using MagickCore::MagickRealType; + using MagickCore::MagickSizeType; + using MagickCore::MagickStatusType; + + // Structures + using MagickCore::AffineMatrix; + using MagickCore::CacheView; + using MagickCore::CCObjectInfo; + using MagickCore::DrawInfo; + using MagickCore::DrawingWand; + using MagickCore::ExceptionInfo; + using MagickCore::FrameInfo; + using MagickCore::ImageInfo; + using MagickCore::KernelInfo; + using MagickCore::LinkedListInfo; + using MagickCore::MagickInfo; + using MagickCore::MagickWand; + using MagickCore::MontageInfo; + using MagickCore::OffsetInfo; + using MagickCore::PixelInfo; + using MagickCore::PixelWand; + using MagickCore::PointInfo; + using MagickCore::ProfileInfo; + using MagickCore::QuantizeInfo; + using MagickCore::QuantumInfo; + using MagickCore::RectangleInfo; + using MagickCore::StringInfo; + + // Alignment types. + using MagickCore::AlignType; + using MagickCore::UndefinedAlign; + using MagickCore::LeftAlign; + using MagickCore::CenterAlign; + using MagickCore::RightAlign; + + // Alpha channel options + using MagickCore::AlphaChannelOption; + using MagickCore::UndefinedAlphaChannel; + using MagickCore::ActivateAlphaChannel; + using MagickCore::AssociateAlphaChannel; + using MagickCore::BackgroundAlphaChannel; + using MagickCore::CopyAlphaChannel; + using MagickCore::DeactivateAlphaChannel; + using MagickCore::DiscreteAlphaChannel; + using MagickCore::DisassociateAlphaChannel; + using MagickCore::ExtractAlphaChannel; + using MagickCore::OffAlphaChannel; + using MagickCore::OnAlphaChannel; + using MagickCore::OpaqueAlphaChannel; + using MagickCore::RemoveAlphaChannel; + using MagickCore::SetAlphaChannel; + using MagickCore::ShapeAlphaChannel; + using MagickCore::TransparentAlphaChannel; + + // Auto threshold methods + using MagickCore::AutoThresholdMethod; + using MagickCore::UndefinedThresholdMethod; + using MagickCore::KapurThresholdMethod; + using MagickCore::OTSUThresholdMethod; + using MagickCore::TriangleThresholdMethod; + + // Channel types + using MagickCore::ChannelType; + using MagickCore::UndefinedChannel; + using MagickCore::RedChannel; + using MagickCore::GrayChannel; + using MagickCore::CyanChannel; + using MagickCore::GreenChannel; + using MagickCore::MagentaChannel; + using MagickCore::BlueChannel; + using MagickCore::YellowChannel; + using MagickCore::BlackChannel; + using MagickCore::AlphaChannel; + using MagickCore::OpacityChannel; + using MagickCore::IndexChannel; + using MagickCore::ReadMaskChannel; + using MagickCore::WriteMaskChannel; + using MagickCore::MetaChannel; + using MagickCore::CompositeChannels; + using MagickCore::AllChannels; + using MagickCore::TrueAlphaChannel; + using MagickCore::RGBChannels; + using MagickCore::GrayChannels; + using MagickCore::SyncChannels; + using MagickCore::DefaultChannels; + + // Image class types + using MagickCore::ClassType; + using MagickCore::UndefinedClass; + using MagickCore::DirectClass; + using MagickCore::PseudoClass; + + // Clip path units + using MagickCore::ClipPathUnits; + using MagickCore::UndefinedPathUnits; + using MagickCore::UserSpace; + using MagickCore::UserSpaceOnUse; + using MagickCore::ObjectBoundingBox; + + // Color-space types + using MagickCore::ColorspaceType; + using MagickCore::UndefinedColorspace; + using MagickCore::CMYColorspace; + using MagickCore::CMYKColorspace; + using MagickCore::GRAYColorspace; + using MagickCore::HCLColorspace; + using MagickCore::HCLpColorspace; + using MagickCore::HSBColorspace; + using MagickCore::HSIColorspace; + using MagickCore::HSLColorspace; + using MagickCore::HSVColorspace; + using MagickCore::HWBColorspace; + using MagickCore::LabColorspace; + using MagickCore::LCHColorspace; + using MagickCore::LCHabColorspace; + using MagickCore::LCHuvColorspace; + using MagickCore::LogColorspace; + using MagickCore::LMSColorspace; + using MagickCore::LuvColorspace; + using MagickCore::OHTAColorspace; + using MagickCore::Rec601YCbCrColorspace; + using MagickCore::Rec709YCbCrColorspace; + using MagickCore::RGBColorspace; + using MagickCore::scRGBColorspace; + using MagickCore::sRGBColorspace; + using MagickCore::TransparentColorspace; + using MagickCore::xyYColorspace; + using MagickCore::XYZColorspace; + using MagickCore::YCbCrColorspace; + using MagickCore::YCCColorspace; + using MagickCore::YDbDrColorspace; + using MagickCore::YIQColorspace; + using MagickCore::YPbPrColorspace; + using MagickCore::YUVColorspace; + using MagickCore::LinearGRAYColorspace; + + // Command options + using MagickCore::CommandOption; + using MagickCore::MagickDirectionOptions; + using MagickCore::MagickGravityOptions; + using MagickCore::MagickKernelOptions; + using MagickCore::MagickStyleOptions; + + // Compliance types + using MagickCore::ComplianceType; + using MagickCore::AllCompliance; + + // Composition operations + using MagickCore::CompositeOperator; + using MagickCore::AlphaCompositeOp; + using MagickCore::AtopCompositeOp; + using MagickCore::BlendCompositeOp; + using MagickCore::BlurCompositeOp; + using MagickCore::BumpmapCompositeOp; + using MagickCore::ChangeMaskCompositeOp; + using MagickCore::ClearCompositeOp; + using MagickCore::ColorBurnCompositeOp; + using MagickCore::ColorDodgeCompositeOp; + using MagickCore::ColorizeCompositeOp; + using MagickCore::CopyBlackCompositeOp; + using MagickCore::CopyBlueCompositeOp; + using MagickCore::CopyCompositeOp; + using MagickCore::CopyCyanCompositeOp; + using MagickCore::CopyGreenCompositeOp; + using MagickCore::CopyMagentaCompositeOp; + using MagickCore::CopyAlphaCompositeOp; + using MagickCore::CopyRedCompositeOp; + using MagickCore::CopyYellowCompositeOp; + using MagickCore::DarkenCompositeOp; + using MagickCore::DarkenIntensityCompositeOp; + using MagickCore::DifferenceCompositeOp; + using MagickCore::DisplaceCompositeOp; + using MagickCore::DissolveCompositeOp; + using MagickCore::DistortCompositeOp; + using MagickCore::DivideDstCompositeOp; + using MagickCore::DivideSrcCompositeOp; + using MagickCore::DstAtopCompositeOp; + using MagickCore::DstCompositeOp; + using MagickCore::DstInCompositeOp; + using MagickCore::DstOutCompositeOp; + using MagickCore::DstOverCompositeOp; + using MagickCore::ExclusionCompositeOp; + using MagickCore::HardLightCompositeOp; + using MagickCore::HardMixCompositeOp; + using MagickCore::HueCompositeOp; + using MagickCore::InCompositeOp; + using MagickCore::IntensityCompositeOp; + using MagickCore::LightenCompositeOp; + using MagickCore::LightenIntensityCompositeOp; + using MagickCore::LinearBurnCompositeOp; + using MagickCore::LinearDodgeCompositeOp; + using MagickCore::LinearLightCompositeOp; + using MagickCore::LuminizeCompositeOp; + using MagickCore::MathematicsCompositeOp; + using MagickCore::MinusDstCompositeOp; + using MagickCore::MinusSrcCompositeOp; + using MagickCore::ModulateCompositeOp; + using MagickCore::ModulusAddCompositeOp; + using MagickCore::ModulusSubtractCompositeOp; + using MagickCore::MultiplyCompositeOp; + using MagickCore::NoCompositeOp; + using MagickCore::OutCompositeOp; + using MagickCore::OverCompositeOp; + using MagickCore::OverlayCompositeOp; + using MagickCore::PegtopLightCompositeOp; + using MagickCore::PinLightCompositeOp; + using MagickCore::PlusCompositeOp; + using MagickCore::ReplaceCompositeOp; + using MagickCore::SaturateCompositeOp; + using MagickCore::ScreenCompositeOp; + using MagickCore::SoftLightCompositeOp; + using MagickCore::SrcAtopCompositeOp; + using MagickCore::SrcCompositeOp; + using MagickCore::SrcInCompositeOp; + using MagickCore::SrcOutCompositeOp; + using MagickCore::SrcOverCompositeOp; + using MagickCore::ThresholdCompositeOp; + using MagickCore::UndefinedCompositeOp; + using MagickCore::VividLightCompositeOp; + using MagickCore::XorCompositeOp; + + // Compression algorithms + using MagickCore::CompressionType; + using MagickCore::UndefinedCompression; + using MagickCore::NoCompression; + using MagickCore::B44ACompression; + using MagickCore::B44Compression; + using MagickCore::BZipCompression; + using MagickCore::DWAACompression; + using MagickCore::DWABCompression; + using MagickCore::DXT1Compression; + using MagickCore::DXT3Compression; + using MagickCore::DXT5Compression; + using MagickCore::BC7Compression; + using MagickCore::FaxCompression; + using MagickCore::Group4Compression; + using MagickCore::JBIG1Compression; + using MagickCore::JBIG2Compression; + using MagickCore::JPEG2000Compression; + using MagickCore::JPEGCompression; + using MagickCore::LosslessJPEGCompression; + using MagickCore::LZMACompression; + using MagickCore::LZWCompression; + using MagickCore::PizCompression; + using MagickCore::Pxr24Compression; + using MagickCore::RLECompression; + using MagickCore::WebPCompression; + using MagickCore::ZipCompression; + using MagickCore::ZipSCompression; + using MagickCore::ZstdCompression; + + // Decoration types + using MagickCore::DecorationType; + using MagickCore::UndefinedDecoration; + using MagickCore::NoDecoration; + using MagickCore::UnderlineDecoration; + using MagickCore::OverlineDecoration; + using MagickCore::LineThroughDecoration; + + // Direction types + using MagickCore::DirectionType; + using MagickCore::UndefinedDirection; + using MagickCore::RightToLeftDirection; + using MagickCore::LeftToRightDirection; + + // Dispose methods + using MagickCore::DisposeType; + using MagickCore::UndefinedDispose; + using MagickCore::NoneDispose; + using MagickCore::BackgroundDispose; + using MagickCore::PreviousDispose; + + // Distort methods + using MagickCore::DistortMethod; + using MagickCore::UndefinedDistortion; + using MagickCore::AffineDistortion; + using MagickCore::AffineProjectionDistortion; + using MagickCore::ScaleRotateTranslateDistortion; + using MagickCore::PerspectiveDistortion; + using MagickCore::PerspectiveProjectionDistortion; + using MagickCore::BilinearForwardDistortion; + using MagickCore::BilinearDistortion; + using MagickCore::BilinearReverseDistortion; + using MagickCore::PolynomialDistortion; + using MagickCore::ArcDistortion; + using MagickCore::PolarDistortion; + using MagickCore::DePolarDistortion; + using MagickCore::Cylinder2PlaneDistortion; + using MagickCore::Plane2CylinderDistortion; + using MagickCore::BarrelDistortion; + using MagickCore::BarrelInverseDistortion; + using MagickCore::ShepardsDistortion; + using MagickCore::ResizeDistortion; + using MagickCore::SentinelDistortion; + + // Dither methods + using MagickCore::DitherMethod; + using MagickCore::UndefinedDitherMethod; + using MagickCore::NoDitherMethod; + using MagickCore::RiemersmaDitherMethod; + using MagickCore::FloydSteinbergDitherMethod; + + // Endian options + using MagickCore::EndianType; + using MagickCore::UndefinedEndian; + using MagickCore::LSBEndian; + using MagickCore::MSBEndian; + + // Boolean types + using MagickCore::MagickBooleanType; + using MagickCore::MagickFalse; + using MagickCore::MagickTrue; + + // Evaluate options + using MagickCore::MagickEvaluateOperator; + using MagickCore::UndefinedEvaluateOperator; + using MagickCore::AbsEvaluateOperator; + using MagickCore::AddEvaluateOperator; + using MagickCore::AddModulusEvaluateOperator; + using MagickCore::AndEvaluateOperator; + using MagickCore::CosineEvaluateOperator; + using MagickCore::DivideEvaluateOperator; + using MagickCore::ExponentialEvaluateOperator; + using MagickCore::GaussianNoiseEvaluateOperator; + using MagickCore::ImpulseNoiseEvaluateOperator; + using MagickCore::LaplacianNoiseEvaluateOperator; + using MagickCore::LeftShiftEvaluateOperator; + using MagickCore::LogEvaluateOperator; + using MagickCore::MaxEvaluateOperator; + using MagickCore::MeanEvaluateOperator; + using MagickCore::MedianEvaluateOperator; + using MagickCore::MinEvaluateOperator; + using MagickCore::MultiplicativeNoiseEvaluateOperator; + using MagickCore::MultiplyEvaluateOperator; + using MagickCore::OrEvaluateOperator; + using MagickCore::PoissonNoiseEvaluateOperator; + using MagickCore::PowEvaluateOperator; + using MagickCore::RootMeanSquareEvaluateOperator; + using MagickCore::RightShiftEvaluateOperator; + using MagickCore::SetEvaluateOperator; + using MagickCore::SineEvaluateOperator; + using MagickCore::SubtractEvaluateOperator; + using MagickCore::SumEvaluateOperator; + using MagickCore::ThresholdBlackEvaluateOperator; + using MagickCore::ThresholdEvaluateOperator; + using MagickCore::ThresholdWhiteEvaluateOperator; + using MagickCore::UniformNoiseEvaluateOperator; + using MagickCore::XorEvaluateOperator; + + // Fill rules + using MagickCore::FillRule; + using MagickCore::UndefinedRule; + using MagickCore::EvenOddRule; + using MagickCore::NonZeroRule; + + // Filter types + using MagickCore::FilterType; + using MagickCore::UndefinedFilter; + using MagickCore::PointFilter; + using MagickCore::BoxFilter; + using MagickCore::TriangleFilter; + using MagickCore::HermiteFilter; + using MagickCore::HannFilter; + using MagickCore::HammingFilter; + using MagickCore::BlackmanFilter; + using MagickCore::GaussianFilter; + using MagickCore::QuadraticFilter; + using MagickCore::CubicFilter; + using MagickCore::CatromFilter; + using MagickCore::MitchellFilter; + using MagickCore::JincFilter; + using MagickCore::SincFilter; + using MagickCore::SincFastFilter; + using MagickCore::KaiserFilter; + using MagickCore::WelchFilter; + using MagickCore::ParzenFilter; + using MagickCore::BohmanFilter; + using MagickCore::BartlettFilter; + using MagickCore::LagrangeFilter; + using MagickCore::LanczosFilter; + using MagickCore::LanczosSharpFilter; + using MagickCore::Lanczos2Filter; + using MagickCore::Lanczos2SharpFilter; + using MagickCore::RobidouxFilter; + using MagickCore::RobidouxSharpFilter; + using MagickCore::CosineFilter; + using MagickCore::SplineFilter; + using MagickCore::LanczosRadiusFilter; + using MagickCore::SentinelFilter; + + // Geometry flags; + using MagickCore::GeometryFlags; + using MagickCore::AreaValue; + using MagickCore::AspectValue; + using MagickCore::GreaterValue; + using MagickCore::HeightValue; + using MagickCore::LessValue; + using MagickCore::MinimumValue; + using MagickCore::NoValue; + using MagickCore::PercentValue; + using MagickCore::WidthValue; + using MagickCore::XNegative; + using MagickCore::XValue; + using MagickCore::YNegative; + using MagickCore::YValue; + + // Bit gravity + using MagickCore::GravityType; + using MagickCore::UndefinedGravity; + using MagickCore::ForgetGravity; + using MagickCore::NorthWestGravity; + using MagickCore::NorthGravity; + using MagickCore::NorthEastGravity; + using MagickCore::WestGravity; + using MagickCore::CenterGravity; + using MagickCore::EastGravity; + using MagickCore::SouthWestGravity; + using MagickCore::SouthGravity; + using MagickCore::SouthEastGravity; + + // Image types + using MagickCore::ImageType; + using MagickCore::UndefinedType; + using MagickCore::BilevelType; + using MagickCore::GrayscaleType; + using MagickCore::GrayscaleAlphaType; + using MagickCore::PaletteType; + using MagickCore::PaletteAlphaType; + using MagickCore::TrueColorType; + using MagickCore::TrueColorAlphaType; + using MagickCore::ColorSeparationType; + using MagickCore::ColorSeparationAlphaType; + using MagickCore::OptimizeType; + using MagickCore::PaletteBilevelAlphaType; + + // Interlace types + using MagickCore::InterlaceType; + using MagickCore::UndefinedInterlace; + using MagickCore::NoInterlace; + using MagickCore::LineInterlace; + using MagickCore::PlaneInterlace; + using MagickCore::PartitionInterlace; + using MagickCore::GIFInterlace; + using MagickCore::JPEGInterlace; + using MagickCore::PNGInterlace; + + // Built-in kernels + using MagickCore::KernelInfoType; + using MagickCore::UndefinedKernel; + using MagickCore::UnityKernel; + using MagickCore::GaussianKernel; + using MagickCore::DoGKernel; + using MagickCore::LoGKernel; + using MagickCore::BlurKernel; + using MagickCore::CometKernel; + using MagickCore::BinomialKernel; + using MagickCore::LaplacianKernel; + using MagickCore::SobelKernel; + using MagickCore::FreiChenKernel; + using MagickCore::RobertsKernel; + using MagickCore::PrewittKernel; + using MagickCore::CompassKernel; + using MagickCore::KirschKernel; + using MagickCore::DiamondKernel; + using MagickCore::SquareKernel; + using MagickCore::RectangleKernel; + using MagickCore::OctagonKernel; + using MagickCore::DiskKernel; + using MagickCore::PlusKernel; + using MagickCore::CrossKernel; + using MagickCore::RingKernel; + using MagickCore::PeaksKernel; + using MagickCore::EdgesKernel; + using MagickCore::CornersKernel; + using MagickCore::DiagonalsKernel; + using MagickCore::LineEndsKernel; + using MagickCore::LineJunctionsKernel; + using MagickCore::RidgesKernel; + using MagickCore::ConvexHullKernel; + using MagickCore::ThinSEKernel; + using MagickCore::SkeletonKernel; + using MagickCore::ChebyshevKernel; + using MagickCore::ManhattanKernel; + using MagickCore::OctagonalKernel; + using MagickCore::EuclideanKernel; + using MagickCore::UserDefinedKernel; + + // Layer method + using MagickCore::LayerMethod; + using MagickCore::UndefinedLayer; + using MagickCore::CoalesceLayer; + using MagickCore::CompareAnyLayer; + using MagickCore::CompareClearLayer; + using MagickCore::CompareOverlayLayer; + using MagickCore::DisposeLayer; + using MagickCore::OptimizeLayer; + using MagickCore::OptimizeImageLayer; + using MagickCore::OptimizePlusLayer; + using MagickCore::OptimizeTransLayer; + using MagickCore::RemoveDupsLayer; + using MagickCore::RemoveZeroLayer; + using MagickCore::CompositeLayer; + using MagickCore::MergeLayer; + using MagickCore::FlattenLayer; + using MagickCore::MosaicLayer; + using MagickCore::TrimBoundsLayer; + + // Line cap types + using MagickCore::LineCap; + using MagickCore::UndefinedCap; + using MagickCore::ButtCap; + using MagickCore::RoundCap; + using MagickCore::SquareCap; + + // Line join types + using MagickCore::LineJoin; + using MagickCore::UndefinedJoin; + using MagickCore::MiterJoin; + using MagickCore::RoundJoin; + using MagickCore::BevelJoin; + + // Log event types + using MagickCore::LogEventType; + using MagickCore::UndefinedEvents; + using MagickCore::NoEvents; + using MagickCore::AccelerateEvent; + using MagickCore::AnnotateEvent; + using MagickCore::BlobEvent; + using MagickCore::CacheEvent; + using MagickCore::CoderEvent; + using MagickCore::ConfigureEvent; + using MagickCore::DeprecateEvent; + using MagickCore::DrawEvent; + using MagickCore::ExceptionEvent; + using MagickCore::ImageEvent; + using MagickCore::LocaleEvent; + using MagickCore::ModuleEvent; + using MagickCore::PixelEvent; + using MagickCore::PolicyEvent; + using MagickCore::ResourceEvent; + using MagickCore::TraceEvent; + using MagickCore::TransformEvent; + using MagickCore::UserEvent; + using MagickCore::WandEvent; + using MagickCore::X11Event; + using MagickCore::CommandEvent; + using MagickCore::AllEvents; + + // Magick functions + using MagickCore::MagickFunction; + using MagickCore::UndefinedFunction; + using MagickCore::ArcsinFunction; + using MagickCore::ArctanFunction; + using MagickCore::PolynomialFunction; + using MagickCore::SinusoidFunction; + + // Metric types + using MagickCore::MetricType; + using MagickCore::UndefinedErrorMetric; + using MagickCore::AbsoluteErrorMetric; + using MagickCore::FuzzErrorMetric; + using MagickCore::MeanAbsoluteErrorMetric; + using MagickCore::MeanErrorPerPixelErrorMetric; + using MagickCore::MeanSquaredErrorMetric; + using MagickCore::NormalizedCrossCorrelationErrorMetric; + using MagickCore::PeakAbsoluteErrorMetric; + using MagickCore::PeakSignalToNoiseRatioErrorMetric; + using MagickCore::PerceptualHashErrorMetric; + using MagickCore::RootMeanSquaredErrorMetric; + + // Morphology methods + using MagickCore::MorphologyMethod; + using MagickCore::UndefinedMorphology; + using MagickCore::ConvolveMorphology; + using MagickCore::CorrelateMorphology; + using MagickCore::ErodeMorphology; + using MagickCore::DilateMorphology; + using MagickCore::ErodeIntensityMorphology; + using MagickCore::DilateIntensityMorphology; + using MagickCore::IterativeDistanceMorphology; + using MagickCore::OpenMorphology; + using MagickCore::CloseMorphology; + using MagickCore::OpenIntensityMorphology; + using MagickCore::CloseIntensityMorphology; + using MagickCore::SmoothMorphology; + using MagickCore::EdgeInMorphology; + using MagickCore::EdgeOutMorphology; + using MagickCore::EdgeMorphology; + using MagickCore::TopHatMorphology; + using MagickCore::BottomHatMorphology; + using MagickCore::HitAndMissMorphology; + using MagickCore::ThinningMorphology; + using MagickCore::ThickenMorphology; + using MagickCore::DistanceMorphology; + using MagickCore::VoronoiMorphology; + + // Noise types + using MagickCore::NoiseType; + using MagickCore::UndefinedNoise; + using MagickCore::UniformNoise; + using MagickCore::GaussianNoise; + using MagickCore::MultiplicativeGaussianNoise; + using MagickCore::ImpulseNoise; + using MagickCore::LaplacianNoise; + using MagickCore::PoissonNoise; + + // Orientation types + using MagickCore::OrientationType; + using MagickCore::UndefinedOrientation; + using MagickCore::TopLeftOrientation; + using MagickCore::TopRightOrientation; + using MagickCore::BottomRightOrientation; + using MagickCore::BottomLeftOrientation; + using MagickCore::LeftTopOrientation; + using MagickCore::RightTopOrientation; + using MagickCore::RightBottomOrientation; + using MagickCore::LeftBottomOrientation; + + // Paint methods + using MagickCore::PaintMethod; + using MagickCore::UndefinedMethod; + using MagickCore::PointMethod; + using MagickCore::ReplaceMethod; + using MagickCore::FloodfillMethod; + using MagickCore::FillToBorderMethod; + using MagickCore::ResetMethod; + + using MagickCore::PixelChannel; + using MagickCore::UndefinedPixelChannel; + using MagickCore::RedPixelChannel; + using MagickCore::CyanPixelChannel; + using MagickCore::GrayPixelChannel; + using MagickCore::LPixelChannel; + using MagickCore::YPixelChannel; + using MagickCore::aPixelChannel; + using MagickCore::GreenPixelChannel; + using MagickCore::MagentaPixelChannel; + using MagickCore::CbPixelChannel; + using MagickCore::bPixelChannel; + using MagickCore::BluePixelChannel; + using MagickCore::YellowPixelChannel; + using MagickCore::CrPixelChannel; + using MagickCore::BlackPixelChannel; + using MagickCore::AlphaPixelChannel; + using MagickCore::IndexPixelChannel; + using MagickCore::ReadMaskPixelChannel; + using MagickCore::WriteMaskPixelChannel; + using MagickCore::MetaPixelChannel; + using MagickCore::IntensityPixelChannel; + using MagickCore::CompositePixelChannel; + using MagickCore::SyncPixelChannel; + + // Pixel intensity method + using MagickCore::PixelIntensityMethod; + using MagickCore::UndefinedPixelIntensityMethod; + using MagickCore::AveragePixelIntensityMethod; + using MagickCore::BrightnessPixelIntensityMethod; + using MagickCore::LightnessPixelIntensityMethod; + using MagickCore::MSPixelIntensityMethod; + using MagickCore::Rec601LumaPixelIntensityMethod; + using MagickCore::Rec601LuminancePixelIntensityMethod; + using MagickCore::Rec709LumaPixelIntensityMethod; + using MagickCore::Rec709LuminancePixelIntensityMethod; + using MagickCore::RMSPixelIntensityMethod; + + // PixelInterpolate methods + using MagickCore::PixelInterpolateMethod; + using MagickCore::UndefinedInterpolatePixel; + using MagickCore::AverageInterpolatePixel; + using MagickCore::Average9InterpolatePixel; + using MagickCore::Average16InterpolatePixel; + using MagickCore::BackgroundInterpolatePixel; + using MagickCore::BilinearInterpolatePixel; + using MagickCore::BlendInterpolatePixel; + using MagickCore::CatromInterpolatePixel; + using MagickCore::IntegerInterpolatePixel; + using MagickCore::MeshInterpolatePixel; + using MagickCore::NearestInterpolatePixel; + using MagickCore::SplineInterpolatePixel; + + // Pixel traits + using MagickCore::PixelTrait; + using MagickCore::UndefinedPixelTrait; + using MagickCore::CopyPixelTrait; + using MagickCore::UpdatePixelTrait; + using MagickCore::BlendPixelTrait; + + // Policy domains + using MagickCore::PolicyDomain; + using MagickCore::UndefinedPolicyDomain; + using MagickCore::CoderPolicyDomain; + using MagickCore::DelegatePolicyDomain; + using MagickCore::FilterPolicyDomain; + using MagickCore::PathPolicyDomain; + using MagickCore::ResourcePolicyDomain; + using MagickCore::SystemPolicyDomain; + using MagickCore::CachePolicyDomain; + + // Preview types. Not currently used by Magick++ + using MagickCore::PreviewType; + using MagickCore::UndefinedPreview; + using MagickCore::RotatePreview; + using MagickCore::ShearPreview; + using MagickCore::RollPreview; + using MagickCore::HuePreview; + using MagickCore::SaturationPreview; + using MagickCore::BrightnessPreview; + using MagickCore::GammaPreview; + using MagickCore::SpiffPreview; + using MagickCore::DullPreview; + using MagickCore::GrayscalePreview; + using MagickCore::QuantizePreview; + using MagickCore::DespecklePreview; + using MagickCore::ReduceNoisePreview; + using MagickCore::AddNoisePreview; + using MagickCore::SharpenPreview; + using MagickCore::BlurPreview; + using MagickCore::ThresholdPreview; + using MagickCore::EdgeDetectPreview; + using MagickCore::SpreadPreview; + using MagickCore::SolarizePreview; + using MagickCore::ShadePreview; + using MagickCore::RaisePreview; + using MagickCore::SegmentPreview; + using MagickCore::SwirlPreview; + using MagickCore::ImplodePreview; + using MagickCore::WavePreview; + using MagickCore::OilPaintPreview; + using MagickCore::CharcoalDrawingPreview; + using MagickCore::JPEGPreview; + + // Quantum types + using MagickCore::QuantumType; + using MagickCore::IndexQuantum; + using MagickCore::GrayQuantum; + using MagickCore::IndexAlphaQuantum; + using MagickCore::GrayAlphaQuantum; + using MagickCore::RedQuantum; + using MagickCore::CyanQuantum; + using MagickCore::GreenQuantum; + using MagickCore::YellowQuantum; + using MagickCore::BlueQuantum; + using MagickCore::MagentaQuantum; + using MagickCore::AlphaQuantum; + using MagickCore::BlackQuantum; + using MagickCore::RGBQuantum; + using MagickCore::RGBAQuantum; + using MagickCore::CMYKQuantum; + + // Pixel mask types + using MagickCore::PixelMask; + using MagickCore::UndefinedPixelMask; + using MagickCore::ReadPixelMask; + using MagickCore::WritePixelMask; + + // Rendering intents + using MagickCore::RenderingIntent; + using MagickCore::UndefinedIntent; + using MagickCore::SaturationIntent; + using MagickCore::PerceptualIntent; + using MagickCore::AbsoluteIntent; + using MagickCore::RelativeIntent; + + // Resource types + using MagickCore::ResourceType; + using MagickCore::UndefinedResource; + using MagickCore::AreaResource; + using MagickCore::DiskResource; + using MagickCore::FileResource; + using MagickCore::HeightResource; + using MagickCore::MapResource; + using MagickCore::MemoryResource; + using MagickCore::ThreadResource; + using MagickCore::ThrottleResource; + using MagickCore::TimeResource; + using MagickCore::WidthResource; + using MagickCore::ListLengthResource; + + // Resolution units + using MagickCore::ResolutionType; + using MagickCore::UndefinedResolution; + using MagickCore::PixelsPerInchResolution; + using MagickCore::PixelsPerCentimeterResolution; + + // Sparse Color methods + using MagickCore::SparseColorMethod; + using MagickCore::UndefinedColorInterpolate; + using MagickCore::BarycentricColorInterpolate; + using MagickCore::BilinearColorInterpolate; + using MagickCore::PolynomialColorInterpolate; + using MagickCore::ShepardsColorInterpolate; + using MagickCore::VoronoiColorInterpolate; + using MagickCore::InverseColorInterpolate; + using MagickCore::ManhattanColorInterpolate; + + // Statistic type + using MagickCore::StatisticType; + using MagickCore::UndefinedStatistic; + using MagickCore::GradientStatistic; + using MagickCore::MaximumStatistic; + using MagickCore::MeanStatistic; + using MagickCore::MedianStatistic; + using MagickCore::MinimumStatistic; + using MagickCore::ModeStatistic; + using MagickCore::NonpeakStatistic; + using MagickCore::RootMeanSquareStatistic; + using MagickCore::StandardDeviationStatistic; + + // StorageType type + using MagickCore::StorageType; + using MagickCore::UndefinedPixel; + using MagickCore::CharPixel; + using MagickCore::DoublePixel; + using MagickCore::FloatPixel; + using MagickCore::LongPixel; + using MagickCore::LongLongPixel; + using MagickCore::QuantumPixel; + using MagickCore::ShortPixel; + + // StretchType type + using MagickCore::StretchType; + using MagickCore::UndefinedStretch; + using MagickCore::NormalStretch; + using MagickCore::UltraCondensedStretch; + using MagickCore::ExtraCondensedStretch; + using MagickCore::CondensedStretch; + using MagickCore::SemiCondensedStretch; + using MagickCore::SemiExpandedStretch; + using MagickCore::ExpandedStretch; + using MagickCore::ExtraExpandedStretch; + using MagickCore::UltraExpandedStretch; + using MagickCore::AnyStretch; + + // StyleType type + using MagickCore::StyleType; + using MagickCore::UndefinedStyle; + using MagickCore::NormalStyle; + using MagickCore::ItalicStyle; + using MagickCore::ObliqueStyle; + using MagickCore::AnyStyle; + + // Virtual pixel methods + using MagickCore::VirtualPixelMethod; + using MagickCore::UndefinedVirtualPixelMethod; + using MagickCore::BackgroundVirtualPixelMethod; + using MagickCore::DitherVirtualPixelMethod; + using MagickCore::EdgeVirtualPixelMethod; + using MagickCore::MirrorVirtualPixelMethod; + using MagickCore::RandomVirtualPixelMethod; + using MagickCore::TileVirtualPixelMethod; + using MagickCore::TransparentVirtualPixelMethod; + using MagickCore::MaskVirtualPixelMethod; + using MagickCore::BlackVirtualPixelMethod; + using MagickCore::GrayVirtualPixelMethod; + using MagickCore::WhiteVirtualPixelMethod; + using MagickCore::HorizontalTileVirtualPixelMethod; + using MagickCore::VerticalTileVirtualPixelMethod; + using MagickCore::HorizontalTileEdgeVirtualPixelMethod; + using MagickCore::VerticalTileEdgeVirtualPixelMethod; + using MagickCore::CheckerTileVirtualPixelMethod; + +#if defined(MAGICKCORE_IMPLEMENTATION) + // + // ImageMagick symbols used in implementation code + // + using MagickCore::AcquireAlignedMemory; + using MagickCore::AcquireAuthenticCacheView; + using MagickCore::AcquireDrawingWand; + using MagickCore::AcquireExceptionInfo; + using MagickCore::AcquireVirtualCacheView; + using MagickCore::AcquireImage; + using MagickCore::AcquireKernelInfo; + using MagickCore::AcquireMagickInfo; + using MagickCore::AcquireMagickMemory; + using MagickCore::AcquireQuantumInfo; + using MagickCore::AcquireString; + using MagickCore::AcquireStringInfo; + using MagickCore::AdaptiveBlurImage; + using MagickCore::AdaptiveResizeImage; + using MagickCore::AdaptiveSharpenImage; + using MagickCore::AdaptiveThresholdImage; + using MagickCore::AddNoiseImage; + using MagickCore::AffineTransformImage; + using MagickCore::AnnotateImage; + using MagickCore::AutoGammaImage; + using MagickCore::AutoLevelImage; + using MagickCore::AutoOrientImage; + using MagickCore::AutoThresholdImage; + using MagickCore::Base64Decode; + using MagickCore::Base64Encode; + using MagickCore::BilevelImage; + using MagickCore::BlackThresholdImage; + using MagickCore::BlobToImage; + using MagickCore::BlueShiftImage; + using MagickCore::BlurImage; + using MagickCore::BrightnessContrastImage; + using MagickCore::BorderImage; + using MagickCore::CharcoalImage; + using MagickCore::CannyEdgeImage; + using MagickCore::ChopImage; + using MagickCore::ClampImage; + using MagickCore::ClampToQuantum; + using MagickCore::ClearMagickException; + using MagickCore::CloneDrawInfo; + using MagickCore::CloneImage; + using MagickCore::CloneImageInfo; + using MagickCore::CloneQuantizeInfo; + using MagickCore::ClutImage; + using MagickCore::ColorDecisionListImage; + using MagickCore::ColorizeImage; + using MagickCore::ColorMatrixImage; + using MagickCore::CommandOptionToMnemonic; + using MagickCore::CompareImages; + using MagickCore::CompareImagesLayers; + using MagickCore::CompositeImage; + using MagickCore::ConnectedComponentsImage; + using MagickCore::ConstituteImage; + using MagickCore::ContrastImage; + using MagickCore::ContrastStretchImage; + using MagickCore::ConvertHSLToRGB; + using MagickCore::ConvertRGBToHSL; + using MagickCore::ConvolveImage; + using MagickCore::CopyImagePixels; + using MagickCore::CopyMagickString; + using MagickCore::CropImage; + using MagickCore::CropImageToTiles; + using MagickCore::CycleColormapImage; + using MagickCore::DecipherImage; + using MagickCore::DeleteImageOption; + using MagickCore::DeleteImageRegistry; + using MagickCore::DeskewImage; + using MagickCore::DespeckleImage; + using MagickCore::DestroyCacheView; + using MagickCore::DestroyDrawInfo; + using MagickCore::DestroyDrawingWand; + using MagickCore::DestroyExceptionInfo; + using MagickCore::DestroyImageInfo; + using MagickCore::DestroyImageList; + using MagickCore::DestroyKernelInfo; + using MagickCore::DestroyMagickWand; + using MagickCore::DestroyPixelWand; + using MagickCore::DestroyQuantizeInfo; + using MagickCore::DestroyQuantumInfo; + using MagickCore::DestroyString; + using MagickCore::DestroyStringInfo; + using MagickCore::DisplayImages; + using MagickCore::DistortImage; + using MagickCore::DrawAffine; + using MagickCore::DrawAlpha; + using MagickCore::DrawAnnotation; + using MagickCore::DrawArc; + using MagickCore::DrawBezier; + using MagickCore::DrawCircle; + using MagickCore::DrawColor; + using MagickCore::DrawComment; + using MagickCore::DrawComposite; + using MagickCore::DrawEllipse; + using MagickCore::DrawImage; + using MagickCore::DrawLine; + using MagickCore::DrawPathClose; + using MagickCore::DrawPathCurveToAbsolute; + using MagickCore::DrawPathCurveToQuadraticBezierAbsolute; + using MagickCore::DrawPathCurveToQuadraticBezierRelative; + using MagickCore::DrawPathCurveToQuadraticBezierSmoothAbsolute; + using MagickCore::DrawPathCurveToQuadraticBezierSmoothRelative; + using MagickCore::DrawPathCurveToRelative; + using MagickCore::DrawPathCurveToSmoothAbsolute; + using MagickCore::DrawPathCurveToSmoothRelative; + using MagickCore::DrawPathEllipticArcAbsolute; + using MagickCore::DrawPathEllipticArcRelative; + using MagickCore::DrawPathFinish; + using MagickCore::DrawPathLineToAbsolute; + using MagickCore::DrawPathLineToHorizontalAbsolute; + using MagickCore::DrawPathLineToHorizontalRelative; + using MagickCore::DrawPathLineToRelative; + using MagickCore::DrawPathLineToVerticalAbsolute; + using MagickCore::DrawPathLineToVerticalRelative; + using MagickCore::DrawPathMoveToAbsolute; + using MagickCore::DrawPathMoveToRelative; + using MagickCore::DrawPathStart; + using MagickCore::DrawPoint; + using MagickCore::DrawPolygon; + using MagickCore::DrawPolyline; + using MagickCore::DrawPopClipPath; + using MagickCore::DrawPopDefs; + using MagickCore::DrawPopPattern; + using MagickCore::DrawPushClipPath; + using MagickCore::DrawPushDefs; + using MagickCore::DrawPushPattern; + using MagickCore::DrawRectangle; + using MagickCore::DrawRender; + using MagickCore::DrawRotate; + using MagickCore::DrawRoundRectangle; + using MagickCore::DrawScale; + using MagickCore::DrawSetClipPath; + using MagickCore::DrawSetClipRule; + using MagickCore::DrawSetClipUnits; + using MagickCore::DrawSetFillColor; + using MagickCore::DrawSetFillOpacity; + using MagickCore::DrawSetFillPatternURL; + using MagickCore::DrawSetFillRule; + using MagickCore::DrawSetFont; + using MagickCore::DrawSetFontFamily; + using MagickCore::DrawSetFontSize; + using MagickCore::DrawSetFontStretch; + using MagickCore::DrawSetFontStyle; + using MagickCore::DrawSetFontWeight; + using MagickCore::DrawSetGravity; + using MagickCore::DrawSetStrokeAntialias; + using MagickCore::DrawSetStrokeColor; + using MagickCore::DrawSetStrokeDashArray; + using MagickCore::DrawSetStrokeDashOffset; + using MagickCore::DrawSetStrokeLineCap; + using MagickCore::DrawSetStrokeLineJoin; + using MagickCore::DrawSetStrokeMiterLimit; + using MagickCore::DrawSetStrokeOpacity; + using MagickCore::DrawSetStrokePatternURL; + using MagickCore::DrawSetStrokeWidth; + using MagickCore::DrawSetTextAntialias; + using MagickCore::DrawSetTextDecoration; + using MagickCore::DrawSetTextEncoding; + using MagickCore::DrawSetTextInterlineSpacing; + using MagickCore::DrawSetTextInterwordSpacing; + using MagickCore::DrawSetTextKerning; + using MagickCore::DrawSetTextUnderColor; + using MagickCore::DrawSetViewbox; + using MagickCore::DrawSkewX; + using MagickCore::DrawSkewY; + using MagickCore::DrawTranslate; + using MagickCore::EdgeImage; + using MagickCore::EmbossImage; + using MagickCore::EncipherImage; + using MagickCore::EnhanceImage; + using MagickCore::EqualizeImage; + using MagickCore::EvaluateImage; + using MagickCore::ExportImagePixels; + using MagickCore::ExportQuantumPixels; + using MagickCore::ExtentImage; + using MagickCore::FlipImage; + using MagickCore::FloodfillPaintImage; + using MagickCore::FlopImage; + using MagickCore::FormatLocaleString; + using MagickCore::ForwardFourierTransformImage; + using MagickCore::FrameImage; + using MagickCore::FxImage; + using MagickCore::GammaImage; + using MagickCore::GaussianBlurImage; + using MagickCore::GaussianBlurImage; + using MagickCore::GetAffineMatrix; + using MagickCore::GetAuthenticMetacontent; + using MagickCore::GetBlobSize; + using MagickCore::GetCacheViewAuthenticMetacontent; + using MagickCore::GetCacheViewAuthenticPixels; + using MagickCore::GetCacheViewVirtualPixels; + using MagickCore::GetClientName; + using MagickCore::GetColorTuple; + using MagickCore::GetDrawInfo; + using MagickCore::GetGeometry; + using MagickCore::GetImageArtifact; + using MagickCore::GetImageMoments; + using MagickCore::GetImageBoundingBox; + using MagickCore::GetImageDistortion; + using MagickCore::GetImageDepth; + using MagickCore::GetImageMask; + using MagickCore::GetImageMean; + using MagickCore::GetImageKurtosis; + using MagickCore::GetImageRange; + using MagickCore::GetImageDepth; + using MagickCore::GetImageInfo; + using MagickCore::GetImageInfoFile; + using MagickCore::GetImageOption; + using MagickCore::GetImagePerceptualHash; + using MagickCore::GetAuthenticPixels; + using MagickCore::GetImageProfile; + using MagickCore::GetImageProperty; + using MagickCore::GetImageQuantizeError; + using MagickCore::GetImageType; + using MagickCore::GetMagickDecoderThreadSupport; + using MagickCore::GetMagickEncoderThreadSupport; + using MagickCore::GetMagickInfo; + using MagickCore::GetMultilineTypeMetrics; + using MagickCore::GetNextValueInLinkedList; + using MagickCore::GetNumberOfElementsInLinkedList; + using MagickCore::GetPixelBlue; + using MagickCore::GetPixelChannelOffset; + using MagickCore::GetPixelChannelTraits; + using MagickCore::GetPixelGreen; + using MagickCore::GetPixelInfo; + using MagickCore::GetPixelRed; + using MagickCore::GetNumberColors; + using MagickCore::GetPageGeometry; + using MagickCore::GetQuantizeInfo; + using MagickCore::GetStringInfoDatum; + using MagickCore::GetStringInfoLength; + using MagickCore::GetTypeMetrics; + using MagickCore::GetValueFromLinkedList; + using MagickCore::GetVirtualMetacontent; + using MagickCore::GetVirtualPixels; + using MagickCore::GetImageVirtualPixelMethod; + using MagickCore::GlobExpression; + using MagickCore::GravityAdjustGeometry; + using MagickCore::GrayscaleImage; + using MagickCore::HaldClutImage; + using MagickCore::HoughLineImage; + using MagickCore::ImageToBlob; + using MagickCore::ImagesToBlob; + using MagickCore::ImplodeImage; + using MagickCore::ImportQuantumPixels; + using MagickCore::InterpretImageProperties; + using MagickCore::InverseFourierTransformImage; + using MagickCore::InvokeDynamicImageFilter; + using MagickCore::IsEventLogging; + using MagickCore::IsGeometry; + using MagickCore::IsImageOpaque; + using MagickCore::IsImagesEqual; + using MagickCore::KuwaharaImage; + using MagickCore::LevelImage; + using MagickCore::LevelImageColors; + using MagickCore::LevelizeImage; + using MagickCore::LinearStretchImage; + using MagickCore::LiquidRescaleImage; + using MagickCore::LocalContrastImage; + using MagickCore::LocaleCompare; + using MagickCore::LockSemaphoreInfo; + using MagickCore::LogMagickEvent; + using MagickCore::MagickCoreTerminus; + using MagickCore::MagickToMime; + using MagickCore::MagnifyImage; + using MagickCore::MergeImageLayers; + using MagickCore::MinifyImage; + using MagickCore::ModulateImage; + using MagickCore::MorphologyImage; + using MagickCore::MotionBlurImage; + using MagickCore::NegateImage; + using MagickCore::NewMagickWandFromImage; + using MagickCore::NewPixelWand; + using MagickCore::NormalizeImage; + using MagickCore::OilPaintImage; + using MagickCore::OpaquePaintImage; + using MagickCore::OrderedDitherImage; + using MagickCore::OptimizeImageLayers; + using MagickCore::OptimizeImageTransparency; + using MagickCore::OptimizePlusImageLayers; + using MagickCore::ParseMetaGeometry; + using MagickCore::PerceptibleImage; + using MagickCore::PingBlob; + using MagickCore::PingImage; + using MagickCore::PixelSetPixelColor; + using MagickCore::PolaroidImage; + using MagickCore::PopDrawingWand; + using MagickCore::PosterizeImage; + using MagickCore::ProfileImage; + using MagickCore::PushDrawingWand; + using MagickCore::QuantizeImage; + using MagickCore::QueueAuthenticPixels; + using MagickCore::QueueCacheViewAuthenticPixels; + using MagickCore::RaiseImage; + using MagickCore::RandomThresholdImage; + using MagickCore::ReadImage; + using MagickCore::RegisterMagickInfo; + using MagickCore::RelinquishMagickMemory; + using MagickCore::RemapImage; + using MagickCore::ResampleImage; + using MagickCore::ResetLinkedListIterator; + using MagickCore::ResizeImage; + using MagickCore::ResizeMagickMemory; + using MagickCore::RollImage; + using MagickCore::RotateImage; + using MagickCore::RotationalBlurImage; + using MagickCore::SampleImage; + using MagickCore::ScaleImage; + using MagickCore::SegmentImage; + using MagickCore::SelectiveBlurImage; + using MagickCore::SeparateImage; + using MagickCore::SepiaToneImage; + using MagickCore::SetGeometry; + using MagickCore::SetImageAlpha; + using MagickCore::SetImageArtifact; + using MagickCore::SetImageBackgroundColor; + using MagickCore::SetImageColorspace; + using MagickCore::SetImageDepth; + using MagickCore::SetImageExtent; + using MagickCore::SetImageInfo; + using MagickCore::SetImageInfoFile; + using MagickCore::SetImageMask; + using MagickCore::SetImageOption; + using MagickCore::SetImageProfile; + using MagickCore::SetImageProperty; + using MagickCore::SetImageRegistry; + using MagickCore::SetImageType; + using MagickCore::SetLogEventMask; + using MagickCore::SetMagickResourceLimit; + using MagickCore::SetImageVirtualPixelMethod; + using MagickCore::SetPixelChannel; + using MagickCore::SetImageChannelMask; + using MagickCore::SetStringInfoDatum; + using MagickCore::ShadeImage; + using MagickCore::ShadowImage; + using MagickCore::SharpenImage; + using MagickCore::SharpenImage; + using MagickCore::ShaveImage; + using MagickCore::ShearImage; + using MagickCore::SigmoidalContrastImage; + using MagickCore::SignatureImage; + using MagickCore::SimilarityImage; + using MagickCore::SketchImage; + using MagickCore::SmushImages; + using MagickCore::SolarizeImage; + using MagickCore::SparseColorImage; + using MagickCore::SpliceImage; + using MagickCore::SpreadImage; + using MagickCore::StatisticImage; + using MagickCore::SteganoImage; + using MagickCore::StereoImage; + using MagickCore::StripImage; + using MagickCore::SwirlImage; + using MagickCore::SyncCacheViewAuthenticPixels; + using MagickCore::SyncImage; + using MagickCore::SyncAuthenticPixels; + using MagickCore::TextureImage; + using MagickCore::ThrowException; + using MagickCore::TintImage; + using MagickCore::TransformImageColorspace; + using MagickCore::TransparentPaintImage; + using MagickCore::TransparentPaintImageChroma; + using MagickCore::TransposeImage; + using MagickCore::TransverseImage; + using MagickCore::TrimImage; + using MagickCore::UniqueImageColors; + using MagickCore::UnlockSemaphoreInfo; + using MagickCore::UnregisterMagickInfo; + using MagickCore::UnsharpMaskImage; + using MagickCore::VignetteImage; + using MagickCore::WaveImage; + using MagickCore::WaveletDenoiseImage; + using MagickCore::WhiteThresholdImage; + using MagickCore::WriteImage; + +#endif // MAGICKCORE_IMPLEMENTATION + +} + +////////////////////////////////////////////////////////////////////// +// +// No user-serviceable parts beyond this point +// +////////////////////////////////////////////////////////////////////// +#define GetPPException \ + MagickCore::ExceptionInfo \ + *exceptionInfo; \ + exceptionInfo=MagickCore::AcquireExceptionInfo(); +#define GetAndSetPPChannelMask(channel) \ + MagickCore::ChannelType \ + channel_mask; \ + channel_mask=MagickCore::SetImageChannelMask(image(),channel) +#define ClonePPDrawException(wand) \ + MagickCore::ExceptionInfo \ + *exceptionInfo; \ + exceptionInfo=MagickCore::DrawCloneExceptionInfo(wand) +#define RestorePPChannelMask \ + MagickCore::SetPixelChannelMask(image(),channel_mask) +#define SetPPChannelMask(channel) \ + (void) MagickCore::SetImageChannelMask(image(),channel) +#define ThrowPPDrawException(quiet) \ + throwException(exceptionInfo,quiet); \ + (void) MagickCore::DestroyExceptionInfo(exceptionInfo) +#define ThrowPPException(quiet) \ + throwException(exceptionInfo,quiet); \ + (void) MagickCore::DestroyExceptionInfo(exceptionInfo) + +#endif // Magick_Include_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Montage.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Montage.h new file mode 100644 index 0000000000..3b66629b39 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Montage.h @@ -0,0 +1,158 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003 +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition of Montage class used to specify montage options. +// + +#if !defined(Magick_Montage_header) +#define Magick_Montage_header + +#include "Magick++/Include.h" +#include +#include "Magick++/Color.h" +#include "Magick++/Geometry.h" + +// +// Basic (Un-framed) Montage +// +namespace Magick +{ + class MagickPPExport Montage + { + public: + + Montage(void); + virtual ~Montage(void); + + // Color that thumbnails are composed on + void backgroundColor(const Color &backgroundColor_); + Color backgroundColor(void) const; + + // Composition algorithm to use (e.g. ReplaceCompositeOp) + void compose(CompositeOperator compose_); + CompositeOperator compose(void) const; + + // Filename to save montages to + void fileName(const std::string &fileName_); + std::string fileName(void) const; + + // Fill color + void fillColor(const Color &fill_); + Color fillColor(void) const; + + // Label font + void font(const std::string &font_); + std::string font(void) const; + + // Thumbnail width & height plus border width & height + void geometry(const Geometry &geometry_); + Geometry geometry(void) const; + + // Thumbnail position (e.g. SouthWestGravity) + void gravity(GravityType gravity_); + GravityType gravity(void) const; + + // Thumbnail label (applied to image prior to montage) + void label(const std::string &label_); + std::string label(void) const; + + // Font point size + void pointSize(size_t pointSize_); + size_t pointSize(void) const; + + // Enable drop-shadows on thumbnails + void shadow(bool shadow_); + bool shadow(void) const; + + // Outline color + void strokeColor(const Color &stroke_); + Color strokeColor(void) const; + + // Background texture image + void texture(const std::string &texture_); + std::string texture(void) const; + + // Thumbnail rows and columns + void tile(const Geometry &tile_); + Geometry tile(void) const; + + // Montage title + void title(const std::string &title_); + std::string title(void) const; + + // Transparent color + void transparentColor(const Color &transparentColor_); + Color transparentColor(void) const; + + // + // Implementation methods/members + // + + // Update elements in existing MontageInfo structure + virtual void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const; + + private: + + Color _backgroundColor; + std::string _fileName; + Color _fill; + std::string _font; + Geometry _geometry; + GravityType _gravity; + std::string _label; + size_t _pointSize; + bool _shadow; + Color _stroke; + std::string _texture; + Geometry _tile; + std::string _title; + Color _transparentColor; + }; + + // + // Montage With Frames (Extends Basic Montage) + // + class MagickPPExport MontageFramed : public Montage + { + public: + + MontageFramed(void); + ~MontageFramed(void); + + // Frame foreground color + void matteColor(const Color &matteColor_); + Color matteColor(void) const; + + // Frame border color + void borderColor(const Color &borderColor_); + Color borderColor(void) const; + + // Pixels between thumbnail and surrounding frame + void borderWidth(size_t borderWidth_); + size_t borderWidth(void) const; + + // Frame geometry (width & height frame thickness) + void frameGeometry(const Geometry &frame_); + Geometry frameGeometry(void) const; + + // + // Implementation methods/members + // + + // Update elements in existing MontageInfo structure + void updateMontageInfo(MagickCore::MontageInfo &montageInfo_) const; + + private: + + Color _matteColor; + Color _borderColor; + size_t _borderWidth; + Geometry _frame; + }; +} // namespace Magick + +#endif // Magick_Montage_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Pixels.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Pixels.h new file mode 100644 index 0000000000..a28ffc631e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Pixels.h @@ -0,0 +1,154 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002 +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Representation of a pixel view. +// + +#if !defined(Magick_Pixels_header) +#define Magick_Pixels_header + +#include "Magick++/Include.h" +#include "Magick++/Color.h" +#include "Magick++/Image.h" + +namespace Magick +{ + class MagickPPExport Pixels + { + public: + + // Construct pixel view using specified image. + Pixels(Magick::Image &image_); + + // Destroy pixel view + ~Pixels(void); + + // Transfer pixels from the image to the pixel view as defined by + // the specified region. Modified pixels may be subsequently + // transferred back to the image via sync. + Quantum *get(const ::ssize_t x_,const ::ssize_t y_, + const size_t columns_,const size_t rows_); + + // Transfer read-only pixels from the image to the pixel view as + // defined by the specified region. + const Quantum *getConst(const ::ssize_t x_,const ::ssize_t y_, + const size_t columns_,const size_t rows_); + + // Return pixel metacontent + void *metacontent(void); + + // Returns the offset for the specified channel. + ssize_t offset(PixelChannel channel) const; + + // Allocate a pixel view region to store image pixels as defined + // by the region rectangle. This area is subsequently transferred + // from the pixel view to the image via sync. + Quantum *set(const ::ssize_t x_,const ::ssize_t y_,const size_t columns_, + const size_t rows_ ); + + // Transfers the image view pixels to the image. + void sync(void); + + // Left ordinate of view + ::ssize_t x(void) const; + + // Top ordinate of view + ::ssize_t y(void) const; + + // Width of view + size_t columns(void) const; + + // Height of view + size_t rows(void) const; + + private: + + // Copying and assigning Pixels is not supported. + Pixels(const Pixels& pixels_); + const Pixels& operator=(const Pixels& pixels_); + + Magick::Image _image; // Image reference + MagickCore::CacheView *_view; // Image view handle + ::ssize_t _x; // Left ordinate of view + ::ssize_t _y; // Top ordinate of view + size_t _columns; // Width of view + size_t _rows; // Height of view + + }; // class Pixels + + class MagickPPExport PixelData + { + public: + + // Construct pixel data using specified image + PixelData(Magick::Image &image_,std::string map_,const StorageType type_); + + // Construct pixel data using specified image + PixelData(Magick::Image &image_,const ::ssize_t x_,const ::ssize_t y_, + const size_t width_,const size_t height_,std::string map_, + const StorageType type_); + + // Destroy pixel data + ~PixelData(void); + + // Pixel data buffer + const void *data(void) const; + + // Length of the buffer + ::ssize_t length(void) const; + + // Size of the buffer in bytes + ::ssize_t size(void) const; + + private: + + // Copying and assigning PixelData is not supported + PixelData(const PixelData& pixels_); + const PixelData& operator=(const PixelData& pixels_); + + void init(Magick::Image &image_,const ::ssize_t x_,const ::ssize_t y_, + const size_t width_,const size_t height_,std::string map_, + const StorageType type_); + + void relinquish(void) throw(); + + void *_data; // The pixel data + ::ssize_t _length; // Length of the data + ::ssize_t _size; // Size of the data + }; // class PixelData + +} // Magick namespace + +// +// Inline methods +// + +// Left ordinate of view +inline ::ssize_t Magick::Pixels::x(void) const +{ + return _x; +} + +// Top ordinate of view +inline ::ssize_t Magick::Pixels::y(void) const +{ + return _y; +} + +// Width of view +inline size_t Magick::Pixels::columns(void) const +{ + return _columns; +} + +// Height of view +inline size_t Magick::Pixels::rows(void) const +{ + return _rows; +} + +#endif // Magick_Pixels_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/ResourceLimits.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/ResourceLimits.h new file mode 100644 index 0000000000..87153bae45 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/ResourceLimits.h @@ -0,0 +1,77 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition of resource limits. +// + +#if !defined(Magick_ResourceLimits_header) +#define Magick_ResourceLimits_header + +#include "Magick++/Include.h" + +namespace Magick +{ + class MagickPPExport ResourceLimits + { + public: + + // Pixel cache limit in bytes. Requests for memory above this limit + // are automagically allocated on disk. + static void area(const MagickSizeType limit_); + static MagickSizeType area(void); + + // Pixel cache limit in bytes. Requests for memory above this limit + // will fail. + static void disk(const MagickSizeType limit_); + static MagickSizeType disk(void); + + // The maximum number of open pixel cache files. When this limit is + // exceeded, any subsequent pixels cached to disk are closed and reopened + // on demand. This behavior permits a large number of images to be accessed + // simultaneously on disk, but with a speed penalty due to repeated + // open/close calls. + static void file(const MagickSizeType limit_); + static MagickSizeType file(void); + + // The maximum height of an image. + static void height(const MagickSizeType limit_); + static MagickSizeType height(void); + + // The maximum number of images in an image list. + static void listLength(const MagickSizeType limit_); + static MagickSizeType listLength(); + + // Pixel cache limit in bytes. Once this memory limit is exceeded, + // all subsequent pixels cache operations are to/from disk. + static void map(const MagickSizeType limit_); + static MagickSizeType map(void); + + // Pixel cache limit in bytes. Once this memory limit is exceeded, + // all subsequent pixels cache operations are to/from disk or to/from + // memory mapped files. + static void memory(const MagickSizeType limit_); + static MagickSizeType memory(void); + + // Limits the number of threads used in multithreaded operations. + static void thread(const MagickSizeType limit_); + static MagickSizeType thread(void); + + // Periodically yield the CPU for at least the time specified in + // milliseconds. + static void throttle(const MagickSizeType limit_); + static MagickSizeType throttle(void); + + // The maximum width of an image. + static void width(const MagickSizeType limit_); + static MagickSizeType width(void); + + private: + ResourceLimits(void); + + }; // class ResourceLimits + +} // Magick namespace + +#endif // Magick_ResourceLimits_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/STL.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/STL.h new file mode 100644 index 0000000000..076e7a12b0 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/STL.h @@ -0,0 +1,2874 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003 +// +// Copyright @ 2013 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition and implementation of template functions for using +// Magick::Image with STL containers. +// + +#ifndef Magick_STL_header +#define Magick_STL_header + +#include "Magick++/Include.h" +#include +#include +#include +#include +#include + +#include "Magick++/CoderInfo.h" +#include "Magick++/Drawable.h" +#include "Magick++/Exception.h" +#include "Magick++/Montage.h" + +namespace Magick +{ + // + // STL function object declarations/definitions + // + + // Function objects provide the means to invoke an operation on one + // or more image objects in an STL-compatable container. The + // arguments to the function object constructor(s) are compatable + // with the arguments to the equivalent Image class method and + // provide the means to supply these options when the function + // object is invoked. + + // For example, to read a GIF animation, set the color red to + // transparent for all frames, and write back out: + // + // list images; + // readImages( &images, "animation.gif" ); + // for_each( images.begin(), images.end(), transparentImage( "red" ) ); + // writeImages( images.begin(), images.end(), "animation.gif" ); + + // Adaptive-blur image with specified blur factor + class MagickPPExport adaptiveBlurImage + { + public: + adaptiveBlurImage( const double radius_ = 1, const double sigma_ = 0.5 ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + double _sigma; + }; + + // Local adaptive threshold image + // http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm + // Width x height define the size of the pixel neighborhood + // offset = constant to subtract from pixel neighborhood mean + class MagickPPExport adaptiveThresholdImage + { + public: + adaptiveThresholdImage( const size_t width_, + const size_t height_, + const ::ssize_t offset_ = 0 ); + + void operator()( Image &image_ ) const; + + private: + size_t _width; + size_t _height; + ::ssize_t _offset; + }; + + // Add noise to image with specified noise type + class MagickPPExport addNoiseImage + { + public: + addNoiseImage(const NoiseType noiseType_,const double attenuate_ = 1.0); + + void operator()(Image &image_) const; + + private: + NoiseType _noiseType; + double _attenuate; + }; + + // Transform image by specified affine (or free transform) matrix. + class MagickPPExport affineTransformImage + { + public: + affineTransformImage( const DrawableAffine &affine_ ); + + void operator()( Image &image_ ) const; + + private: + DrawableAffine _affine; + }; + + // Annotate image (draw text on image) + class MagickPPExport annotateImage + { + public: + // Annotate using specified text, and placement location + annotateImage ( const std::string &text_, + const Geometry &geometry_ ); + + // Annotate using specified text, bounding area, and placement + // gravity + annotateImage ( const std::string &text_, + const Geometry &geometry_, + const GravityType gravity_ ); + + // Annotate with text using specified text, bounding area, + // placement gravity, and rotation. + annotateImage ( const std::string &text_, + const Geometry &geometry_, + const GravityType gravity_, + const double degrees_ ); + + // Annotate with text (bounding area is entire image) and + // placement gravity. + annotateImage ( const std::string &text_, + const GravityType gravity_ ); + + void operator()( Image &image_ ) const; + + private: + const std::string _text; + const Geometry _geometry; + const GravityType _gravity; + const double _degrees; + }; + + // Blur image with specified blur factor + class MagickPPExport blurImage + { + public: + blurImage( const double radius_ = 1, const double sigma_ = 0.5 ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + double _sigma; + }; + + // Border image (add border to image) + class MagickPPExport borderImage + { + public: + borderImage( const Geometry &geometry_ = borderGeometryDefault ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // Extract channel from image + class MagickPPExport channelImage + { + public: + channelImage( const ChannelType channel_ ); + + void operator()( Image &image_ ) const; + + private: + ChannelType _channel; + }; + + // Charcoal effect image (looks like charcoal sketch) + class MagickPPExport charcoalImage + { + public: + charcoalImage( const double radius_ = 1, const double sigma_ = 0.5 ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + double _sigma; + }; + + // Chop image (remove vertical or horizontal subregion of image) + class MagickPPExport chopImage + { + public: + chopImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // Accepts a lightweight Color Correction Collection (CCC) file which solely + // contains one or more color corrections and applies the correction to the + // image. + class MagickPPExport cdlImage + { + public: + cdlImage( const std::string &cdl_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _cdl; + }; + + // Colorize image using pen color at specified percent alpha + class MagickPPExport colorizeImage + { + public: + colorizeImage( const unsigned int alphaRed_, + const unsigned int alphaGreen_, + const unsigned int alphaBlue_, + const Color &penColor_ ); + + colorizeImage( const unsigned int alpha_, + const Color &penColor_ ); + + void operator()( Image &image_ ) const; + + private: + unsigned int _alphaRed; + unsigned int _alphaGreen; + unsigned int _alphaBlue; + Color _penColor; + }; + + // Apply a color matrix to the image channels. The user supplied + // matrix may be of order 1 to 5 (1x1 through 5x5). + class MagickPPExport colorMatrixImage + { + public: + colorMatrixImage( const size_t order_, + const double *color_matrix_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _order; + const double *_color_matrix; + }; + + // Convert the image colorspace representation + class MagickPPExport colorSpaceImage + { + public: + colorSpaceImage( ColorspaceType colorSpace_ ); + + void operator()( Image &image_ ) const; + + private: + ColorspaceType _colorSpace; + }; + + // Comment image (add comment string to image) + class MagickPPExport commentImage + { + public: + commentImage( const std::string &comment_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _comment; + }; + + // Compose an image onto another at specified offset and using + // specified algorithm + class MagickPPExport compositeImage + { + public: + compositeImage( const Image &compositeImage_, + ::ssize_t xOffset_, + ::ssize_t yOffset_, + CompositeOperator compose_ = InCompositeOp ); + + compositeImage( const Image &compositeImage_, + const Geometry &offset_, + CompositeOperator compose_ = InCompositeOp ); + + void operator()( Image &image_ ) const; + + private: + Image _compositeImage; + ::ssize_t _xOffset; + ::ssize_t _yOffset; + CompositeOperator _compose; + }; + + // Contrast image (enhance intensity differences in image) + class MagickPPExport contrastImage + { + public: + contrastImage( const size_t sharpen_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _sharpen; + }; + + // Crop image (subregion of original image) + class MagickPPExport cropImage + { + public: + cropImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // Cycle image colormap + class MagickPPExport cycleColormapImage + { + public: + cycleColormapImage( const ::ssize_t amount_ ); + + void operator()( Image &image_ ) const; + + private: + ::ssize_t _amount; + }; + + // Despeckle image (reduce speckle noise) + class MagickPPExport despeckleImage + { + public: + despeckleImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Distort image. distorts an image using various distortion methods, by + // mapping color lookups of the source image to a new destination image + // usually of the same size as the source image, unless 'bestfit' is set to + // true. + class MagickPPExport distortImage + { + public: + distortImage( const Magick::DistortMethod method_, + const size_t number_arguments_, + const double *arguments_, + const bool bestfit_ ); + + distortImage( const Magick::DistortMethod method_, + const size_t number_arguments_, + const double *arguments_ ); + + void operator()( Image &image_ ) const; + + private: + DistortMethod _method; + size_t _number_arguments; + const double *_arguments; + bool _bestfit; + }; + + // Draw on image + class MagickPPExport drawImage + { + public: + // Draw on image using a single drawable + // Store in list to make implementation easier + drawImage( const Drawable &drawable_ ); + + // Draw on image using a drawable list + drawImage( const DrawableList &drawable_ ); + + void operator()( Image &image_ ) const; + + private: + DrawableList _drawableList; + }; + + // Edge image (highlight edges in image) + class MagickPPExport edgeImage + { + public: + edgeImage( const double radius_ = 0.0 ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + }; + + // Emboss image (highlight edges with 3D effect) + class MagickPPExport embossImage + { + public: + embossImage( void ); + embossImage( const double radius_, const double sigma_ ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + double _sigma; + }; + + // Enhance image (minimize noise) + class MagickPPExport enhanceImage + { + public: + enhanceImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Equalize image (histogram equalization) + class MagickPPExport equalizeImage + { + public: + equalizeImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Color to use when filling drawn objects + class MagickPPExport fillColorImage + { + public: + fillColorImage( const Color &fillColor_ ); + + void operator()( Image &image_ ) const; + + private: + Color _fillColor; + }; + + // Flip image (reflect each scanline in the vertical direction) + class MagickPPExport flipImage + { + public: + flipImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Floodfill designated area with a matte value + class MagickPPExport floodFillAlphaImage + + { + public: + floodFillAlphaImage(const ::ssize_t x_,const ::ssize_t y_, + const unsigned int alpha_,const Color &target_,const bool invert_=false); + + void operator()(Image &image_) const; + + private: + Color _target; + unsigned int _alpha; + ::ssize_t _x; + ::ssize_t _y; + bool _invert; + }; + + // Flood-fill image with color + class MagickPPExport floodFillColorImage + + { + public: + // Flood-fill color across pixels starting at target-pixel and + // stopping at pixels matching specified border color. + // Uses current fuzz setting when determining color match. + floodFillColorImage(const Geometry &point_,const Color &fillColor_, + const bool invert_=false); + floodFillColorImage(const ::ssize_t x_,const ::ssize_t y_, + const Color &fillColor_,const bool invert_=false); + + // Flood-fill color across pixels starting at target-pixel and + // stopping at pixels matching specified border color. + // Uses current fuzz setting when determining color match. + floodFillColorImage(const Geometry &point_,const Color &fillColor_, + const Color &borderColor_,const bool invert_=false); + floodFillColorImage(const ::ssize_t x_,const ::ssize_t y_, + const Color &fillColor_,const Color &borderColor_, + const bool invert_=false); + + void operator()(Image &image_) const; + + private: + ::ssize_t _x; + ::ssize_t _y; + Color _fillColor; + Color _borderColor; + bool _invert; + }; + + // Flood-fill image with texture + class MagickPPExport floodFillTextureImage + + { + public: + // Flood-fill texture across pixels that match the color of the + // target pixel and are neighbors of the target pixel. + // Uses current fuzz setting when determining color match. + floodFillTextureImage(const ::ssize_t x_,const ::ssize_t y_, + const Image &texture_,const bool invert_=false); + floodFillTextureImage(const Geometry &point_,const Image &texture_, + const bool invert_=false); + + // Flood-fill texture across pixels starting at target-pixel and + // stopping at pixels matching specified border color. + // Uses current fuzz setting when determining color match. + floodFillTextureImage(const ::ssize_t x_,const ::ssize_t y_, + const Image &texture_,const Color &borderColor_, + const bool invert_=false); + + floodFillTextureImage(const Geometry &point_,const Image &texture_, + const Color &borderColor_,const bool invert_=false); + + void operator()(Image &image_) const; + + private: + ::ssize_t _x; + ::ssize_t _y; + Image _texture; + Color _borderColor; + bool _invert; + }; + + // Flop image (reflect each scanline in the horizontal direction) + class MagickPPExport flopImage + { + public: + flopImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Frame image + class MagickPPExport frameImage + { + public: + frameImage( const Geometry &geometry_ = frameGeometryDefault ); + + frameImage( const size_t width_, const size_t height_, + const ::ssize_t innerBevel_ = 6, const ::ssize_t outerBevel_ = 6 ); + + void operator()( Image &image_ ) const; + + private: + size_t _width; + size_t _height; + ::ssize_t _outerBevel; + ::ssize_t _innerBevel; + }; + + // Gamma correct image + class MagickPPExport gammaImage + { + public: + gammaImage( const double gamma_ ); + + gammaImage ( const double gammaRed_, + const double gammaGreen_, + const double gammaBlue_ ); + + void operator()( Image &image_ ) const; + + private: + double _gammaRed; + double _gammaGreen; + double _gammaBlue; + }; + + // Gaussian blur image + // The number of neighbor pixels to be included in the convolution + // mask is specified by 'width_'. The standard deviation of the + // gaussian bell curve is specified by 'sigma_'. + class MagickPPExport gaussianBlurImage + { + public: + gaussianBlurImage( const double width_, const double sigma_ ); + + void operator()( Image &image_ ) const; + + private: + double _width; + double _sigma; + }; + + // Apply a color lookup table (Hald CLUT) to the image. + class MagickPPExport haldClutImage + { + public: + haldClutImage( const Image &haldClutImage_ ); + + void operator()( Image &image_ ) const; + + private: + Image _haldClutImage; + }; + + // Implode image (special effect) + class MagickPPExport implodeImage + { + public: + implodeImage( const double factor_ = 50 ); + + void operator()( Image &image_ ) const; + + private: + double _factor; + }; + + // implements the inverse discrete Fourier transform (IFT) of the image + // either as a magnitude / phase or real / imaginary image pair. + class MagickPPExport inverseFourierTransformImage + { + public: + inverseFourierTransformImage( const Image &phaseImage_ ); + + void operator()( Image &image_ ) const; + + private: + Image _phaseImage; + }; + + // Set image validity. Valid images become empty (inValid) if + // argument is false. + class MagickPPExport isValidImage + { + public: + isValidImage( const bool isValid_ ); + + void operator()( Image &image_ ) const; + + private: + bool _isValid; + }; + + // Label image + class MagickPPExport labelImage + { + public: + labelImage( const std::string &label_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _label; + }; + + + // Level image + class MagickPPExport levelImage + { + public: + levelImage( const double black_point, + const double white_point, + const double mid_point=1.0 ); + + void operator()( Image &image_ ) const; + + private: + double _black_point; + double _white_point; + double _mid_point; + }; + + // Magnify image by integral size + class MagickPPExport magnifyImage + { + public: + magnifyImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Remap image colors with closest color from reference image + class MagickPPExport mapImage + { + public: + mapImage( const Image &mapImage_ , + const bool dither_ = false ); + + void operator()( Image &image_ ) const; + + private: + Image _mapImage; + bool _dither; + }; + + // Filter image by replacing each pixel component with the median + // color in a circular neighborhood + class MagickPPExport medianConvolveImage + { + public: + medianConvolveImage( const double radius_ = 0.0 ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + }; + + // Merge image layers + class MagickPPExport mergeLayersImage + { + public: + mergeLayersImage ( LayerMethod layerMethod_ ); + + void operator()( Image &image_ ) const; + + private: + LayerMethod _layerMethod; + }; + + // Reduce image by integral size + class MagickPPExport minifyImage + { + public: + minifyImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Modulate percent hue, saturation, and brightness of an image + class MagickPPExport modulateImage + { + public: + modulateImage( const double brightness_, + const double saturation_, + const double hue_ ); + + void operator()( Image &image_ ) const; + + private: + double _brightness; + double _saturation; + double _hue; + }; + + // Negate colors in image. Set grayscale to only negate grayscale + // values in image. + class MagickPPExport negateImage + { + public: + negateImage( const bool grayscale_ = false ); + + void operator()( Image &image_ ) const; + + private: + bool _grayscale; + }; + + // Normalize image (increase contrast by normalizing the pixel + // values to span the full range of color values) + class MagickPPExport normalizeImage + { + public: + normalizeImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Oilpaint image (image looks like oil painting) + class MagickPPExport oilPaintImage + { + public: + oilPaintImage( const double radius_ = 3 ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + }; + + // Set or attenuate the image alpha channel. If the image pixels + // are opaque then they are set to the specified alpha value, + // otherwise they are blended with the supplied alpha value. The + // value of alpha_ ranges from 0 (completely opaque) to + // QuantumRange. The defines OpaqueAlpha and TransparentAlpha are + // available to specify completely opaque or completely transparent, + // respectively. + class MagickPPExport alphaImage + { + public: + alphaImage( const unsigned int alpha_ ); + + void operator()( Image &image_ ) const; + + private: + unsigned int _alpha; + }; + + // Change color of opaque pixel to specified pen color. + class MagickPPExport opaqueImage + { + public: + opaqueImage( const Color &opaqueColor_, + const Color &penColor_ ); + + void operator()( Image &image_ ) const; + + private: + Color _opaqueColor; + Color _penColor; + }; + + // Quantize image (reduce number of colors) + class MagickPPExport quantizeImage + { + public: + quantizeImage( const bool measureError_ = false ); + + void operator()( Image &image_ ) const; + + private: + bool _measureError; + }; + + // Raise image (lighten or darken the edges of an image to give a + // 3-D raised or lowered effect) + class MagickPPExport raiseImage + { + public: + raiseImage( const Geometry &geometry_ = raiseGeometryDefault, + const bool raisedFlag_ = false ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + bool _raisedFlag; + }; + + class MagickPPExport ReadOptions + { + public: + + // Default constructor + ReadOptions(void); + + // Copy constructor + ReadOptions(const ReadOptions& options_); + + // Destructor + ~ReadOptions(); + + // Vertical and horizontal resolution in pixels of the image + void density(const Geometry &geometry_); + Geometry density(void) const; + + // Image depth (8 or 16) + void depth(size_t depth_); + size_t depth(void) const; + + // Ping the image instead of reading it + void ping(const bool flag_); + bool ping(void) const; + + // Suppress all warning messages. Error messages are still reported. + void quiet(const bool quiet_); + bool quiet(void) const; + + // Image size (required for raw formats) + void size(const Geometry &geometry_); + Geometry size(void) const; + + // + // Internal implementation methods. Please do not use. + // + + MagickCore::ImageInfo *imageInfo(void); + + private: + + // Assignment not supported + ReadOptions& operator=(const ReadOptions&); + + MagickCore::ImageInfo *_imageInfo; + bool _quiet; + }; + + // Reduce noise in image using a noise peak elimination filter + class MagickPPExport reduceNoiseImage + { + public: + reduceNoiseImage( void ); + + reduceNoiseImage (const size_t order_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _order; + }; + + // Resize image to specified size. + class MagickPPExport resizeImage + { + public: + resizeImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // Roll image (rolls image vertically and horizontally) by specified + // number of columns and rows) + class MagickPPExport rollImage + { + public: + rollImage( const Geometry &roll_ ); + + rollImage( const ::ssize_t columns_, const ::ssize_t rows_ ); + + void operator()( Image &image_ ) const; + + private: + ssize_t _columns; + ssize_t _rows; + }; + + // Rotate image counter-clockwise by specified number of degrees. + class MagickPPExport rotateImage + { + public: + rotateImage( const double degrees_ ); + + void operator()( Image &image_ ) const; + + private: + double _degrees; + }; + + // Resize image by using pixel sampling algorithm + class MagickPPExport sampleImage + { + public: + sampleImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // Resize image by using simple ratio algorithm + class MagickPPExport scaleImage + { + public: + scaleImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // Segment (coalesce similar image components) by analyzing the + // histograms of the color components and identifying units that are + // homogeneous with the fuzzy c-means technique. + // Also uses QuantizeColorSpace and Verbose image attributes + class MagickPPExport segmentImage + { + public: + segmentImage( const double clusterThreshold_ = 1.0, + const double smoothingThreshold_ = 1.5 ); + + void operator()( Image &image_ ) const; + + private: + double _clusterThreshold; + double _smoothingThreshold; + }; + + // Shade image using distant light source + class MagickPPExport shadeImage + { + public: + shadeImage( const double azimuth_ = 30, + const double elevation_ = 30, + const bool colorShading_ = false ); + + void operator()( Image &image_ ) const; + + private: + double _azimuth; + double _elevation; + bool _colorShading; + }; + + // Shadow effect image (simulate an image shadow) + class MagickPPExport shadowImage + { + public: + shadowImage( const double percent_opacity_ = 80, const double sigma_ = 0.5, + const ssize_t x_ = 5, const ssize_t y_ = 5 ); + + void operator()( Image &image_ ) const; + + private: + double _percent_opacity; + double _sigma; + ssize_t _x; + ssize_t _y; + }; + + // Sharpen pixels in image + class MagickPPExport sharpenImage + { + public: + sharpenImage( const double radius_ = 1, const double sigma_ = 0.5 ); + + void operator()( Image &image_ ) const; + + private: + double _radius; + double _sigma; + }; + + // Shave pixels from image edges. + class MagickPPExport shaveImage + { + public: + shaveImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + + // Shear image (create parallelogram by sliding image by X or Y axis) + class MagickPPExport shearImage + { + public: + shearImage( const double xShearAngle_, + const double yShearAngle_ ); + + void operator()( Image &image_ ) const; + + private: + double _xShearAngle; + double _yShearAngle; + }; + + // Solarize image (similar to effect seen when exposing a + // photographic film to light during the development process) + class MagickPPExport solarizeImage + { + public: + solarizeImage( const double factor_ ); + + void operator()( Image &image_ ) const; + + private: + double _factor; + }; + + // Splice the background color into the image. + class MagickPPExport spliceImage + { + public: + spliceImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // Spread pixels randomly within image by specified amount + class MagickPPExport spreadImage + { + public: + spreadImage( const size_t amount_ = 3 ); + + void operator()( Image &image_ ) const; + + private: + size_t _amount; + }; + + // Add a digital watermark to the image (based on second image) + class MagickPPExport steganoImage + { + public: + steganoImage( const Image &waterMark_ ); + + void operator()( Image &image_ ) const; + + private: + Image _waterMark; + }; + + // Create an image which appears in stereo when viewed with red-blue glasses + // (Red image on left, blue on right) + class MagickPPExport stereoImage + { + public: + stereoImage( const Image &rightImage_ ); + + void operator()( Image &image_ ) const; + + private: + Image _rightImage; + }; + + // Color to use when drawing object outlines + class MagickPPExport strokeColorImage + { + public: + strokeColorImage( const Color &strokeColor_ ); + + void operator()( Image &image_ ) const; + + private: + Color _strokeColor; + }; + + // Swirl image (image pixels are rotated by degrees) + class MagickPPExport swirlImage + { + public: + swirlImage( const double degrees_ ); + + void operator()( Image &image_ ) const; + + private: + double _degrees; + }; + + // Channel a texture on image background + class MagickPPExport textureImage + { + public: + textureImage( const Image &texture_ ); + + void operator()( Image &image_ ) const; + + private: + Image _texture; + }; + + // Threshold image + class MagickPPExport thresholdImage + { + public: + thresholdImage( const double threshold_ ); + + void operator()( Image &image_ ) const; + + private: + double _threshold; + }; + + // Set image color to transparent + class MagickPPExport transparentImage + { + public: + transparentImage( const Color& color_ ); + + void operator()( Image &image_ ) const; + + private: + Color _color; + }; + + // Trim edges that are the background color from the image + class MagickPPExport trimImage + { + public: + trimImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Map image pixels to a sine wave + class MagickPPExport waveImage + { + public: + waveImage( const double amplitude_ = 25.0, + const double wavelength_ = 150.0 ); + + void operator()( Image &image_ ) const; + + private: + double _amplitude; + double _wavelength; + }; + + // Zoom image to specified size. + class MagickPPExport zoomImage + { + public: + zoomImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // + // Function object image attribute accessors + // + + // Join images into a single multi-image file + class MagickPPExport adjoinImage + { + public: + adjoinImage( const bool flag_ ); + + void operator()( Image &image_ ) const; + + private: + bool _flag; + }; + + // Time in 1/100ths of a second which must expire before displaying + // the next image in an animated sequence. + class MagickPPExport animationDelayImage + { + public: + animationDelayImage( const size_t delay_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _delay; + }; + + // Number of iterations to loop an animation (e.g. Netscape loop + // extension) for. + class MagickPPExport animationIterationsImage + { + public: + animationIterationsImage( const size_t iterations_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _iterations; + }; + + // Image background color + class MagickPPExport backgroundColorImage + { + public: + backgroundColorImage( const Color &color_ ); + + void operator()( Image &image_ ) const; + + private: + Color _color; + }; + + // Name of texture image to tile onto the image background + class MagickPPExport backgroundTextureImage + { + public: + backgroundTextureImage( const std::string &backgroundTexture_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _backgroundTexture; + }; + + // Image border color + class MagickPPExport borderColorImage + { + public: + borderColorImage( const Color &color_ ); + + void operator()( Image &image_ ) const; + + private: + Color _color; + }; + + // Text bounding-box base color (default none) + class MagickPPExport boxColorImage + { + public: + boxColorImage( const Color &boxColor_ ); + + void operator()( Image &image_ ) const; + + private: + Color _boxColor; + }; + + // Chromaticity blue primary point. + class MagickPPExport chromaBluePrimaryImage + { + public: + chromaBluePrimaryImage(const double x_,const double y_,const double z_); + + void operator()(Image &image_) const; + + private: + double _x; + double _y; + double _z; + }; + + // Chromaticity green primary point. + class MagickPPExport chromaGreenPrimaryImage + { + public: + chromaGreenPrimaryImage(const double x_,const double y_,const double z_); + + void operator()(Image &image_) const; + + private: + double _x; + double _y; + double _z; + }; + + // Chromaticity red primary point. + class MagickPPExport chromaRedPrimaryImage + { + public: + chromaRedPrimaryImage(const double x_,const double y_,const double z_); + + void operator()(Image &image_) const; + + private: + double _x; + double _y; + double _z; + }; + + // Chromaticity white point. + class MagickPPExport chromaWhitePointImage + { + public: + chromaWhitePointImage(const double x_,const double y_,const double z_); + + void operator()(Image &image_) const; + + private: + double _x; + double _y; + double _z; + }; + + // Colors within this distance are considered equal + class MagickPPExport colorFuzzImage + { + public: + colorFuzzImage( const double fuzz_ ); + + void operator()( Image &image_ ) const; + + private: + double _fuzz; + }; + + // Color at colormap position index_ + class MagickPPExport colorMapImage + { + public: + colorMapImage( const size_t index_, const Color &color_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _index; + Color _color; + }; + + // Composition operator to be used when composition is implicitly used + // (such as for image flattening). + class MagickPPExport composeImage + { + public: + composeImage( const CompositeOperator compose_ ); + + void operator()( Image &image_ ) const; + + private: + CompositeOperator _compose; + }; + + // Compression type + class MagickPPExport compressTypeImage + { + public: + compressTypeImage( const CompressionType compressType_ ); + + void operator()( Image &image_ ) const; + + private: + CompressionType _compressType; + }; + + // Vertical and horizontal resolution in pixels of the image + class MagickPPExport densityImage + { + public: + densityImage( const Point &point_ ); + + void operator()( Image &image_ ) const; + + private: + Point _point; + }; + + // Image depth (bits allocated to red/green/blue components) + class MagickPPExport depthImage + { + public: + depthImage( const size_t depth_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _depth; + }; + + // Endianness (LSBEndian like Intel or MSBEndian like SPARC) for image + // formats which support endian-specific options. + class MagickPPExport endianImage + { + public: + endianImage( const EndianType endian_ ); + + void operator()( Image &image_ ) const; + + private: + EndianType _endian; + }; + + // Image file name + class MagickPPExport fileNameImage + { + public: + fileNameImage( const std::string &fileName_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _fileName; + }; + + // Filter to use when resizing image + class MagickPPExport filterTypeImage + { + public: + filterTypeImage( const FilterType filterType_ ); + + void operator()( Image &image_ ) const; + + private: + FilterType _filterType; + }; + + // Text rendering font + class MagickPPExport fontImage + { + public: + fontImage( const std::string &font_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _font; + }; + + // Font point size + class MagickPPExport fontPointsizeImage + { + public: + fontPointsizeImage( const size_t pointsize_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _pointsize; + }; + + // GIF disposal method + class MagickPPExport gifDisposeMethodImage + { + public: + gifDisposeMethodImage( const DisposeType disposeMethod_ ); + + void operator()( Image &image_ ) const; + + private: + DisposeType _disposeMethod; + }; + + // Type of interlacing to use + class MagickPPExport interlaceTypeImage + { + public: + interlaceTypeImage( const InterlaceType interlace_ ); + + void operator()( Image &image_ ) const; + + private: + InterlaceType _interlace; + }; + + // File type magick identifier (.e.g "GIF") + class MagickPPExport magickImage + { + public: + magickImage( const std::string &magick_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _magick; + }; + + // Image supports transparent color + class MagickPPExport alphaFlagImage + { + public: + alphaFlagImage( const bool alphaFlag_ ); + + void operator()( Image &image_ ) const; + + private: + bool _alphaFlag; + }; + + // Transparent color + class MagickPPExport matteColorImage + { + public: + matteColorImage( const Color &matteColor_ ); + + void operator()( Image &image_ ) const; + + private: + Color _matteColor; + }; + + // Indicate that image is black and white + class MagickPPExport monochromeImage + { + public: + monochromeImage( const bool monochromeFlag_ ); + + void operator()( Image &image_ ) const; + + private: + bool _monochromeFlag; + }; + + // Pen color + class MagickPPExport penColorImage + { + public: + penColorImage( const Color &penColor_ ); + + void operator()( Image &image_ ) const; + + private: + Color _penColor; + }; + + // Pen texture image. + class MagickPPExport penTextureImage + { + public: + penTextureImage( const Image &penTexture_ ); + + void operator()( Image &image_ ) const; + + private: + Image _penTexture; + }; + + // Set pixel color at location x & y. + class MagickPPExport pixelColorImage + { + public: + pixelColorImage( const ::ssize_t x_, + const ::ssize_t y_, + const Color &color_); + + void operator()( Image &image_ ) const; + + private: + ::ssize_t _x; + ::ssize_t _y; + Color _color; + }; + + // Postscript page size. + class MagickPPExport pageImage + { + public: + pageImage( const Geometry &pageSize_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _pageSize; + }; + + // JPEG/MIFF/PNG compression level (default 75). + class MagickPPExport qualityImage + { + public: + qualityImage( const size_t quality_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _quality; + }; + + // Maximum number of colors to quantize to + class MagickPPExport quantizeColorsImage + { + public: + quantizeColorsImage( const size_t colors_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _colors; + }; + + // Colorspace to quantize in. + class MagickPPExport quantizeColorSpaceImage + { + public: + quantizeColorSpaceImage( const ColorspaceType colorSpace_ ); + + void operator()( Image &image_ ) const; + + private: + ColorspaceType _colorSpace; + }; + + // Dither image during quantization (default true). + class MagickPPExport quantizeDitherImage + { + public: + quantizeDitherImage( const bool ditherFlag_ ); + + void operator()( Image &image_ ) const; + + private: + bool _ditherFlag; + }; + + // Quantization tree-depth + class MagickPPExport quantizeTreeDepthImage + { + public: + quantizeTreeDepthImage( const size_t treeDepth_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _treeDepth; + }; + + // The type of rendering intent + class MagickPPExport renderingIntentImage + { + public: + renderingIntentImage( const RenderingIntent renderingIntent_ ); + + void operator()( Image &image_ ) const; + + private: + RenderingIntent _renderingIntent; + }; + + // Units of image resolution + class MagickPPExport resolutionUnitsImage + { + public: + resolutionUnitsImage( const ResolutionType resolutionUnits_ ); + + void operator()( Image &image_ ) const; + + private: + ResolutionType _resolutionUnits; + }; + + // Image scene number + class MagickPPExport sceneImage + { + public: + sceneImage( const size_t scene_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _scene; + }; + + // adjust the image contrast with a non-linear sigmoidal contrast algorithm + class MagickPPExport sigmoidalContrastImage + { + public: + sigmoidalContrastImage( const size_t sharpen_, + const double contrast, + const double midpoint = (double) QuantumRange / 2.0 ); + + void operator()( Image &image_ ) const; + + private: + size_t _sharpen; + double contrast; + double midpoint; + }; + + // Width and height of a raw image + class MagickPPExport sizeImage + { + public: + sizeImage( const Geometry &geometry_ ); + + void operator()( Image &image_ ) const; + + private: + Geometry _geometry; + }; + + // stripImage strips an image of all profiles and comments. + class MagickPPExport stripImage + { + public: + stripImage( void ); + + void operator()( Image &image_ ) const; + + private: + }; + + // Subimage of an image sequence + class MagickPPExport subImageImage + { + public: + subImageImage( const size_t subImage_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _subImage; + }; + + // Number of images relative to the base image + class MagickPPExport subRangeImage + { + public: + subRangeImage( const size_t subRange_ ); + + void operator()( Image &image_ ) const; + + private: + size_t _subRange; + }; + + // Anti-alias Postscript and TrueType fonts (default true) + class MagickPPExport textAntiAliasImage + { + public: + textAntiAliasImage( const bool flag_ ); + + void operator()( Image &image_ ) const; + + private: + bool _flag; + }; + + // Image storage type + class MagickPPExport typeImage + { + public: + typeImage( const ImageType type_ ); + + void operator()( Image &image_ ) const; + + private: + Magick::ImageType _type; + }; + + + // Print detailed information about the image + class MagickPPExport verboseImage + { + public: + verboseImage( const bool verbose_ ); + + void operator()( Image &image_ ) const; + + private: + bool _verbose; + }; + + // X11 display to display to, obtain fonts from, or to capture + // image from + class MagickPPExport x11DisplayImage + { + public: + x11DisplayImage( const std::string &display_ ); + + void operator()( Image &image_ ) const; + + private: + std::string _display; + }; + + ////////////////////////////////////////////////////////// + // + // Implementation template definitions. Not for end-use. + // + ////////////////////////////////////////////////////////// + + // Changes the channel mask of the images and places the old + // values in the container. + template + void channelMaskImages(InputIterator first_,InputIterator last_, + Container *container_,const ChannelType channel_) + { + MagickCore::ChannelType + channel_mask; + + container_->clear(); + for (InputIterator iter = first_; iter != last_; ++iter) + { + iter->modifyImage(); + channel_mask=MagickCore::SetImageChannelMask(iter->image(),channel_); + container_->push_back(channel_mask); + } + } + + // Insert images in image list into existing container (appending to container) + // The images should not be deleted since only the image ownership is passed. + // The options are copied into the object. + template + void insertImages(Container *sequence_,MagickCore::Image* images_) + { + MagickCore::Image + *image, + *next; + + image=images_; + while (image != (MagickCore::Image *) NULL) + { + next=image->next; + image->next=(MagickCore::Image *) NULL; + + if (next != (MagickCore::Image *) NULL) + next->previous=(MagickCore::Image *) NULL; + + sequence_->push_back(Magick::Image(image)); + + image=next; + } + } + + // Link images together into an image list based on the ordering of + // the container implied by the iterator. This step is done in + // preparation for use with ImageMagick functions which operate on + // lists of images. + // Images are selected by range, first_ to last_ so that a subset of + // the container may be selected. Specify first_ via the + // container's begin() method and last_ via the container's end() + // method in order to specify the entire container. + template + bool linkImages(InputIterator first_,InputIterator last_) + { + MagickCore::Image + *current, + *previous; + + ::ssize_t + scene; + + scene=0; + previous=(MagickCore::Image *) NULL; + for (InputIterator iter = first_; iter != last_; ++iter) + { + // Unless we reduce the reference count to one, the same image + // structure may occur more than once in the container, causing + // the linked list to fail. + iter->modifyImage(); + + current=iter->image(); + + current->previous=previous; + current->next=(MagickCore::Image *) NULL; + current->scene=(size_t) scene++; + + if (previous != (MagickCore::Image *) NULL) + previous->next=current; + + previous=current; + } + return(scene > 0 ? true : false); + } + + // Restores the channel mask of the images. + template + void restoreChannelMaskImages(InputIterator first_,InputIterator last_, + Container *container_) + { + typename Container::iterator + channel_mask; + + channel_mask=container_->begin(); + for (InputIterator iter = first_; iter != last_; ++iter) + { + iter->modifyImage(); + (void) MagickCore::SetImageChannelMask(iter->image(), + (const MagickCore::ChannelType) *channel_mask); + channel_mask++; + } + } + + // Remove links added by linkImages. This should be called after the + // ImageMagick function call has completed to reset the image list + // back to its pristine un-linked state. + template + void unlinkImages(InputIterator first_,InputIterator last_) + { + MagickCore::Image + *image; + + for (InputIterator iter = first_; iter != last_; ++iter) + { + image=iter->image(); + image->previous=(MagickCore::Image *) NULL; + image->next=(MagickCore::Image *) NULL; + } + } + + /////////////////////////////////////////////////////////////////// + // + // Template definitions for documented API + // + /////////////////////////////////////////////////////////////////// + + template + void animateImages( InputIterator first_,InputIterator last_) + { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::AnimateImages(first_->imageInfo(),first_->image(), + exceptionInfo); + unlinkImages(first_,last_); + ThrowPPException(first_->quiet()); + } + + // Append images from list into single image in either horizontal or + // vertical direction. + template + void appendImages( Image *appendedImage_, + InputIterator first_, + InputIterator last_, + bool stack_ = false) { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::Image* image = MagickCore::AppendImages( first_->image(), + (MagickBooleanType) stack_, + exceptionInfo ); + unlinkImages( first_, last_ ); + appendedImage_->replaceImage( image ); + ThrowPPException(appendedImage_->quiet()); + } + + // Adds the names of the artifacts of the image to the container. + template + void artifactNames(Container *names_,const Image* image_) + { + const char* + name; + + names_->clear(); + + MagickCore::ResetImageArtifactIterator(image_->constImage()); + name=MagickCore::GetNextImageArtifact(image_->constImage()); + while (name != (const char *) NULL) + { + names_->push_back(std::string(name)); + name=MagickCore::GetNextImageArtifact(image_->constImage()); + } + } + + // Adds the names of the attributes of the image to the container. + template + void attributeNames(Container *names_,const Image* image_) + { + const char* + name; + + names_->clear(); + + MagickCore::ResetImagePropertyIterator(image_->constImage()); + name=MagickCore::GetNextImageProperty(image_->constImage()); + while (name != (const char *) NULL) + { + names_->push_back(std::string(name)); + name=MagickCore::GetNextImageProperty(image_->constImage()); + } + } + + // Average a set of images. + // All the input images must be the same size in pixels. + template + void averageImages( Image *averagedImage_, + InputIterator first_, + InputIterator last_ ) { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::Image* image = MagickCore::EvaluateImages( first_->image(), + MagickCore::MeanEvaluateOperator, exceptionInfo ); + unlinkImages( first_, last_ ); + averagedImage_->replaceImage( image ); + ThrowPPException(averagedImage_->quiet()); + } + + // Merge a sequence of images. + // This is useful for GIF animation sequences that have page + // offsets and disposal methods. A container to contain + // the updated image sequence is passed via the coalescedImages_ + // option. + template + void coalesceImages(Container *coalescedImages_,InputIterator first_, + InputIterator last_) + { + bool + quiet; + + MagickCore::Image + *images; + + if (linkImages(first_,last_) == false) + return; + + GetPPException; + quiet=first_->quiet(); + images=MagickCore::CoalesceImages(first_->image(),exceptionInfo); + + // Unlink image list + unlinkImages(first_,last_); + + // Ensure container is empty + coalescedImages_->clear(); + + // Move images to container + insertImages(coalescedImages_,images); + + // Report any error + ThrowPPException(quiet); + } + + // Return format coders matching specified conditions. + // + // The default (if no match terms are supplied) is to return all + // available format coders. + // + // For example, to return all readable formats: + // list coderList; + // coderInfoList( &coderList, CoderInfo::TrueMatch, CoderInfo::AnyMatch, CoderInfo::AnyMatch) + // + template + void coderInfoList( Container *container_, + CoderInfo::MatchType isReadable_ = CoderInfo::AnyMatch, + CoderInfo::MatchType isWritable_ = CoderInfo::AnyMatch, + CoderInfo::MatchType isMultiFrame_ = CoderInfo::AnyMatch + ) { + // Obtain first entry in MagickInfo list + size_t number_formats; + GetPPException; + char **coder_list = + MagickCore::GetMagickList( "*", &number_formats, exceptionInfo ); + if( !coder_list ) + { + throwException(exceptionInfo); + throwExceptionExplicit(MagickCore::MissingDelegateError, + "Coder array not returned!", 0 ); + } + + // Clear out container + container_->clear(); + + for ( ::ssize_t i=0; i < (::ssize_t) number_formats; i++) + { + const MagickCore::MagickInfo *magick_info = + MagickCore::GetMagickInfo( coder_list[i], exceptionInfo ); + if (!magick_info) + continue; + + coder_list[i]=(char *) + MagickCore::RelinquishMagickMemory( coder_list[i] ); + + // Skip stealth coders + if ( MagickCore::GetMagickStealth(magick_info) ) + continue; + + try { + CoderInfo coderInfo( magick_info->name ); + + // Test isReadable_ + if ( isReadable_ != CoderInfo::AnyMatch && + (( coderInfo.isReadable() && isReadable_ != CoderInfo::TrueMatch ) || + ( !coderInfo.isReadable() && isReadable_ != CoderInfo::FalseMatch )) ) + continue; + + // Test isWritable_ + if ( isWritable_ != CoderInfo::AnyMatch && + (( coderInfo.isWritable() && isWritable_ != CoderInfo::TrueMatch ) || + ( !coderInfo.isWritable() && isWritable_ != CoderInfo::FalseMatch )) ) + continue; + + // Test isMultiFrame_ + if ( isMultiFrame_ != CoderInfo::AnyMatch && + (( coderInfo.isMultiFrame() && isMultiFrame_ != CoderInfo::TrueMatch ) || + ( !coderInfo.isMultiFrame() && isMultiFrame_ != CoderInfo::FalseMatch )) ) + continue; + + // Append matches to container + container_->push_back( coderInfo ); + } + // Intentionally ignore missing module errors + catch (Magick::ErrorModule&) + { + continue; + } + } + coder_list=(char **) MagickCore::RelinquishMagickMemory( coder_list ); + ThrowPPException(false); + } + + // + // Fill container with color histogram. + // Entries are of type "std::pair". Use the pair + // "first" member to access the Color and the "second" member to access + // the number of times the color occurs in the image. + // + // For example: + // + // Using : + // + // Image image("image.miff"); + // map histogram; + // colorHistogram( &histogram, image ); + // std::map::const_iterator p=histogram.begin(); + // while (p != histogram.end()) + // { + // cout << setw(10) << (int)p->second << ": (" + // << setw(quantum_width) << (int)p->first.redQuantum() << "," + // << setw(quantum_width) << (int)p->first.greenQuantum() << "," + // << setw(quantum_width) << (int)p->first.blueQuantum() << ")" + // << endl; + // p++; + // } + // + // Using : + // + // Image image("image.miff"); + // std::vector > histogram; + // colorHistogram( &histogram, image ); + // std::vector >::const_iterator p=histogram.begin(); + // while (p != histogram.end()) + // { + // cout << setw(10) << (int)p->second << ": (" + // << setw(quantum_width) << (int)p->first.redQuantum() << "," + // << setw(quantum_width) << (int)p->first.greenQuantum() << "," + // << setw(quantum_width) << (int)p->first.blueQuantum() << ")" + // << endl; + // p++; + // } + + template + void colorHistogram( Container *histogram_, const Image image) + { + GetPPException; + + // Obtain histogram array + size_t colors; + MagickCore::PixelInfo *histogram_array = + MagickCore::GetImageHistogram( image.constImage(), &colors, exceptionInfo ); + ThrowPPException(image.quiet()); + + // Clear out container + histogram_->clear(); + + // Transfer histogram array to container + for ( size_t i=0; i < colors; i++) + { + histogram_->insert( histogram_->end(), std::pair + ( Color(histogram_array[i]), (size_t) histogram_array[i].count) ); + } + + // Deallocate histogram array + histogram_array=(MagickCore::PixelInfo *) + MagickCore::RelinquishMagickMemory(histogram_array); + } + + // Combines one or more images into a single image. The grayscale value of + // the pixels of each image in the sequence is assigned in order to the + // specified channels of the combined image. The typical ordering would be + // image 1 => Red, 2 => Green, 3 => Blue, etc. + template + void combineImages(Image *combinedImage_,InputIterator first_, + InputIterator last_,const ChannelType channel_, + const ColorspaceType colorspace_ = MagickCore::sRGBColorspace) + { + MagickCore::Image + *image; + + std::vector + channelMask; + + if (linkImages(first_,last_) == false) + return; + GetPPException; + channelMaskImages(first_,last_,&channelMask,channel_); + image=CombineImages(first_->image(),colorspace_,exceptionInfo); + restoreChannelMaskImages(first_,last_,&channelMask); + unlinkImages(first_,last_); + combinedImage_->replaceImage(image); + ThrowPPException(combinedImage_->quiet()); + } + + template + void cropToTiles(Container *tiledImages_,const Image image_, + const Geometry &geometry_) + { + GetPPException; + MagickCore::Image* images=CropImageToTiles(image_.constImage(), + static_cast(geometry_).c_str(),exceptionInfo); + tiledImages_->clear(); + insertImages(tiledImages_,images); + ThrowPPException(image_.quiet()); + } + + // Break down an image sequence into constituent parts. This is + // useful for creating GIF or MNG animation sequences. + template + void deconstructImages(Container *deconstructedImages_, + InputIterator first_,InputIterator last_) + { + bool + quiet; + + MagickCore::Image + *images; + + if (linkImages(first_,last_) == false) + return; + GetPPException; + quiet=first_->quiet(); + images=CompareImagesLayers(first_->image(),CompareAnyLayer,exceptionInfo); + unlinkImages(first_,last_); + + deconstructedImages_->clear(); + insertImages(deconstructedImages_,images); + + ThrowPPException(quiet); + } + + // + // Display an image sequence + // + template + void displayImages(InputIterator first_,InputIterator last_) + { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::DisplayImages(first_->imageInfo(),first_->image(), + exceptionInfo); + unlinkImages(first_,last_); + ThrowPPException(first_->quiet()); + } + + // Applies a value to the image with an arithmetic, relational, + // or logical operator to an image. Use these operations to lighten or darken + // an image, to increase or decrease contrast in an image, or to produce the + // "negative" of an image. + template + void evaluateImages( Image *evaluatedImage_, + InputIterator first_, + InputIterator last_, + const MagickEvaluateOperator operator_ ) { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::Image* image = EvaluateImages( first_->image(), operator_, exceptionInfo ); + unlinkImages( first_, last_ ); + evaluatedImage_->replaceImage( image ); + ThrowPPException(evaluatedImage_->quiet()); + } + + // Merge a sequence of image frames which represent image layers. + // This is useful for combining Photoshop layers into a single image. + template + void flattenImages( Image *flattenedImage_, + InputIterator first_, + InputIterator last_ ) { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::Image* image = MagickCore::MergeImageLayers( first_->image(), + FlattenLayer,exceptionInfo ); + unlinkImages( first_, last_ ); + flattenedImage_->replaceImage( image ); + ThrowPPException(flattenedImage_->quiet()); + } + + // Implements the discrete Fourier transform (DFT) of the image either as a + // magnitude / phase or real / imaginary image pair. + template + void forwardFourierTransformImage( Container *fourierImages_, + const Image &image_ ) { + GetPPException; + + // Build image list + MagickCore::Image* images = ForwardFourierTransformImage( + image_.constImage(), MagickTrue, exceptionInfo); + + // Ensure container is empty + fourierImages_->clear(); + + // Move images to container + insertImages( fourierImages_, images ); + + // Report any error + ThrowPPException(image_.quiet()); + } + template + void forwardFourierTransformImage( Container *fourierImages_, + const Image &image_, const bool magnitude_ ) { + GetPPException; + + // Build image list + MagickCore::Image* images = ForwardFourierTransformImage( + image_.constImage(), magnitude_ == true ? MagickTrue : MagickFalse, + exceptionInfo); + + // Ensure container is empty + fourierImages_->clear(); + + // Move images to container + insertImages( fourierImages_, images ); + + // Report any error + ThrowPPException(image_.quiet()); + } + + // Applies a mathematical expression to a sequence of images. + template + void fxImages(Image *fxImage_,InputIterator first_,InputIterator last_, + const std::string expression) + { + MagickCore::Image + *image; + + if (linkImages(first_,last_) == false) + return; + GetPPException; + image=FxImage(first_->constImage(),expression.c_str(),exceptionInfo); + unlinkImages(first_,last_); + fxImage_->replaceImage(image); + ThrowPPException(fxImage_->quiet()); + } + + // Replace the colors of a sequence of images with the closest color + // from a reference image. + // Set dither_ to true to enable dithering. Set measureError_ to + // true in order to evaluate quantization error. + template + void mapImages(InputIterator first_,InputIterator last_, + const Image& mapImage_,bool dither_=false,bool measureError_=false) + { + MagickCore::Image + *image; + + MagickCore::QuantizeInfo + quantizeInfo; + + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::GetQuantizeInfo(&quantizeInfo); + quantizeInfo.dither_method = dither_ ? MagickCore::RiemersmaDitherMethod : + MagickCore::NoDitherMethod; + MagickCore::RemapImages(&quantizeInfo,first_->image(), + (mapImage_.isValid() ? mapImage_.constImage() : + (const MagickCore::Image*) NULL),exceptionInfo); + unlinkImages(first_,last_); + if (exceptionInfo->severity != MagickCore::UndefinedException) + { + unlinkImages(first_,last_); + throwException(exceptionInfo,mapImage_.quiet()); + } + + image=first_->image(); + while(image != (MagickCore::Image *) NULL) + { + // Calculate quantization error + if (measureError_) + { + MagickCore::GetImageQuantizeError(image,exceptionInfo); + if (exceptionInfo->severity > MagickCore::UndefinedException) + { + unlinkImages(first_,last_); + throwException(exceptionInfo,mapImage_.quiet()); + } + } + + // Update DirectClass representation of pixels + MagickCore::SyncImage(image,exceptionInfo); + if (exceptionInfo->severity > MagickCore::UndefinedException) + { + unlinkImages(first_,last_); + throwException(exceptionInfo,mapImage_.quiet()); + } + + // Next image + image=image->next; + } + + unlinkImages(first_,last_); + (void) MagickCore::DestroyExceptionInfo(exceptionInfo); + } + + // Composes all the image layers from the current given + // image onward to produce a single image of the merged layers. + template + void mergeImageLayers( Image *mergedImage_, + InputIterator first_, + InputIterator last_, + const LayerMethod method_ ) { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::Image* image = MergeImageLayers( first_->image(), method_, exceptionInfo ); + unlinkImages( first_, last_ ); + mergedImage_->replaceImage( image ); + ThrowPPException(mergedImage_->quiet()); + } + + // Create a composite image by combining several separate images. + template + void montageImages(Container *montageImages_,InputIterator first_, + InputIterator last_,const Montage &options_) + { + bool + quiet; + + MagickCore::Image + *images; + + MagickCore::MontageInfo + *montageInfo; + + if (linkImages(first_,last_) == false) + return; + + montageInfo=static_cast( + MagickCore::AcquireMagickMemory(sizeof(MagickCore::MontageInfo))); + + // Update montage options with those set in montageOpts_ + options_.updateMontageInfo(*montageInfo); + + // Update options which must transfer to image options + if (options_.label().length() != 0) + first_->label(options_.label()); + + // Do montage + GetPPException; + quiet=first_->quiet(); + images=MagickCore::MontageImages(first_->image(),montageInfo, + exceptionInfo); + + // Unlink linked image list + unlinkImages(first_,last_); + + // Reset output container to pristine state + montageImages_->clear(); + + if (images != (MagickCore::Image *) NULL) + insertImages(montageImages_,images); + + // Clean up any allocated data in montageInfo + MagickCore::DestroyMontageInfo(montageInfo); + + // Report any montage error + ThrowPPException(quiet); + + // Apply transparency to montage images + if (montageImages_->size() > 0 && options_.transparentColor().isValid()) + for_each(montageImages_->begin(),montageImages_->end(),transparentImage( + options_.transparentColor())); + } + + // Morph a set of images + template + void morphImages(Container *morphedImages_,InputIterator first_, + InputIterator last_,size_t frames_) + { + bool + quiet; + + MagickCore::Image + *images; + + if (linkImages(first_,last_) == false) + return; + + GetPPException; + quiet=first_->quiet(); + images=MagickCore::MorphImages(first_->image(),frames_,exceptionInfo); + + // Unlink image list + unlinkImages(first_,last_); + + // Ensure container is empty + morphedImages_->clear(); + + // Move images to container + insertImages(morphedImages_,images); + + // Report any error + ThrowPPException(quiet); + } + + // Inlay a number of images to form a single coherent picture. + template + void mosaicImages( Image *mosaicImage_, + InputIterator first_, + InputIterator last_ ) { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::Image* image = MagickCore::MergeImageLayers( first_->image(), + MosaicLayer,exceptionInfo ); + unlinkImages( first_, last_ ); + mosaicImage_->replaceImage( image ); + ThrowPPException(mosaicImage_->quiet()); + } + + // Compares each image the GIF disposed forms of the previous image in + // the sequence. From this it attempts to select the smallest cropped + // image to replace each frame, while preserving the results of the + // GIF animation. + template + void optimizeImageLayers(Container *optimizedImages_,InputIterator first_, + InputIterator last_) + { + bool + quiet; + + MagickCore::Image + *images; + + if (linkImages(first_,last_) == false) + return; + + GetPPException; + quiet=first_->quiet(); + images=OptimizeImageLayers(first_->image(),exceptionInfo); + + unlinkImages(first_,last_); + + optimizedImages_->clear(); + + insertImages(optimizedImages_,images); + + ThrowPPException(quiet); + } + + // optimizeImagePlusLayers is exactly as optimizeImageLayers, but may + // also add or even remove extra frames in the animation, if it improves + // the total number of pixels in the resulting GIF animation. + template + void optimizePlusImageLayers(Container *optimizedImages_, + InputIterator first_,InputIterator last_ ) + { + bool + quiet; + + MagickCore::Image + *images; + + if (linkImages(first_,last_) == false) + return; + + GetPPException; + quiet=first_->quiet(); + images=OptimizePlusImageLayers(first_->image(),exceptionInfo); + + unlinkImages(first_,last_); + + optimizedImages_->clear(); + + insertImages(optimizedImages_,images); + + ThrowPPException(quiet); + } + + // Compares each image the GIF disposed forms of the previous image in the + // sequence. Any pixel that does not change the displayed result is replaced + // with transparency. + template + void optimizeTransparency(InputIterator first_,InputIterator last_) + { + if (linkImages(first_,last_) == false) + return; + GetPPException; + OptimizeImageTransparency(first_->image(),exceptionInfo); + unlinkImages(first_,last_ ); + + ThrowPPException(first_->quiet()); + } + + // Ping images into existing container (appending to container) + template + void pingImages(Container *sequence_,const std::string &imageSpec_, + ReadOptions &options) + { + options.ping(true); + readImages(sequence_,imageSpec_,options); + } + + template + void pingImages(Container *sequence_,const std::string &imageSpec_) + { + ReadOptions options; + pingImages(sequence_,imageSpec_,options); + } + + template + void pingImages(Container *sequence_,const Blob &blob_,ReadOptions &options) + { + options.ping(true); + readImages(sequence_,blob_,options); + } + + template + void pingImages(Container *sequence_,const Blob &blob_) + { + ReadOptions options; + pingImages(sequence_,blob_,options); + } + + // Adds the names of the profiles of the image to the container. + template + void profileNames(Container *names_,const Image* image_) + { + const char* + name; + + names_->clear(); + + MagickCore::ResetImageProfileIterator(image_->constImage()); + name=MagickCore::GetNextImageProfile(image_->constImage()); + while (name != (const char *) NULL) + { + names_->push_back(std::string(name)); + name=MagickCore::GetNextImageProfile(image_->constImage()); + } + } + + // Quantize colors in images using current quantization settings + // Set measureError_ to true in order to measure quantization error + template + void quantizeImages(InputIterator first_,InputIterator last_, + bool measureError_ = false) + { + if (linkImages(first_,last_) == false) + return; + GetPPException; + MagickCore::QuantizeImages(first_->quantizeInfo(),first_->image(), + exceptionInfo); + unlinkImages(first_,last_); + + MagickCore::Image *image=first_->image(); + while (image != (MagickCore::Image *) NULL) + { + // Calculate quantization error + if (measureError_) + MagickCore::GetImageQuantizeError(image,exceptionInfo); + + // Update DirectClass representation of pixels + MagickCore::SyncImage(image,exceptionInfo); + + image=image->next; + } + unlinkImages(first_,last_); + ThrowPPException(first_->quiet()); + } + + // Read images into existing container (appending to container) + template + void readImages(Container *sequence_,const std::string &imageSpec_, + ReadOptions &options) + { + MagickCore::Image + *images; + + MagickCore::ImageInfo + *imageInfo; + + imageInfo=options.imageInfo(); + imageSpec_.copy(imageInfo->filename,MagickPathExtent-1); + imageInfo->filename[imageSpec_.length()] = 0; + GetPPException; + images=MagickCore::ReadImage(imageInfo,exceptionInfo); + insertImages(sequence_,images); + ThrowPPException(options.quiet()); + } + + template + void readImages(Container *sequence_,const std::string &imageSpec_) + { + ReadOptions options; + readImages(sequence_,imageSpec_,options); + } + + template + void readImages(Container *sequence_,const Blob &blob_,ReadOptions &options) + { + MagickCore::Image + *images; + + GetPPException; + images=MagickCore::BlobToImage(options.imageInfo(),blob_.data(), + blob_.length(),exceptionInfo); + insertImages(sequence_,images); + ThrowPPException(options.quiet()); + } + + template + void readImages(Container *sequence_,const Blob &blob_) + { + ReadOptions options; + readImages(sequence_,blob_,options); + } + + // Returns a separate grayscale image for each channel specified. + template + void separateImages(Container *separatedImages_,Image &image_, + const ChannelType channel_) + { + MagickCore::ChannelType + channel_mask; + + MagickCore::Image + *images; + + GetPPException; + channel_mask=MagickCore::SetImageChannelMask(image_.image(),channel_); + images=SeparateImages(image_.constImage(),exceptionInfo); + MagickCore::SetPixelChannelMask(image_.image(),channel_mask); + + separatedImages_->clear(); + insertImages(separatedImages_,images); + + ThrowPPException(image_.quiet()); + } + + // Smush images from list into single image in either horizontal or + // vertical direction. + template + void smushImages(Image *smushedImage_,InputIterator first_, + InputIterator last_,const ssize_t offset_,bool stack_=false) + { + MagickCore::Image + *newImage; + + if (linkImages(first_,last_) == false) + return; + GetPPException; + newImage=MagickCore::SmushImages(first_->constImage(), + (MagickBooleanType) stack_,offset_,exceptionInfo); + unlinkImages(first_,last_); + smushedImage_->replaceImage(newImage); + ThrowPPException(smushedImage_->quiet()); + } + + // Write Images + template + void writeImages( InputIterator first_, + InputIterator last_, + const std::string &imageSpec_, + bool adjoin_ = true ) { + + if (linkImages(first_,last_) == false) + return; + + first_->adjoin( adjoin_ ); + + GetPPException; + ::ssize_t errorStat = MagickCore::WriteImages( first_->constImageInfo(), + first_->image(), + imageSpec_.c_str(), + exceptionInfo ); + unlinkImages( first_, last_ ); + + if ( errorStat != false ) + { + (void) MagickCore::DestroyExceptionInfo( exceptionInfo ); + return; + } + + ThrowPPException(first_->quiet()); + } + // Write images to BLOB + template + void writeImages( InputIterator first_, + InputIterator last_, + Blob *blob_, + bool adjoin_ = true) { + if (linkImages(first_,last_) == false) + return; + + first_->adjoin( adjoin_ ); + + GetPPException; + size_t length = 2048; // Efficient size for small images + void* data = MagickCore::ImagesToBlob( first_->imageInfo(), + first_->image(), + &length, + exceptionInfo); + blob_->updateNoCopy( data, length, Magick::Blob::MallocAllocator ); + + unlinkImages( first_, last_ ); + + ThrowPPException(first_->quiet()); + } + +} // namespace Magick + +#endif // Magick_STL_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/SecurityPolicy.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/SecurityPolicy.h new file mode 100644 index 0000000000..dcb0fd596e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/SecurityPolicy.h @@ -0,0 +1,52 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright @ 2018 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition of the security policy. +// + +#if !defined(Magick_SecurityPolicy_header) +#define Magick_SecurityPolicy_header + +#include "Magick++/Include.h" +#include + +namespace Magick +{ + class MagickPPExport SecurityPolicy + { + public: + + // The maximum number of significant digits to be printed. + static bool precision(const int precision_); + + // Enables anonymous mapping for pixel cache. + static bool anonymousCacheMemoryMap(); + + // Enables anonymous virtual memory. + static bool anonymousSystemMemoryMap(); + + // The memory request limit in bytes. + static bool maxMemoryRequest(const MagickSizeType limit_); + + // The maximum size of a profile in bytes. + static bool maxProfileSize(const MagickSizeType limit_); + + // The number of passes to use when shredding files. + static bool shred(const int passes_); + + private: + SecurityPolicy(void); + + static bool setValue(const PolicyDomain domain_, const std::string name_, + const std::string value_); + + template + static std::string toString(const T& value); + + }; // class SecurityPolicy + +} // Magick namespace + +#endif // Magick_SecurityPolicy_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Statistic.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Statistic.h new file mode 100644 index 0000000000..845e57325e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/Statistic.h @@ -0,0 +1,308 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// Definition of channel moments. +// + +#if !defined (Magick_ChannelMoments_header) +#define Magick_ChannelMoments_header + +#include "Magick++/Include.h" +#include + +namespace Magick +{ + class Image; + + class MagickPPExport ChannelMoments + { + public: + + // Default constructor + ChannelMoments(void); + + // Copy constructor + ChannelMoments(const ChannelMoments &channelMoments_); + + // Destroy channel moments + ~ChannelMoments(void); + + // X position of centroid + double centroidX(void) const; + + // Y position of centroid + double centroidY(void) const; + + // The channel + PixelChannel channel(void) const; + + // X position of ellipse axis + double ellipseAxisX(void) const; + + // Y position of ellipse axis + double ellipseAxisY(void) const; + + // Ellipse angle + double ellipseAngle(void) const; + + // Ellipse eccentricity + double ellipseEccentricity(void) const; + + // Ellipse intensity + double ellipseIntensity(void) const; + + // Hu invariants (valid range for index is 0-7) + double huInvariants(const size_t index_) const; + + // Does object contain valid channel moments? + bool isValid() const; + + // + // Implementation methods + // + + ChannelMoments(const PixelChannel channel_, + const MagickCore::ChannelMoments *channelMoments_); + + private: + PixelChannel _channel; + std::vector _huInvariants; + double _centroidX; + double _centroidY; + double _ellipseAxisX; + double _ellipseAxisY; + double _ellipseAngle; + double _ellipseEccentricity; + double _ellipseIntensity; + }; + + class MagickPPExport ChannelPerceptualHash + { + public: + + // Default constructor + ChannelPerceptualHash(void); + + // Copy constructor + ChannelPerceptualHash(const ChannelPerceptualHash &channelPerceptualHash_); + + // Constructor using the specified hash string + ChannelPerceptualHash(const PixelChannel channel_, + const std::string &hash_); + + // Destroy channel perceptual hash + ~ChannelPerceptualHash(void); + + // Return hash string + operator std::string() const; + + // The channel + PixelChannel channel(void) const; + + // Does object contain valid channel perceptual hash? + bool isValid() const; + + // Returns the sum squared difference between this hash and the other hash + double sumSquaredDifferences( + const ChannelPerceptualHash &channelPerceptualHash_); + + // SRGB hu preceptual hash (valid range for index is 0-6) + double srgbHuPhash(const size_t index_) const; + + // HCLp hu preceptual hash (valid range for index is 0-6) + double hclpHuPhash(const size_t index_) const; + + // + // Implementation methods + // + + ChannelPerceptualHash(const PixelChannel channel_, + const MagickCore::ChannelPerceptualHash *channelPerceptualHash_); + + private: + PixelChannel _channel; + std::vector _srgbHuPhash; + std::vector _hclpHuPhash; + }; + + // Obtain image statistics. Statistics are normalized to the range + // of 0.0 to 1.0 and are output to the specified ImageStatistics + // structure. + class MagickPPExport ChannelStatistics + { + public: + + // Default constructor + ChannelStatistics(void); + + // Copy constructor + ChannelStatistics(const ChannelStatistics &channelStatistics_); + + // Destroy channel statistics + ~ChannelStatistics(void); + + // Area + double area() const; + + // The channel + PixelChannel channel(void) const; + + // Depth + size_t depth() const; + + // Entropy + double entropy() const; + + // Does object contain valid channel statistics? + bool isValid() const; + + // Kurtosis + double kurtosis() const; + + // Minimum value observed + double maxima() const; + + // Average (mean) value observed + double mean() const; + + // Maximum value observed + double minima() const; + + // Skewness + double skewness() const; + + // Standard deviation, sqrt(variance) + double standardDeviation() const; + + // Sum + double sum() const; + + // Sum cubed + double sumCubed() const; + + // Sum fourth power + double sumFourthPower() const; + + // Sum squared + double sumSquared() const; + + // Variance + double variance() const; + + // + // Implementation methods + // + + ChannelStatistics(const PixelChannel channel_, + const MagickCore::ChannelStatistics *channelStatistics_); + + private: + PixelChannel _channel; + double _area; + size_t _depth; + double _entropy; + double _kurtosis; + double _maxima; + double _mean; + double _minima; + double _skewness; + double _standardDeviation; + double _sum; + double _sumCubed; + double _sumFourthPower; + double _sumSquared; + double _variance; + }; + + class MagickPPExport ImageMoments + { + public: + + // Default constructor + ImageMoments(void); + + // Copy constructor + ImageMoments(const ImageMoments &imageMoments_); + + // Destroy image moments + ~ImageMoments(void); + + // Returns the moments for the specified channel + ChannelMoments channel(const PixelChannel channel_) const; + + // + // Implementation methods + // + ImageMoments(const Image &image_); + + private: + std::vector _channels; + }; + + class MagickPPExport ImagePerceptualHash + { + public: + + // Default constructor + ImagePerceptualHash(void); + + // Copy constructor + ImagePerceptualHash(const ImagePerceptualHash &imagePerceptualHash_); + + // Constructor using the specified hash string + ImagePerceptualHash(const std::string &hash_); + + // Destroy image perceptual hash + ~ImagePerceptualHash(void); + + // Return hash string + operator std::string() const; + + // Returns the perceptual hash for the specified channel + ChannelPerceptualHash channel(const PixelChannel channel_) const; + + // Does object contain valid perceptual hash? + bool isValid() const; + + // Returns the sum squared difference between this hash and the other hash + double sumSquaredDifferences( + const ImagePerceptualHash &channelPerceptualHash_); + + // + // Implementation methods + // + ImagePerceptualHash(const Image &image_); + + private: + std::vector _channels; + }; + + class MagickPPExport ImageStatistics + { + public: + + // Default constructor + ImageStatistics(void); + + // Copy constructor + ImageStatistics(const ImageStatistics &imageStatistics_); + + // Destroy image statistics + ~ImageStatistics(void); + + // Returns the statistics for the specified channel + ChannelStatistics channel(const PixelChannel channel_) const; + + // + // Implementation methods + // + ImageStatistics(const Image &image_); + + private: + std::vector _channels; + }; +} + +#endif // Magick_ChannelMoments_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/TypeMetric.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/TypeMetric.h new file mode 100644 index 0000000000..208045c043 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/Magick++/TypeMetric.h @@ -0,0 +1,70 @@ +// This may look like C code, but it is really -*- C++ -*- +// +// Copyright Bob Friesenhahn, 2001, 2002 +// +// Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization +// dedicated to making software imaging solutions freely available. +// +// TypeMetric Definition +// +// Container for font type metrics +// + +#if !defined (Magick_TypeMetric_header) +#define Magick_TypeMetric_header + +#include "Magick++/Include.h" +#include "Magick++/Drawable.h" + +namespace Magick +{ + class MagickPPExport TypeMetric + { + friend class Image; + + public: + + // Default constructor + TypeMetric(void); + + // Destructor + ~TypeMetric(void); + + // The distance in pixels from the text baseline to the highest/upper + // grid coordinate used to place an outline point. + double ascent(void) const; + + // The bounds of the type metric. + Geometry bounds(void) const; + + // The distance in pixels from the baseline to the lowest grid coordinate + // used to place an outline point. Always a negative value. + double descent(void) const; + + // Maximum horizontal advance in pixels. + double maxHorizontalAdvance(void) const; + + // The origin. + Coordinate origin(void) const; + + // The number of pixels per em. + Coordinate pixelsPerEm(void) const; + + // Text height in pixels. + double textHeight(void) const; + + // Text width in pixels. + double textWidth(void) const; + + // Underline position. + double underlinePosition(void) const; + + // Underline thickness. + double underlineThickness(void) const; + + private: + MagickCore::TypeMetric _typeMetric; + }; +} // namespace Magick + +#endif // Magick_TypeMetric_header diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/MagickCore.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/MagickCore.h new file mode 100644 index 0000000000..bcb612f3e4 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/MagickCore.h @@ -0,0 +1,171 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore Application Programming Interface declarations. +*/ + +#ifndef MAGICKCORE_CORE_H +#define MAGICKCORE_CORE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if !defined(MAGICKCORE_CONFIG_H) +# define MAGICKCORE_CONFIG_H +# if !defined(vms) +# include "MagickCore/magick-config.h" +# else +# include "magick-config.h" +# endif +#if defined(_magickcore_const) && !defined(const) +# define const _magickcore_const +#endif +#if defined(_magickcore_inline) && !defined(inline) +# define inline _magickcore_inline +#endif +#if !defined(magick_restrict) +# if !defined(_magickcore_restrict) +# define magick_restrict restrict +# else +# define magick_restrict _magickcore_restrict +# endif +#endif +# if defined(__cplusplus) || defined(c_plusplus) +# undef inline +# endif +#endif + +#define MAGICKCORE_CHECK_VERSION(major,minor,micro) \ + ((MAGICKCORE_MAJOR_VERSION > (major)) || \ + ((MAGICKCORE_MAJOR_VERSION == (major)) && \ + (MAGICKCORE_MINOR_VERSION > (minor))) || \ + ((MAGICKCORE_MAJOR_VERSION == (major)) && \ + (MAGICKCORE_MINOR_VERSION == (minor)) && \ + (MAGICKCORE_MICRO_VERSION >= (micro)))) + +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(WIN64) +# define MAGICKCORE_WINDOWS_SUPPORT +#else +# define MAGICKCORE_POSIX_SUPPORT +#endif + +#include "MagickCore/method-attribute.h" + +#if defined(MAGICKCORE_NAMESPACE_PREFIX) +# include "MagickCore/methods.h" +#endif +#include "MagickCore/magick-type.h" +#include "MagickCore/animate.h" +#include "MagickCore/annotate.h" +#include "MagickCore/artifact.h" +#include "MagickCore/attribute.h" +#include "MagickCore/blob.h" +#include "MagickCore/cache.h" +#include "MagickCore/cache-view.h" +#include "MagickCore/channel.h" +#include "MagickCore/cipher.h" +#include "MagickCore/client.h" +#include "MagickCore/coder.h" +#include "MagickCore/color.h" +#include "MagickCore/colorspace.h" +#include "MagickCore/colormap.h" +#include "MagickCore/compare.h" +#include "MagickCore/composite.h" +#include "MagickCore/compress.h" +#include "MagickCore/configure.h" +#include "MagickCore/constitute.h" +#include "MagickCore/decorate.h" +#include "MagickCore/delegate.h" +#include "MagickCore/deprecate.h" +#include "MagickCore/display.h" +#include "MagickCore/distort.h" +#include "MagickCore/distribute-cache.h" +#include "MagickCore/draw.h" +#include "MagickCore/effect.h" +#include "MagickCore/enhance.h" +#include "MagickCore/exception.h" +#include "MagickCore/feature.h" +#include "MagickCore/fourier.h" +#include "MagickCore/fx.h" +#include "MagickCore/gem.h" +#include "MagickCore/geometry.h" +#include "MagickCore/histogram.h" +#include "MagickCore/identify.h" +#include "MagickCore/image.h" +#include "MagickCore/image-view.h" +#include "MagickCore/layer.h" +#include "MagickCore/linked-list.h" +#include "MagickCore/list.h" +#include "MagickCore/locale_.h" +#include "MagickCore/log.h" +#include "MagickCore/magic.h" +#include "MagickCore/magick.h" +#include "MagickCore/matrix.h" +#include "MagickCore/memory_.h" +#include "MagickCore/module.h" +#include "MagickCore/mime.h" +#include "MagickCore/monitor.h" +#include "MagickCore/montage.h" +#include "MagickCore/morphology.h" +#include "MagickCore/opencl.h" +#include "MagickCore/option.h" +#include "MagickCore/paint.h" +#include "MagickCore/pixel.h" +#include "MagickCore/pixel-accessor.h" +#include "MagickCore/policy.h" +#include "MagickCore/prepress.h" +#include "MagickCore/profile.h" +#include "MagickCore/property.h" +#include "MagickCore/quantize.h" +#include "MagickCore/quantum.h" +#include "MagickCore/registry.h" +#include "MagickCore/random_.h" +#include "MagickCore/resample.h" +#include "MagickCore/resize.h" +#include "MagickCore/resource_.h" +#include "MagickCore/segment.h" +#include "MagickCore/shear.h" +#include "MagickCore/signature.h" +#include "MagickCore/splay-tree.h" +#include "MagickCore/static.h" +#include "MagickCore/statistic.h" +#include "MagickCore/stream.h" +#include "MagickCore/string_.h" +#include "MagickCore/timer.h" +#include "MagickCore/token.h" +#include "MagickCore/transform.h" +#include "MagickCore/threshold.h" +#include "MagickCore/type.h" +#include "MagickCore/utility.h" +#include "MagickCore/version.h" +#include "MagickCore/vision.h" +#include "MagickCore/visual-effects.h" +#include "MagickCore/xml-tree.h" +#include "MagickCore/xwindow.h" + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/animate.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/animate.h new file mode 100644 index 0000000000..f4abf9c6c1 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/animate.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore methods to interactively animate an image sequence. +*/ +#ifndef MAGICKCORE_ANIMATE_H +#define MAGICKCORE_ANIMATE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + AnimateImages(const ImageInfo *,Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/annotate.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/annotate.h new file mode 100644 index 0000000000..d79904c8a3 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/annotate.h @@ -0,0 +1,41 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image annotation methods. +*/ +#ifndef MAGICKCORE_ANNOTATE_H +#define MAGICKCORE_ANNOTATE_H + +#include "MagickCore/draw.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + AnnotateImage(Image *,const DrawInfo *,ExceptionInfo *), + GetMultilineTypeMetrics(Image *,const DrawInfo *,TypeMetric *, + ExceptionInfo *), + GetTypeMetrics(Image *,const DrawInfo *,TypeMetric *,ExceptionInfo *); + +extern MagickExport ssize_t + FormatMagickCaption(Image *,DrawInfo *,const MagickBooleanType,TypeMetric *, + char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/artifact.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/artifact.h new file mode 100644 index 0000000000..9eda249d82 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/artifact.h @@ -0,0 +1,46 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore artifact methods. +*/ +#ifndef MAGICKCORE_ARTIFACT_H +#define MAGICKCORE_ARTIFACT_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport char + *RemoveImageArtifact(Image *,const char *); + +extern MagickExport const char + *GetNextImageArtifact(const Image *), + *GetImageArtifact(const Image *,const char *); + +extern MagickExport MagickBooleanType + CloneImageArtifacts(Image *,const Image *), + DefineImageArtifact(Image *,const char *), + DeleteImageArtifact(Image *,const char *), + SetImageArtifact(Image *,const char *,const char *); + +extern MagickExport void + DestroyImageArtifacts(Image *), + ResetImageArtifactIterator(const Image *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/attribute.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/attribute.h new file mode 100644 index 0000000000..5c3193cd81 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/attribute.h @@ -0,0 +1,56 @@ +/* + Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore methods to set or get image attributes. +*/ +#ifndef MAGICKCORE_ATTRIBUTE_H +#define MAGICKCORE_ATTRIBUTE_H + +#include "MagickCore/image.h" +#include "MagickCore/exception.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport ImageType + GetImageType(const Image *), + IdentifyImageGray(const Image *,ExceptionInfo *), + IdentifyImageType(const Image *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + IdentifyImageMonochrome(const Image *,ExceptionInfo *), + IsImageGray(const Image *), + IsImageMonochrome(const Image *), + IsImageOpaque(const Image *,ExceptionInfo *), + SetImageDepth(Image *,const size_t,ExceptionInfo *), + SetImageType(Image *,const ImageType,ExceptionInfo *); + +extern MagickExport PointInfo + *GetImageConvexHull(const Image *,size_t *,ExceptionInfo *), + *GetImageMinimumBoundingBox(Image *,size_t *,ExceptionInfo *); + +extern MagickExport RectangleInfo + GetImageBoundingBox(const Image *,ExceptionInfo *); + +extern MagickExport size_t + GetImageDepth(const Image *,ExceptionInfo *), + GetImageQuantumDepth(const Image *,const MagickBooleanType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/blob.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/blob.h new file mode 100644 index 0000000000..d76e7c7e88 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/blob.h @@ -0,0 +1,100 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore Binary Large OBjects methods. +*/ +#ifndef MAGICKCORE_BLOB_H +#define MAGICKCORE_BLOB_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#define MagickMaxBufferExtent 81920 +#define MagickMinBufferExtent 16384 + +typedef enum +{ + ReadMode, + WriteMode, + IOMode, + PersistMode +} MapMode; + +typedef ssize_t + (*CustomStreamHandler)(unsigned char *,const size_t,void *); + +typedef MagickOffsetType + (*CustomStreamSeeker)(const MagickOffsetType,const int,void *); + +typedef MagickOffsetType + (*CustomStreamTeller)(void *); + +typedef struct _CustomStreamInfo + CustomStreamInfo; + +#include "MagickCore/image.h" +#include "MagickCore/stream.h" + +extern MagickExport CustomStreamInfo + *AcquireCustomStreamInfo(ExceptionInfo *), + *DestroyCustomStreamInfo(CustomStreamInfo *); + +extern MagickExport FILE + *GetBlobFileHandle(const Image *) magick_attribute((__pure__)); + +extern MagickExport Image + *BlobToImage(const ImageInfo *,const void *,const size_t,ExceptionInfo *), + *PingBlob(const ImageInfo *,const void *,const size_t,ExceptionInfo *), + *CustomStreamToImage(const ImageInfo *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + BlobToFile(char *,const void *,const size_t,ExceptionInfo *), + FileToImage(Image *,const char *,ExceptionInfo *), + GetBlobError(const Image *) magick_attribute((__pure__)), + ImageToFile(Image *,char *,ExceptionInfo *), + InjectImageBlob(const ImageInfo *,Image *,Image *,const char *, + ExceptionInfo *), + IsBlobExempt(const Image *) magick_attribute((__pure__)), + IsBlobSeekable(const Image *) magick_attribute((__pure__)), + IsBlobTemporary(const Image *) magick_attribute((__pure__)); + +extern MagickExport MagickSizeType + GetBlobSize(const Image *); + +extern MagickExport StreamHandler + GetBlobStreamHandler(const Image *) magick_attribute((__pure__)); + +extern MagickExport void + *GetBlobStreamData(const Image *) magick_attribute((__pure__)), + DestroyBlob(Image *), + DuplicateBlob(Image *,const Image *), + *FileToBlob(const char *,const size_t,size_t *,ExceptionInfo *), + *ImageToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *), + ImageToCustomStream(const ImageInfo *,Image *,ExceptionInfo *), + *ImagesToBlob(const ImageInfo *,Image *,size_t *,ExceptionInfo *), + ImagesToCustomStream(const ImageInfo *,Image *,ExceptionInfo *), + SetBlobExempt(Image *,const MagickBooleanType), + SetCustomStreamData(CustomStreamInfo *,void *), + SetCustomStreamReader(CustomStreamInfo *,CustomStreamHandler), + SetCustomStreamSeeker(CustomStreamInfo *,CustomStreamSeeker), + SetCustomStreamTeller(CustomStreamInfo *,CustomStreamTeller), + SetCustomStreamWriter(CustomStreamInfo *,CustomStreamHandler); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cache-view.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cache-view.h new file mode 100644 index 0000000000..7a820d5f22 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cache-view.h @@ -0,0 +1,107 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore cache view methods. +*/ +#ifndef MAGICKCORE_CACHE_VIEW_H +#define MAGICKCORE_CACHE_VIEW_H + +#include "MagickCore/pixel.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedVirtualPixelMethod, + BackgroundVirtualPixelMethod, + DitherVirtualPixelMethod, + EdgeVirtualPixelMethod, + MirrorVirtualPixelMethod, + RandomVirtualPixelMethod, + TileVirtualPixelMethod, + TransparentVirtualPixelMethod, + MaskVirtualPixelMethod, + BlackVirtualPixelMethod, + GrayVirtualPixelMethod, + WhiteVirtualPixelMethod, + HorizontalTileVirtualPixelMethod, + VerticalTileVirtualPixelMethod, + HorizontalTileEdgeVirtualPixelMethod, + VerticalTileEdgeVirtualPixelMethod, + CheckerTileVirtualPixelMethod +} VirtualPixelMethod; + +typedef struct _CacheView + CacheView; + +extern MagickExport CacheView + *AcquireAuthenticCacheView(const Image *,ExceptionInfo *), + *AcquireVirtualCacheView(const Image *,ExceptionInfo *), + *CloneCacheView(const CacheView *), + *DestroyCacheView(CacheView *); + +extern MagickExport ClassType + GetCacheViewStorageClass(const CacheView *) magick_attribute((__pure__)); + +extern MagickExport ColorspaceType + GetCacheViewColorspace(const CacheView *) magick_attribute((__pure__)); + +extern MagickExport const Image + *GetCacheViewImage(const CacheView *) magick_attribute((__pure__)); + +extern MagickExport const Quantum + *GetCacheViewVirtualPixels(const CacheView *,const ssize_t,const ssize_t, + const size_t,const size_t,ExceptionInfo *) magick_hot_spot, + *GetCacheViewVirtualPixelQueue(const CacheView *) magick_hot_spot; + +extern MagickExport const void + *GetCacheViewVirtualMetacontent(const CacheView *) + magick_attribute((__pure__)); + +extern MagickExport MagickBooleanType + GetOneCacheViewAuthenticPixel(const CacheView *,const ssize_t,const ssize_t, + Quantum *,ExceptionInfo *), + GetOneCacheViewVirtualMethodPixel(const CacheView *,const VirtualPixelMethod, + const ssize_t,const ssize_t,Quantum *,ExceptionInfo *), + GetOneCacheViewVirtualPixel(const CacheView *,const ssize_t,const ssize_t, + Quantum *,ExceptionInfo *), + GetOneCacheViewVirtualPixelInfo(const CacheView *,const ssize_t,const ssize_t, + PixelInfo *,ExceptionInfo *), + SetCacheViewStorageClass(CacheView *,const ClassType,ExceptionInfo *), + SetCacheViewVirtualPixelMethod(CacheView *magick_restrict, + const VirtualPixelMethod), + SyncCacheViewAuthenticPixels(CacheView *magick_restrict,ExceptionInfo *) + magick_hot_spot; + +extern MagickExport MagickSizeType + GetCacheViewExtent(const CacheView *) magick_attribute((__pure__)); + +extern MagickExport Quantum + *GetCacheViewAuthenticPixelQueue(CacheView *) magick_hot_spot, + *GetCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t, + const size_t,const size_t,ExceptionInfo *) magick_hot_spot, + *QueueCacheViewAuthenticPixels(CacheView *,const ssize_t,const ssize_t, + const size_t,const size_t,ExceptionInfo *) magick_hot_spot; + +extern MagickExport void + *GetCacheViewAuthenticMetacontent(CacheView *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cache.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cache.h new file mode 100644 index 0000000000..748383f4d5 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cache.h @@ -0,0 +1,82 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore cache methods. +*/ +#ifndef MAGICKCORE_CACHE_H +#define MAGICKCORE_CACHE_H + +#include "MagickCore/blob.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedCache, + DiskCache, + DistributedCache, + MapCache, + MemoryCache, + PingCache +} CacheType; + +extern MagickExport CacheType + GetImagePixelCacheType(const Image *); + +extern MagickExport const char + *GetPixelCacheFilename(const Image *); + +extern MagickExport const Quantum + *GetVirtualPixels(const Image *,const ssize_t,const ssize_t,const size_t, + const size_t,ExceptionInfo *) magick_hot_spot, + *GetVirtualPixelQueue(const Image *) magick_hot_spot; + +extern MagickExport const void + *GetVirtualMetacontent(const Image *); + +extern MagickExport MagickBooleanType + GetOneAuthenticPixel(Image *,const ssize_t,const ssize_t,Quantum *, + ExceptionInfo *), + GetOneVirtualPixel(const Image *,const ssize_t,const ssize_t,Quantum *, + ExceptionInfo *), + GetOneVirtualPixelInfo(const Image *,const VirtualPixelMethod, + const ssize_t,const ssize_t,PixelInfo *,ExceptionInfo *), + PersistPixelCache(Image *,const char *,const MagickBooleanType, + MagickOffsetType *,ExceptionInfo *), + ReshapePixelCache(Image *,const size_t,const size_t,ExceptionInfo *), + SyncAuthenticPixels(Image *,ExceptionInfo *) magick_hot_spot; + +extern MagickExport MagickSizeType + GetImageExtent(const Image *); + +extern MagickExport Quantum + *GetAuthenticPixels(Image *,const ssize_t,const ssize_t,const size_t, + const size_t,ExceptionInfo *) magick_hot_spot, + *GetAuthenticPixelQueue(const Image *) magick_hot_spot, + *QueueAuthenticPixels(Image *,const ssize_t,const ssize_t,const size_t, + const size_t,ExceptionInfo *) magick_hot_spot; + +extern MagickExport void + *AcquirePixelCachePixels(const Image *,size_t *,ExceptionInfo *), + *GetAuthenticMetacontent(const Image *), + *GetPixelCachePixels(Image *,MagickSizeType *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/channel.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/channel.h new file mode 100644 index 0000000000..641ba79acb --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/channel.h @@ -0,0 +1,62 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image channel methods. +*/ +#ifndef MAGICKCORE_CHANNEL_H +#define MAGICKCORE_CHANNEL_H + +#include + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedAlphaChannel, + ActivateAlphaChannel, + AssociateAlphaChannel, + BackgroundAlphaChannel, + CopyAlphaChannel, + DeactivateAlphaChannel, + DiscreteAlphaChannel, + DisassociateAlphaChannel, + ExtractAlphaChannel, + OffAlphaChannel, + OnAlphaChannel, + OpaqueAlphaChannel, + RemoveAlphaChannel, + SetAlphaChannel, + ShapeAlphaChannel, + TransparentAlphaChannel, + OffIfOpaqueAlphaChannel +} AlphaChannelOption; + +extern MagickExport Image + *ChannelFxImage(const Image *,const char *,ExceptionInfo *), + *CombineImages(const Image *,const ColorspaceType,ExceptionInfo *), + *SeparateImage(const Image *,const ChannelType,ExceptionInfo *), + *SeparateImages(const Image *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + GetImageAlphaChannel(const Image *), + SetImageAlphaChannel(Image *,const AlphaChannelOption,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cipher.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cipher.h new file mode 100644 index 0000000000..8518467513 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/cipher.h @@ -0,0 +1,35 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore cipher methods. +*/ +#ifndef MAGICKCORE_CIPHER_H +#define MAGICKCORE_CIPHER_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + DecipherImage(Image *,const char *,ExceptionInfo *), + EncipherImage(Image *,const char *,ExceptionInfo *), + PasskeyDecipherImage(Image *,const StringInfo *,ExceptionInfo *), + PasskeyEncipherImage(Image *,const StringInfo *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/client.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/client.h new file mode 100644 index 0000000000..5d3147f317 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/client.h @@ -0,0 +1,35 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore client methods. +*/ +#ifndef MAGICKCORE_CLIENT_H +#define MAGICKCORE_CLIENT_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport const char + *GetClientPath(void) magick_attribute((__const__)), + *GetClientName(void) magick_attribute((__const__)), + *SetClientName(const char *), + *SetClientPath(const char *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/coder.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/coder.h new file mode 100644 index 0000000000..9dbde42f64 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/coder.h @@ -0,0 +1,54 @@ +/* + Copyright @ 2001 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image coder methods. +*/ +#ifndef MAGICKCORE_CODER_H +#define MAGICKCORE_CODER_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _CoderInfo +{ + char + *path, + *magick, + *name; + + MagickBooleanType + exempt, + stealth; + + size_t + signature; +} CoderInfo; + +extern MagickExport char + **GetCoderList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const CoderInfo + *GetCoderInfo(const char *,ExceptionInfo *), + **GetCoderInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + ListCoderInfo(FILE *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/color.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/color.h new file mode 100644 index 0000000000..0f043e9034 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/color.h @@ -0,0 +1,109 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image color methods. +*/ +#ifndef MAGICKCORE_COLOR_H +#define MAGICKCORE_COLOR_H + +#include "MagickCore/pixel.h" +#include "MagickCore/exception.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedCompliance, + NoCompliance = 0x0000, + CSSCompliance = 0x0001, + SVGCompliance = 0x0001, + X11Compliance = 0x0002, + XPMCompliance = 0x0004, + MVGCompliance = 0x0008, + AllCompliance = 0x7fffffff +} ComplianceType; + +typedef enum +{ + UndefinedIlluminant = 5, + AIlluminant = 0, + BIlluminant = 1, + CIlluminant = 2, + D50Illuminant = 3, + D55Illuminant = 4, + D65Illuminant = 5, + D75Illuminant = 6, + EIlluminant = 7, + F2Illuminant = 8, + F7Illuminant = 9, + F11Illuminant = 10 +} IlluminantType; + +typedef struct _ColorInfo +{ + char + *path, + *name; + + ComplianceType + compliance; + + PixelInfo + color; + + MagickBooleanType + exempt, + stealth; + + size_t + signature; +} ColorInfo; + +typedef struct _ErrorInfo +{ + double + mean_error_per_pixel, + normalized_mean_error, + normalized_maximum_error; +} ErrorInfo; + +extern MagickExport char + **GetColorList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const ColorInfo + *GetColorInfo(const char *,ExceptionInfo *), + **GetColorInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + IsEquivalentImage(const Image *,const Image *,ssize_t *x,ssize_t *y, + ExceptionInfo *), + ListColorInfo(FILE *,ExceptionInfo *), + QueryColorCompliance(const char *,const ComplianceType,PixelInfo *, + ExceptionInfo *), + QueryColorname(const Image *,const PixelInfo *,const ComplianceType, + char *,ExceptionInfo *); + +extern MagickExport void + ConcatenateColorComponent(const PixelInfo *,const PixelChannel, + const ComplianceType,char *), + GetColorTuple(const PixelInfo *,const MagickBooleanType,char *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/colormap.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/colormap.h new file mode 100644 index 0000000000..72ca5bce33 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/colormap.h @@ -0,0 +1,34 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image colormap methods. +*/ +#ifndef MAGICKCORE_COLORMAP_H +#define MAGICKCORE_COLORMAP_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + AcquireImageColormap(Image *,const size_t,ExceptionInfo *), + CycleColormapImage(Image *,const ssize_t,ExceptionInfo *), + SortColormapByIntensity(Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/colorspace.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/colorspace.h new file mode 100644 index 0000000000..538b37ebf4 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/colorspace.h @@ -0,0 +1,82 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image colorspace methods. +*/ +#ifndef MAGICKCORE_COLORSPACE_H +#define MAGICKCORE_COLORSPACE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedColorspace, + CMYColorspace, /* negated linear RGB colorspace */ + CMYKColorspace, /* CMY with Black separation */ + GRAYColorspace, /* Single Channel greyscale (non-linear) image */ + HCLColorspace, + HCLpColorspace, + HSBColorspace, + HSIColorspace, + HSLColorspace, + HSVColorspace, /* alias for HSB */ + HWBColorspace, + LabColorspace, + LCHColorspace, /* alias for LCHuv */ + LCHabColorspace, /* Cylindrical (Polar) Lab */ + LCHuvColorspace, /* Cylindrical (Polar) Luv */ + LogColorspace, + LMSColorspace, + LuvColorspace, + OHTAColorspace, + Rec601YCbCrColorspace, + Rec709YCbCrColorspace, + RGBColorspace, /* Linear RGB colorspace */ + scRGBColorspace, /* ??? */ + sRGBColorspace, /* Default: non-linear sRGB colorspace */ + TransparentColorspace, + xyYColorspace, + XYZColorspace, /* IEEE Color Reference colorspace */ + YCbCrColorspace, + YCCColorspace, + YDbDrColorspace, + YIQColorspace, + YPbPrColorspace, + YUVColorspace, + LinearGRAYColorspace, /* Single Channel greyscale (linear) image */ + JzazbzColorspace, + DisplayP3Colorspace, + Adobe98Colorspace, + ProPhotoColorspace, + OklabColorspace, + OklchColorspace +} ColorspaceType; + +extern MagickExport ColorspaceType + GetImageColorspaceType(const Image *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + SetImageColorspace(Image *,const ColorspaceType,ExceptionInfo *), + SetImageGray(Image *,ExceptionInfo *), + SetImageMonochrome(Image *,ExceptionInfo *), + TransformImageColorspace(Image *,const ColorspaceType,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/compare.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/compare.h new file mode 100644 index 0000000000..39e4aceee9 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/compare.h @@ -0,0 +1,63 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image compare methods. +*/ +#ifndef MAGICKCORE_COMPARE_H +#define MAGICKCORE_COMPARE_H + +#include "MagickCore/image.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedErrorMetric, + AbsoluteErrorMetric, + FuzzErrorMetric, + MeanAbsoluteErrorMetric, + MeanErrorPerPixelErrorMetric, + MeanSquaredErrorMetric, + NormalizedCrossCorrelationErrorMetric, + PeakAbsoluteErrorMetric, + PeakSignalToNoiseRatioErrorMetric, + PerceptualHashErrorMetric, + RootMeanSquaredErrorMetric, + StructuralSimilarityErrorMetric, + StructuralDissimilarityErrorMetric +} MetricType; + +extern MagickExport double + *GetImageDistortions(Image *,const Image *,const MetricType,ExceptionInfo *); + +extern MagickExport Image + *CompareImages(Image *,const Image *,const MetricType,double *, + ExceptionInfo *), + *SimilarityImage(const Image *,const Image *,const MetricType,const double, + RectangleInfo *,double *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + GetImageDistortion(Image *,const Image *,const MetricType,double *, + ExceptionInfo *), + IsImagesEqual(const Image *,const Image *,ExceptionInfo *), + SetImageColorMetric(Image *,const Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/composite.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/composite.h new file mode 100644 index 0000000000..558fd88a07 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/composite.h @@ -0,0 +1,120 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image composite methods. +*/ +#ifndef MAGICKCORE_COMPOSITE_H +#define MAGICKCORE_COMPOSITE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedCompositeOp, + AlphaCompositeOp, + AtopCompositeOp, + BlendCompositeOp, + BlurCompositeOp, + BumpmapCompositeOp, + ChangeMaskCompositeOp, + ClearCompositeOp, + ColorBurnCompositeOp, + ColorDodgeCompositeOp, + ColorizeCompositeOp, + CopyBlackCompositeOp, + CopyBlueCompositeOp, + CopyCompositeOp, + CopyCyanCompositeOp, + CopyGreenCompositeOp, + CopyMagentaCompositeOp, + CopyAlphaCompositeOp, + CopyRedCompositeOp, + CopyYellowCompositeOp, + DarkenCompositeOp, + DarkenIntensityCompositeOp, + DifferenceCompositeOp, + DisplaceCompositeOp, + DissolveCompositeOp, + DistortCompositeOp, + DivideDstCompositeOp, + DivideSrcCompositeOp, + DstAtopCompositeOp, + DstCompositeOp, + DstInCompositeOp, + DstOutCompositeOp, + DstOverCompositeOp, + ExclusionCompositeOp, + HardLightCompositeOp, + HardMixCompositeOp, + HueCompositeOp, + InCompositeOp, + IntensityCompositeOp, + LightenCompositeOp, + LightenIntensityCompositeOp, + LinearBurnCompositeOp, + LinearDodgeCompositeOp, + LinearLightCompositeOp, + LuminizeCompositeOp, + MathematicsCompositeOp, + MinusDstCompositeOp, + MinusSrcCompositeOp, + ModulateCompositeOp, + ModulusAddCompositeOp, + ModulusSubtractCompositeOp, + MultiplyCompositeOp, + NoCompositeOp, + OutCompositeOp, + OverCompositeOp, + OverlayCompositeOp, + PegtopLightCompositeOp, + PinLightCompositeOp, + PlusCompositeOp, + ReplaceCompositeOp, + SaturateCompositeOp, + ScreenCompositeOp, + SoftLightCompositeOp, + SrcAtopCompositeOp, + SrcCompositeOp, + SrcInCompositeOp, + SrcOutCompositeOp, + SrcOverCompositeOp, + ThresholdCompositeOp, + VividLightCompositeOp, + XorCompositeOp, + StereoCompositeOp, + FreezeCompositeOp, + InterpolateCompositeOp, + NegateCompositeOp, + ReflectCompositeOp, + SoftBurnCompositeOp, + SoftDodgeCompositeOp, + StampCompositeOp, + RMSECompositeOp, + SaliencyBlendCompositeOp, + SeamlessBlendCompositeOp +} CompositeOperator; + +extern MagickExport MagickBooleanType + CompositeImage(Image *,const Image *,const CompositeOperator, + const MagickBooleanType,const ssize_t,const ssize_t,ExceptionInfo *), + TextureImage(Image *,const Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/compress.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/compress.h new file mode 100644 index 0000000000..0b9b954a2e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/compress.h @@ -0,0 +1,80 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image compression/decompression methods. +*/ +#ifndef MAGICKCORE_COMPRESS_H +#define MAGICKCORE_COMPRESS_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedCompression, + B44ACompression, + B44Compression, + BZipCompression, + DXT1Compression, + DXT3Compression, + DXT5Compression, + FaxCompression, + Group4Compression, + JBIG1Compression, /* ISO/IEC std 11544 / ITU-T rec T.82 */ + JBIG2Compression, /* ISO/IEC std 14492 / ITU-T rec T.88 */ + JPEG2000Compression, /* ISO/IEC std 15444-1 */ + JPEGCompression, + LosslessJPEGCompression, + LZMACompression, /* Lempel-Ziv-Markov chain algorithm */ + LZWCompression, + NoCompression, + PizCompression, + Pxr24Compression, + RLECompression, + ZipCompression, + ZipSCompression, + ZstdCompression, + WebPCompression, + DWAACompression, + DWABCompression, + BC7Compression, + BC5Compression, + LERCCompression /* https://github.com/Esri/lerc */ +} CompressionType; + +typedef struct _Ascii85Info + Ascii85Info; + +extern MagickExport MagickBooleanType + HuffmanDecodeImage(Image *,ExceptionInfo *), + HuffmanEncodeImage(const ImageInfo *,Image *,Image *,ExceptionInfo *), + LZWEncodeImage(Image *,const size_t,unsigned char *magick_restrict, + ExceptionInfo *), + PackbitsEncodeImage(Image *,const size_t,unsigned char *magick_restrict, + ExceptionInfo *), + ZLIBEncodeImage(Image *,const size_t,unsigned char *magick_restrict, + ExceptionInfo *); + +extern MagickExport void + Ascii85Encode(Image *,const unsigned char), + Ascii85Flush(Image *), + Ascii85Initialize(Image *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/configure.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/configure.h new file mode 100644 index 0000000000..0cd25b8d28 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/configure.h @@ -0,0 +1,66 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore configure methods. +*/ +#ifndef MAGICKCORE_CONFIGURE_H +#define MAGICKCORE_CONFIGURE_H + +#include "MagickCore/linked-list.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _ConfigureInfo +{ + char + *path, + *name, + *value; + + MagickBooleanType + exempt, + stealth; + + size_t + signature; +} ConfigureInfo; + +extern MagickExport char + **GetConfigureList(const char *,size_t *,ExceptionInfo *), + *GetConfigureOption(const char *); + +extern MagickExport const char + *GetConfigureValue(const ConfigureInfo *); + +extern MagickExport const ConfigureInfo + *GetConfigureInfo(const char *,ExceptionInfo *), + **GetConfigureInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport LinkedListInfo + *DestroyConfigureOptions(LinkedListInfo *), + *GetConfigurePaths(const char *,ExceptionInfo *), + *GetConfigureOptions(const char *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + ListConfigureInfo(FILE *,ExceptionInfo *); + + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/constitute.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/constitute.h new file mode 100644 index 0000000000..55c2596797 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/constitute.h @@ -0,0 +1,44 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image constitute methods. +*/ +#ifndef MAGICKCORE_CONSTITUTE_H +#define MAGICKCORE_CONSTITUTE_H + +#include "MagickCore/pixel.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport Image + *ConstituteImage(const size_t,const size_t,const char *,const StorageType, + const void *,ExceptionInfo *), + *PingImage(const ImageInfo *,ExceptionInfo *), + *PingImages(ImageInfo *,const char *,ExceptionInfo *), + *ReadImage(const ImageInfo *,ExceptionInfo *), + *ReadImages(ImageInfo *,const char *,ExceptionInfo *), + *ReadInlineImage(const ImageInfo *,const char *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + WriteImage(const ImageInfo *,Image *,ExceptionInfo *), + WriteImages(const ImageInfo *,Image *,const char *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/decorate.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/decorate.h new file mode 100644 index 0000000000..0fb0de920e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/decorate.h @@ -0,0 +1,54 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image decorate methods. +*/ +#ifndef MAGICKCORE_DECORATE_H +#define MAGICKCORE_DECORATE_H + +#include "MagickCore/image.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _FrameInfo +{ + size_t + width, + height; + + ssize_t + x, + y, + inner_bevel, + outer_bevel; +} FrameInfo; + +extern MagickExport Image + *BorderImage(const Image *,const RectangleInfo *,const CompositeOperator, + ExceptionInfo *), + *FrameImage(const Image *,const FrameInfo *,const CompositeOperator, + ExceptionInfo *); + +extern MagickExport MagickBooleanType + RaiseImage(Image *,const RectangleInfo *,const MagickBooleanType, + ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/delegate.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/delegate.h new file mode 100644 index 0000000000..aa7121cf3e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/delegate.h @@ -0,0 +1,79 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore delegates methods. +*/ +#ifndef MAGICKCORE_DELEGATE_H +#define MAGICKCORE_DELEGATE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#include +#include "MagickCore/semaphore.h" + +typedef struct _DelegateInfo +{ + char + *path, + *decode, + *encode, + *commands; + + ssize_t + mode; + + MagickBooleanType + thread_support, + spawn, + stealth; + + SemaphoreInfo + *semaphore; + + size_t + signature; +} DelegateInfo; + +extern MagickExport char + *GetDelegateCommand(const ImageInfo *,Image *,const char *,const char *, + ExceptionInfo *), + **GetDelegateList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const char + *GetDelegateCommands(const DelegateInfo *); + +extern MagickExport const DelegateInfo + *GetDelegateInfo(const char *,const char *,ExceptionInfo *exception), + **GetDelegateInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport int + ExternalDelegateCommand(const MagickBooleanType,const MagickBooleanType, + const char *,char *,ExceptionInfo *); + +extern MagickExport ssize_t + GetDelegateMode(const DelegateInfo *); + +extern MagickExport MagickBooleanType + GetDelegateThreadSupport(const DelegateInfo *), + InvokeDelegate(ImageInfo *,Image *,const char *,const char *,ExceptionInfo *), + ListDelegateInfo(FILE *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/deprecate.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/deprecate.h new file mode 100644 index 0000000000..395c4c70cd --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/deprecate.h @@ -0,0 +1,50 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore deprecated methods. +*/ +#ifndef MAGICKCORE_DEPRECATE_H +#define MAGICKCORE_DEPRECATE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + +#include "MagickCore/magick.h" + +typedef int + *(*BlobFifo)(const Image *,const void *,const size_t); + +extern MagickExport MagickBooleanType + GetMagickSeekableStream(const MagickInfo *); + +#if defined(MAGICKCORE_WINGDI32_DELEGATE) +extern MagickExport void + *CropImageToHBITMAP(Image *,const RectangleInfo *,ExceptionInfo *), + *ImageToHBITMAP(Image *,ExceptionInfo *); +#endif + +extern MagickExport void + InitializePixelChannelMap(Image *) magick_attribute((deprecated)); + +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/display.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/display.h new file mode 100644 index 0000000000..74d8ee7b3e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/display.h @@ -0,0 +1,34 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore methods to interactively display and edit an image. +*/ +#ifndef MAGICKCORE_DISPLAY_H +#define MAGICKCORE_DISPLAY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + DisplayImages(const ImageInfo *,Image *,ExceptionInfo *), + RemoteDisplayCommand(const ImageInfo *,const char *,const char *, + ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/distort.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/distort.h new file mode 100644 index 0000000000..be78f79782 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/distort.h @@ -0,0 +1,87 @@ +/* + Copyright @ 2007 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image distortion methods. +*/ +#ifndef MAGICKCORE_DISTORT_H +#define MAGICKCORE_DISTORT_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + These two enum are linked, with common enumerated values. Both + DistortImages() and SparseColor() often share code to determine functional + coefficients for common methods. + + Caution should be taken to ensure that only the common methods contain the + same enumerated value, while all others remain unique across both + enumerations. +*/ +typedef enum +{ + UndefinedDistortion, + AffineDistortion, + AffineProjectionDistortion, + ScaleRotateTranslateDistortion, + PerspectiveDistortion, + PerspectiveProjectionDistortion, + BilinearForwardDistortion, + BilinearDistortion = BilinearForwardDistortion, + BilinearReverseDistortion, + PolynomialDistortion, + ArcDistortion, + PolarDistortion, + DePolarDistortion, + Cylinder2PlaneDistortion, + Plane2CylinderDistortion, + BarrelDistortion, + BarrelInverseDistortion, + ShepardsDistortion, + ResizeDistortion, + SentinelDistortion, + RigidAffineDistortion +} DistortMethod; + +typedef enum +{ + UndefinedColorInterpolate = UndefinedDistortion, + BarycentricColorInterpolate = AffineDistortion, + BilinearColorInterpolate = BilinearReverseDistortion, + PolynomialColorInterpolate = PolynomialDistortion, + ShepardsColorInterpolate = ShepardsDistortion, + /* + Methods unique to SparseColor(). + */ + VoronoiColorInterpolate = SentinelDistortion, + InverseColorInterpolate, + ManhattanColorInterpolate +} SparseColorMethod; + +extern MagickExport Image + *AffineTransformImage(const Image *,const AffineMatrix *,ExceptionInfo *), + *DistortImage(const Image *,const DistortMethod,const size_t, + const double *,MagickBooleanType,ExceptionInfo *exception), + *DistortResizeImage(const Image *,const size_t,const size_t,ExceptionInfo *), + *RotateImage(const Image *,const double,ExceptionInfo *), + *SparseColorImage(const Image *,const SparseColorMethod,const size_t, + const double *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/distribute-cache.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/distribute-cache.h new file mode 100644 index 0000000000..c6ffb1f959 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/distribute-cache.h @@ -0,0 +1,34 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore distributed cache methods. +*/ +#ifndef MAGICKCORE_DISTRIBUTE_CACHE_H +#define MAGICKCORE_DISTRIBUTE_CACHE_H + +#include "MagickCore/exception.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport void + DistributePixelCacheServer(const int,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/draw.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/draw.h new file mode 100644 index 0000000000..f8a1319877 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/draw.h @@ -0,0 +1,423 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore drawing methods. +*/ +#ifndef MAGICKCORE_DRAW_H +#define MAGICKCORE_DRAW_H + +#include "MagickCore/geometry.h" +#include "MagickCore/image.h" +#include "MagickCore/pixel.h" +#include "MagickCore/type.h" +#include "MagickCore/color.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedAlign, + LeftAlign, + CenterAlign, + RightAlign +} AlignType; + +typedef enum +{ + UndefinedPathUnits, + UserSpace, + UserSpaceOnUse, + ObjectBoundingBox +} ClipPathUnits; + +typedef enum +{ + UndefinedDecoration, + NoDecoration, + UnderlineDecoration, + OverlineDecoration, + LineThroughDecoration +} DecorationType; + +typedef enum +{ + UndefinedDirection, + RightToLeftDirection, + LeftToRightDirection, + TopToBottomDirection +} DirectionType; + +typedef enum +{ + UndefinedRule, +#undef EvenOddRule + EvenOddRule, + NonZeroRule +} FillRule; + +typedef enum +{ + UndefinedGradient, + LinearGradient, + RadialGradient +} GradientType; + +typedef enum +{ + UndefinedCap, + ButtCap, + RoundCap, + SquareCap +} LineCap; + +typedef enum +{ + UndefinedJoin, + MiterJoin, + RoundJoin, + BevelJoin +} LineJoin; + +typedef enum +{ + UndefinedMethod, + PointMethod, + ReplaceMethod, + FloodfillMethod, + FillToBorderMethod, + ResetMethod +} PaintMethod; + +typedef enum +{ + UndefinedPrimitive, + AlphaPrimitive, + ArcPrimitive, + BezierPrimitive, + CirclePrimitive, + ColorPrimitive, + EllipsePrimitive, + ImagePrimitive, + LinePrimitive, + PathPrimitive, + PointPrimitive, + PolygonPrimitive, + PolylinePrimitive, + RectanglePrimitive, + RoundRectanglePrimitive, + TextPrimitive +} PrimitiveType; + +typedef enum +{ + UndefinedReference, + GradientReference +} ReferenceType; + +typedef enum +{ + UndefinedSpread, + PadSpread, + ReflectSpread, + RepeatSpread +} SpreadMethod; + +typedef enum +{ + UndefinedWordBreakType, + NormalWordBreakType, + BreakWordBreakType +} WordBreakType; + +typedef struct _StopInfo +{ + PixelInfo + color; + + double + offset; +} StopInfo; + +typedef struct _GradientInfo +{ + GradientType + type; + + RectangleInfo + bounding_box; + + SegmentInfo + gradient_vector; + + StopInfo + *stops; + + size_t + number_stops; + + SpreadMethod + spread; + + MagickBooleanType + debug; + + PointInfo + center, + radii; + + double + radius, + angle; + + size_t + signature; +} GradientInfo; + +typedef struct _ElementReference +{ + char + *id; + + ReferenceType + type; + + GradientInfo + gradient; + + struct _ElementReference + *previous, + *next; + + size_t + signature; +} ElementReference; + +typedef struct _DrawInfo +{ + char + *primitive, + *geometry; + + RectangleInfo + viewbox; + + AffineMatrix + affine; + + PixelInfo + fill, + stroke, + undercolor, + border_color; + + Image + *fill_pattern, + *stroke_pattern; + + double + stroke_width; + + GradientInfo + gradient; + + MagickBooleanType + stroke_antialias, + text_antialias; + + FillRule + fill_rule; + + LineCap + linecap; + + LineJoin + linejoin; + + size_t + miterlimit; + + double + dash_offset; + + DecorationType + decorate; + + CompositeOperator + compose; + + char + *text, + *font, + *metrics, + *family; + + size_t + face; + + StyleType + style; + + StretchType + stretch; + + size_t + weight; + + char + *encoding; + + double + pointsize; + + char + *density; + + AlignType + align; + + GravityType + gravity; + + char + *server_name; + + double + *dash_pattern; + + char + *clip_mask; + + SegmentInfo + bounds; + + ClipPathUnits + clip_units; + + Quantum + alpha; + + MagickBooleanType + render; + + ElementReference + element_reference; + + double + kerning, + interword_spacing, + interline_spacing; + + DirectionType + direction; + + MagickBooleanType + debug; + + size_t + signature; + + double + fill_alpha, + stroke_alpha; + + MagickBooleanType + clip_path; + + Image + *clipping_mask; + + ComplianceType + compliance; + + Image + *composite_mask; + + char + *id; + + WordBreakType + word_break; + + ImageInfo + *image_info; +} DrawInfo; + +typedef struct _PrimitiveInfo +{ + PointInfo + point; + + size_t + coordinates; + + PrimitiveType + primitive; + + PaintMethod + method; + + char + *text; + + MagickBooleanType + closed_subpath; +} PrimitiveInfo; + +typedef struct _TypeMetric +{ + PointInfo + pixels_per_em; + + double + ascent, + descent, + width, + height, + max_advance, + underline_position, + underline_thickness; + + SegmentInfo + bounds; + + PointInfo + origin; +} TypeMetric; + +extern MagickExport DrawInfo + *AcquireDrawInfo(void), + *CloneDrawInfo(const ImageInfo *,const DrawInfo *), + *DestroyDrawInfo(DrawInfo *); + +extern MagickExport MagickBooleanType + DrawAffineImage(Image *,const Image *,const AffineMatrix *,ExceptionInfo *), + DrawClipPath(Image *,const DrawInfo *,const char *,ExceptionInfo *), + DrawGradientImage(Image *,const DrawInfo *,ExceptionInfo *), + DrawImage(Image *,const DrawInfo *,ExceptionInfo *), + DrawPatternPath(Image *,const DrawInfo *,const char *,Image **, + ExceptionInfo *), + DrawPrimitive(Image *,const DrawInfo *,const PrimitiveInfo *,ExceptionInfo *); + +extern MagickExport void + GetAffineMatrix(AffineMatrix *), + GetDrawInfo(const ImageInfo *,DrawInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/effect.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/effect.h new file mode 100644 index 0000000000..a90724f358 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/effect.h @@ -0,0 +1,93 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image effects methods. +*/ +#ifndef MAGICKCORE_EFFECT_H +#define MAGICKCORE_EFFECT_H + +#include "MagickCore/morphology.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedPreview, + RotatePreview, + ShearPreview, + RollPreview, + HuePreview, + SaturationPreview, + BrightnessPreview, + GammaPreview, + SpiffPreview, + DullPreview, + GrayscalePreview, + QuantizePreview, + DespecklePreview, + ReduceNoisePreview, + AddNoisePreview, + SharpenPreview, + BlurPreview, + ThresholdPreview, + EdgeDetectPreview, + SpreadPreview, + SolarizePreview, + ShadePreview, + RaisePreview, + SegmentPreview, + SwirlPreview, + ImplodePreview, + WavePreview, + OilPaintPreview, + CharcoalDrawingPreview, + JPEGPreview +} PreviewType; + +extern MagickExport Image + *AdaptiveBlurImage(const Image *,const double,const double,ExceptionInfo *), + *AdaptiveSharpenImage(const Image *,const double,const double, + ExceptionInfo *), + *BilateralBlurImage(const Image *,const size_t,const size_t, + const double,const double,ExceptionInfo *), + *BlurImage(const Image *,const double,const double,ExceptionInfo *), + *ConvolveImage(const Image *,const KernelInfo *,ExceptionInfo *), + *DespeckleImage(const Image *,ExceptionInfo *), + *EdgeImage(const Image *,const double,ExceptionInfo *), + *EmbossImage(const Image *,const double,const double,ExceptionInfo *), + *GaussianBlurImage(const Image *,const double,const double,ExceptionInfo *), + *KuwaharaImage(const Image *,const double,const double,ExceptionInfo *), + *LocalContrastImage(const Image *,const double,const double,ExceptionInfo *), + *MotionBlurImage(const Image *,const double,const double,const double, + ExceptionInfo *), + *PreviewImage(const Image *,const PreviewType,ExceptionInfo *), + *RotationalBlurImage(const Image *,const double,ExceptionInfo *), + *SelectiveBlurImage(const Image *,const double,const double,const double, + ExceptionInfo *), + *ShadeImage(const Image *,const MagickBooleanType,const double,const double, + ExceptionInfo *), + *SharpenImage(const Image *,const double,const double,ExceptionInfo *), + *SpreadImage(const Image *,const PixelInterpolateMethod,const double, + ExceptionInfo *), + *UnsharpMaskImage(const Image *,const double,const double,const double, + const double,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/enhance.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/enhance.h new file mode 100644 index 0000000000..534f5845d4 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/enhance.h @@ -0,0 +1,60 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image enhance methods. +*/ +#ifndef MAGICKCORE_ENHANCE_H +#define MAGICKCORE_ENHANCE_H + +#include "MagickCore/pixel.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + AutoGammaImage(Image *,ExceptionInfo *), + AutoLevelImage(Image *,ExceptionInfo *), + BrightnessContrastImage(Image *,const double,const double,ExceptionInfo *), + CLAHEImage(Image *,const size_t,const size_t,const size_t,const double, + ExceptionInfo *), + ClutImage(Image *,const Image *,const PixelInterpolateMethod,ExceptionInfo *), + ColorDecisionListImage(Image *,const char *,ExceptionInfo *), + ContrastImage(Image *,const MagickBooleanType,ExceptionInfo *), + ContrastStretchImage(Image *,const double,const double,ExceptionInfo *), + EqualizeImage(Image *image,ExceptionInfo *), + GammaImage(Image *,const double,ExceptionInfo *), + GrayscaleImage(Image *,const PixelIntensityMethod,ExceptionInfo *), + HaldClutImage(Image *,const Image *,ExceptionInfo *), + LevelImage(Image *,const double,const double,const double,ExceptionInfo *), + LevelizeImage(Image *,const double,const double,const double,ExceptionInfo *), + LevelImageColors(Image *,const PixelInfo *,const PixelInfo *, + const MagickBooleanType,ExceptionInfo *), + LinearStretchImage(Image *,const double,const double,ExceptionInfo *), + ModulateImage(Image *,const char *,ExceptionInfo *), + NegateImage(Image *,const MagickBooleanType,ExceptionInfo *), + NormalizeImage(Image *,ExceptionInfo *), + SigmoidalContrastImage(Image *,const MagickBooleanType,const double, + const double,ExceptionInfo *), + WhiteBalanceImage(Image *,ExceptionInfo *); + +extern MagickExport Image + *EnhanceImage(const Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/exception.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/exception.h new file mode 100644 index 0000000000..c6c733e43d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/exception.h @@ -0,0 +1,178 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore exception methods. +*/ +#ifndef MAGICKCORE_EXCEPTION_H +#define MAGICKCORE_EXCEPTION_H + +#include "MagickCore/semaphore.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedException, + WarningException = 300, + ResourceLimitWarning = 300, + TypeWarning = 305, + OptionWarning = 310, + DelegateWarning = 315, + MissingDelegateWarning = 320, + CorruptImageWarning = 325, + FileOpenWarning = 330, + BlobWarning = 335, + StreamWarning = 340, + CacheWarning = 345, + CoderWarning = 350, + FilterWarning = 352, + ModuleWarning = 355, + DrawWarning = 360, + ImageWarning = 365, + WandWarning = 370, + RandomWarning = 375, + XServerWarning = 380, + MonitorWarning = 385, + RegistryWarning = 390, + ConfigureWarning = 395, + PolicyWarning = 399, + ErrorException = 400, + ResourceLimitError = 400, + TypeError = 405, + OptionError = 410, + DelegateError = 415, + MissingDelegateError = 420, + CorruptImageError = 425, + FileOpenError = 430, + BlobError = 435, + StreamError = 440, + CacheError = 445, + CoderError = 450, + FilterError = 452, + ModuleError = 455, + DrawError = 460, + ImageError = 465, + WandError = 470, + RandomError = 475, + XServerError = 480, + MonitorError = 485, + RegistryError = 490, + ConfigureError = 495, + PolicyError = 499, + FatalErrorException = 700, + ResourceLimitFatalError = 700, + TypeFatalError = 705, + OptionFatalError = 710, + DelegateFatalError = 715, + MissingDelegateFatalError = 720, + CorruptImageFatalError = 725, + FileOpenFatalError = 730, + BlobFatalError = 735, + StreamFatalError = 740, + CacheFatalError = 745, + CoderFatalError = 750, + FilterFatalError = 752, + ModuleFatalError = 755, + DrawFatalError = 760, + ImageFatalError = 765, + WandFatalError = 770, + RandomFatalError = 775, + XServerFatalError = 780, + MonitorFatalError = 785, + RegistryFatalError = 790, + ConfigureFatalError = 795, + PolicyFatalError = 799 +} ExceptionType; + +struct _ExceptionInfo +{ + ExceptionType + severity; + + int + error_number; + + char + *reason, + *description; + + void + *exceptions; + + MagickBooleanType + relinquish; + + SemaphoreInfo + *semaphore; + + size_t + signature; +}; + +typedef void + (*ErrorHandler)(const ExceptionType,const char *,const char *); + +typedef void + (*FatalErrorHandler)(const ExceptionType,const char *,const char *) + magick_attribute((__noreturn__)); + +typedef void + (*WarningHandler)(const ExceptionType,const char *,const char *); + +extern MagickExport char + *GetExceptionMessage(const int); + +extern MagickExport const char + *GetLocaleExceptionMessage(const ExceptionType,const char *); + +extern MagickExport ErrorHandler + SetErrorHandler(ErrorHandler); + +extern MagickExport ExceptionInfo + *AcquireExceptionInfo(void), + *CloneExceptionInfo(ExceptionInfo *), + *DestroyExceptionInfo(ExceptionInfo *); + +extern MagickExport FatalErrorHandler + SetFatalErrorHandler(FatalErrorHandler); + +extern MagickExport MagickBooleanType + ThrowException(ExceptionInfo *,const ExceptionType,const char *, + const char *), + ThrowMagickExceptionList(ExceptionInfo *,const char *,const char *, + const size_t,const ExceptionType,const char *,const char *,va_list), + ThrowMagickException(ExceptionInfo *,const char *,const char *,const size_t, + const ExceptionType,const char *,const char *,...) + magick_attribute((__format__ (__printf__,7,8))); + +extern MagickExport void + CatchException(ExceptionInfo *), + ClearMagickException(ExceptionInfo *), + InheritException(ExceptionInfo *,const ExceptionInfo *), + MagickError(const ExceptionType,const char *,const char *), + MagickFatalError(const ExceptionType,const char *,const char *) + magick_attribute((__noreturn__)), + MagickWarning(const ExceptionType,const char *,const char *); + +extern MagickExport WarningHandler + SetWarningHandler(WarningHandler); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/feature.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/feature.h new file mode 100644 index 0000000000..fb28cd8881 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/feature.h @@ -0,0 +1,62 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore feature methods. +*/ +#ifndef MAGICKCORE_FEATURE_H +#define MAGICKCORE_FEATURE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + Haralick texture features. +*/ +typedef struct _ChannelFeatures +{ + double + angular_second_moment[4], + contrast[4], + correlation[4], + variance_sum_of_squares[4], + inverse_difference_moment[4], + sum_average[4], + sum_variance[4], + sum_entropy[4], + entropy[4], + difference_variance[4], + difference_entropy[4], + measure_of_correlation_1[4], + measure_of_correlation_2[4], + maximum_correlation_coefficient[4]; +} ChannelFeatures; + +extern MagickExport ChannelFeatures + *GetImageFeatures(const Image *,const size_t,ExceptionInfo *); + +extern MagickExport Image + *CannyEdgeImage(const Image *,const double,const double,const double, + const double,ExceptionInfo *), + *HoughLineImage(const Image *,const size_t,const size_t,const size_t, + ExceptionInfo *), + *MeanShiftImage(const Image *,const size_t,const size_t,const double, + ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/fourier.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/fourier.h new file mode 100644 index 0000000000..21e8e03132 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/fourier.h @@ -0,0 +1,48 @@ +/* + Copyright @ 2009 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore discrete Fourier transform (DFT) methods. +*/ +#ifndef MAGICKCORE_FFT_H +#define MAGICKCORE_FFT_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedComplexOperator, + AddComplexOperator, + ConjugateComplexOperator, + DivideComplexOperator, + MagnitudePhaseComplexOperator, + MultiplyComplexOperator, + RealImaginaryComplexOperator, + SubtractComplexOperator +} ComplexOperator; + +extern MagickExport Image + *ComplexImages(const Image *,const ComplexOperator,ExceptionInfo *), + *ForwardFourierTransformImage(const Image *,const MagickBooleanType, + ExceptionInfo *), + *InverseFourierTransformImage(const Image *,const Image *, + const MagickBooleanType,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/fx.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/fx.h new file mode 100644 index 0000000000..d665618a26 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/fx.h @@ -0,0 +1,34 @@ +/* + Copyright @ 2009 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image f/x methods. +*/ +#ifndef MAGICKCORE_FX_H +#define MAGICKCORE_FX_H + +#include "MagickCore/draw.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport Image + *FxImage(const Image *,const char *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/gem.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/gem.h new file mode 100644 index 0000000000..68f826c797 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/gem.h @@ -0,0 +1,41 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore graphic gems methods. +*/ +#ifndef MAGICKCORE_GEM_H +#define MAGICKCORE_GEM_H + +#include "MagickCore/fx.h" +#include "MagickCore/random_.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport double + ExpandAffine(const AffineMatrix *) magick_attribute((__pure__)); + +extern MagickExport void + ConvertHSLToRGB(const double,const double,const double,double *,double *, + double *), + ConvertRGBToHSL(const double,const double,const double,double *,double *, + double *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/geometry.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/geometry.h new file mode 100644 index 0000000000..e2e3d33bd7 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/geometry.h @@ -0,0 +1,169 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image geometry methods. +*/ +#ifndef MAGICKCORE_GEOMETRY_H +#define MAGICKCORE_GEOMETRY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ +#undef NoValue + NoValue = 0x0000, +#undef XValue + XValue = 0x0001, + XiValue = 0x0001, +#undef YValue + YValue = 0x0002, + PsiValue = 0x0002, +#undef WidthValue + WidthValue = 0x0004, + RhoValue = 0x0004, +#undef HeightValue + HeightValue = 0x0008, + SigmaValue = 0x0008, + ChiValue = 0x0010, + XiNegative = 0x0020, +#undef XNegative + XNegative = 0x0020, + PsiNegative = 0x0040, +#undef YNegative + YNegative = 0x0040, + ChiNegative = 0x0080, + PercentValue = 0x1000, /* '%' percentage of something */ + AspectValue = 0x2000, /* '!' resize no-aspect - special use flag */ + NormalizeValue = 0x2000, /* '!' ScaleKernelValue() in morphology.c */ + LessValue = 0x4000, /* '<' resize smaller - special use flag */ + GreaterValue = 0x8000, /* '>' resize larger - spacial use flag */ + MinimumValue = 0x10000, /* '^' special handling needed */ + CorrelateNormalizeValue = 0x10000, /* '^' see ScaleKernelValue() */ + AreaValue = 0x20000, /* '@' resize to area - special use flag */ + DecimalValue = 0x40000, /* '.' floating point numbers found */ + SeparatorValue = 0x80000, /* 'x' separator found */ + AspectRatioValue = 0x100000, /* '~' special handling needed */ + AlphaValue = 0x200000, /* '/' alpha */ + MaximumValue = 0x400000, /* '#' special handling needed */ +#undef AllValues + AllValues = 0x7fffffff +} GeometryFlags; + +#if defined(ForgetGravity) +#undef ForgetGravity +#undef NorthWestGravity +#undef NorthGravity +#undef NorthEastGravity +#undef WestGravity +#undef CenterGravity +#undef EastGravity +#undef SouthWestGravity +#undef SouthGravity +#undef SouthEastGravity +#endif + +typedef enum +{ + UndefinedGravity, + ForgetGravity = 0, + NorthWestGravity = 1, + NorthGravity = 2, + NorthEastGravity = 3, + WestGravity = 4, + CenterGravity = 5, + EastGravity = 6, + SouthWestGravity = 7, + SouthGravity = 8, + SouthEastGravity = 9 +} GravityType; + +typedef struct _AffineMatrix +{ + double + sx, + rx, + ry, + sy, + tx, + ty; +} AffineMatrix; + +typedef struct _GeometryInfo +{ + double + rho, + sigma, + xi, + psi, + chi; +} GeometryInfo; + +typedef struct _OffsetInfo +{ + ssize_t + x, + y; +} OffsetInfo; + +typedef struct _PointInfo +{ + double + x, + y; +} PointInfo; + +typedef struct _RectangleInfo +{ + size_t + width, + height; + + ssize_t + x, + y; +} RectangleInfo; + +extern MagickExport char + *GetPageGeometry(const char *); + +extern MagickExport MagickBooleanType + IsGeometry(const char *), + IsSceneGeometry(const char *,const MagickBooleanType); + +extern MagickExport MagickStatusType + GetGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *), + ParseAbsoluteGeometry(const char *,RectangleInfo *), + ParseAffineGeometry(const char *,AffineMatrix *,ExceptionInfo *), + ParseGeometry(const char *,GeometryInfo *), + ParseGravityGeometry(const Image *,const char *,RectangleInfo *, + ExceptionInfo *), + ParseMetaGeometry(const char *,ssize_t *,ssize_t *,size_t *,size_t *), + ParsePageGeometry(const Image *,const char *,RectangleInfo *,ExceptionInfo *), + ParseRegionGeometry(const Image *,const char *,RectangleInfo *, + ExceptionInfo *); + +extern MagickExport void + GravityAdjustGeometry(const size_t,const size_t,const GravityType, + RectangleInfo *), + SetGeometry(const Image *,RectangleInfo *), + SetGeometryInfo(GeometryInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/histogram.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/histogram.h new file mode 100644 index 0000000000..6e367f6271 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/histogram.h @@ -0,0 +1,45 @@ +/* + Copyright @ 2009 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore histogram methods. +*/ +#ifndef MAGICKCORE_HISTOGRAM_H +#define MAGICKCORE_HISTOGRAM_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport PixelInfo + *GetImageHistogram(const Image *,size_t *,ExceptionInfo *); + +extern MagickExport Image + *UniqueImageColors(const Image *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + IdentifyPaletteImage(const Image *,ExceptionInfo *), + IsHistogramImage(const Image *,ExceptionInfo *), + IsPaletteImage(const Image *), + MinMaxStretchImage(Image *,const double,const double,const double, + ExceptionInfo *); + +extern MagickExport size_t + GetNumberColors(const Image *,FILE *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/identify.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/identify.h new file mode 100644 index 0000000000..45216b2ad9 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/identify.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image identify method. +*/ +#ifndef MAGICKCORE_IDENTIFY_H +#define MAGICKCORE_IDENTIFY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + IdentifyImage(Image *,FILE *,const MagickBooleanType,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/image-view.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/image-view.h new file mode 100644 index 0000000000..0019682d6b --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/image-view.h @@ -0,0 +1,83 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image view methods. +*/ +#ifndef MAGICKCORE_IMAGE_VIEW_H +#define MAGICKCORE_IMAGE_VIEW_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _ImageView + ImageView; + +typedef MagickBooleanType + (*DuplexTransferImageViewMethod)(const ImageView *,const ImageView *, + ImageView *,const ssize_t,const int,void *), + (*GetImageViewMethod)(const ImageView *,const ssize_t,const int,void *), + (*SetImageViewMethod)(ImageView *,const ssize_t,const int,void *), + (*TransferImageViewMethod)(const ImageView *,ImageView *,const ssize_t, + const int,void *), + (*UpdateImageViewMethod)(ImageView *,const ssize_t,const int,void *); + +extern MagickExport char + *GetImageViewException(const ImageView *,ExceptionType *); + +extern MagickExport const Quantum + *GetImageViewVirtualPixels(const ImageView *); + +extern MagickExport const void + *GetImageViewVirtualMetacontent(const ImageView *); + +extern MagickExport Image + *GetImageViewImage(const ImageView *); + +extern MagickExport ImageView + *CloneImageView(const ImageView *), + *DestroyImageView(ImageView *), + *NewImageView(Image *,ExceptionInfo *), + *NewImageViewRegion(Image *,const ssize_t,const ssize_t,const size_t, + const size_t,ExceptionInfo *); + +extern MagickExport MagickBooleanType + DuplexTransferImageViewIterator(ImageView *,ImageView *,ImageView *, + DuplexTransferImageViewMethod,void *), + GetImageViewIterator(ImageView *,GetImageViewMethod,void *), + IsImageView(const ImageView *), + SetImageViewIterator(ImageView *,SetImageViewMethod,void *), + TransferImageViewIterator(ImageView *,ImageView *,TransferImageViewMethod, + void *), + UpdateImageViewIterator(ImageView *,UpdateImageViewMethod,void *); + +extern MagickExport Quantum + *GetImageViewAuthenticPixels(const ImageView *); + +extern MagickExport RectangleInfo + GetImageViewExtent(const ImageView *); + +extern MagickExport void + SetImageViewDescription(ImageView *,const char *), + SetImageViewThreads(ImageView *,const size_t); + +extern MagickExport void + *GetImageViewAuthenticMetacontent(const ImageView *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/image.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/image.h new file mode 100644 index 0000000000..47e9b21bd4 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/image.h @@ -0,0 +1,557 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image methods. +*/ +#ifndef MAGICKCORE_IMAGE_H +#define MAGICKCORE_IMAGE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#define OpaqueAlpha ((Quantum) QuantumRange) +#define TransparentAlpha ((Quantum) 0) + +typedef enum +{ + UndefinedType, + BilevelType, + GrayscaleType, + GrayscaleAlphaType, + PaletteType, + PaletteAlphaType, + TrueColorType, + TrueColorAlphaType, + ColorSeparationType, + ColorSeparationAlphaType, + OptimizeType, + PaletteBilevelAlphaType +} ImageType; + +typedef enum +{ + UndefinedInterlace, + NoInterlace, + LineInterlace, + PlaneInterlace, + PartitionInterlace, + GIFInterlace, + JPEGInterlace, + PNGInterlace +} InterlaceType; + +typedef enum +{ + UndefinedOrientation, + TopLeftOrientation, + TopRightOrientation, + BottomRightOrientation, + BottomLeftOrientation, + LeftTopOrientation, + RightTopOrientation, + RightBottomOrientation, + LeftBottomOrientation +} OrientationType; + +typedef enum +{ + UndefinedResolution, + PixelsPerInchResolution, + PixelsPerCentimeterResolution +} ResolutionType; + +typedef struct _PrimaryInfo +{ + double + x, + y, + z; +} PrimaryInfo; + +typedef struct _SegmentInfo +{ + double + x1, + y1, + x2, + y2; +} SegmentInfo; + +typedef enum +{ + UndefinedTransmitType, + FileTransmitType, + BlobTransmitType, + StreamTransmitType, + ImageTransmitType +} TransmitType; + +typedef struct _ChromaticityInfo +{ + PrimaryInfo + red_primary, + green_primary, + blue_primary, + white_point; +} ChromaticityInfo; + +#include "MagickCore/blob.h" +#include "MagickCore/colorspace.h" +#include "MagickCore/cache-view.h" +#include "MagickCore/color.h" +#include "MagickCore/composite.h" +#include "MagickCore/compress.h" +#include "MagickCore/effect.h" +#include "MagickCore/geometry.h" +#include "MagickCore/layer.h" +#include "MagickCore/locale_.h" +#include "MagickCore/monitor.h" +#include "MagickCore/pixel.h" +#include "MagickCore/profile.h" +#include "MagickCore/quantum.h" +#include "MagickCore/resample.h" +#include "MagickCore/resize.h" +#include "MagickCore/semaphore.h" +#include "MagickCore/stream.h" +#include "MagickCore/timer.h" + +struct _Image +{ + ClassType + storage_class; + + ColorspaceType + colorspace; /* colorspace of image data */ + + CompressionType + compression; /* compression of image when read/write */ + + size_t + quality; /* compression quality setting, meaning varies */ + + OrientationType + orientation; /* photo orientation of image */ + + MagickBooleanType + taint; /* has image been modified since reading */ + + size_t + columns, /* physical size of image */ + rows, + depth, /* depth of image on read/write */ + colors; /* Size of color table, or actual color count */ + /* Only valid if image is not DirectClass */ + + PixelInfo + *colormap, + alpha_color, /* deprecated */ + background_color, /* current background color attribute */ + border_color, /* current bordercolor attribute */ + transparent_color; /* color for 'transparent' color index in GIF */ + + double + gamma; + + ChromaticityInfo + chromaticity; + + RenderingIntent + rendering_intent; + + void + *profiles; + + ResolutionType + units; /* resolution/density ppi or ppc */ + + char + *montage, + *directory, + *geometry; + + ssize_t + offset; /* ??? */ + + PointInfo + resolution; /* image resolution/density */ + + RectangleInfo + page, /* virtual canvas size and offset of image */ + extract_info; + + double + fuzz; /* current color fuzz attribute - move to image_info */ + + FilterType + filter; /* resize/distort filter to apply */ + + PixelIntensityMethod + intensity; /* method to generate an intensity value from a pixel */ + + InterlaceType + interlace; + + EndianType + endian; /* raw data integer ordering on read/write */ + + GravityType + gravity; /* Gravity attribute for positioning in image */ + + CompositeOperator + compose; /* alpha composition method for layered images */ + + DisposeType + dispose; /* GIF animation disposal method */ + + size_t + scene, /* index of image in multi-image file */ + delay, /* Animation delay time */ + duration; /* Total animation duration sum(delay*iterations) */ + + ssize_t + ticks_per_second; /* units for delay time, default 100 for GIF */ + + size_t + iterations, /* number of interactions for GIF animations */ + total_colors; + + ssize_t + start_loop; /* ??? */ + + PixelInterpolateMethod + interpolate; /* Interpolation of color for between pixel lookups */ + + MagickBooleanType + black_point_compensation; + + RectangleInfo + tile_offset; + + ImageType + type; + + MagickBooleanType + dither; /* dithering on/off */ + + MagickSizeType + extent; /* Size of image read from disk */ + + MagickBooleanType + ping; /* no image data read, just attributes */ + + MagickBooleanType + read_mask, + write_mask; + + PixelTrait + alpha_trait; /* is transparency channel defined and active */ + + size_t + number_channels, + number_meta_channels, + metacontent_extent; + + ChannelType + channel_mask; + + PixelChannelMap + *channel_map; + + void + *cache; + + ErrorInfo + error; + + TimerInfo + timer; + + MagickProgressMonitor + progress_monitor; + + void + *client_data; + + Ascii85Info + *ascii85; + + ProfileInfo + *generic_profile; + + void + *properties, /* general settings, to save with image */ + *artifacts; /* general operational/coder settings, not saved */ + + char + filename[MagickPathExtent], /* images input filename */ + magick_filename[MagickPathExtent], /* given image filename (with read mods) */ + magick[MagickPathExtent]; /* images file format (file magic) */ + + size_t + magick_columns, /* size of image when read/created */ + magick_rows; + + BlobInfo + *blob; /* image file as in-memory string of 'extent' */ + + time_t + timestamp; + + MagickBooleanType + debug; /* debug output attribute */ + + ssize_t + reference_count; /* image data sharing memory management */ + + SemaphoreInfo + *semaphore; + + struct _ImageInfo + *image_info; /* (Optional) Image belongs to this ImageInfo 'list' + * For access to 'global options' when no per-image + * attribute, prosperity, or artifact has been set. + */ + + struct _Image + *list, /* Undo/Redo image processing list (for display) */ + *previous, /* Image list links */ + *next; + + size_t + signature; + + PixelInfo + matte_color; /* current mattecolor attribute */ + + MagickBooleanType + composite_mask; + + PixelTrait + mask_trait; /* apply the clip or composite mask */ + + ChannelType + channels; + + time_t + ttl; +}; + +/* + ImageInfo structure: + Stores an image list, as well as all global settings used by all images + held, -- unless overridden for that specific image. See SyncImagesettings() + which maps any global setting that always overrides specific image settings. +*/ +struct _ImageInfo +{ + CompressionType + compression; /* compression method when reading/saving image */ + + OrientationType + orientation; /* orientation setting */ + + MagickBooleanType + temporary, /* image file to be deleted after read "ephemeral:" */ + adjoin, /* save images to separate scene files */ + affirm, + antialias; + + char + *size, /* image generation size */ + *extract, /* crop/resize string on image read */ + *page, + *scenes; /* scene numbers that is to be read in */ + + size_t + scene, /* starting value for image save numbering */ + number_scenes, /* total number of images in list - for escapes */ + depth; /* current read/save depth of images */ + + InterlaceType + interlace; /* interlace for image write */ + + EndianType + endian; /* integer endian order for raw image data */ + + ResolutionType + units; /* density pixels/inch or pixel/cm */ + + size_t + quality; /* compression quality */ + + char + *sampling_factor, /* Chroma subsampling ratio string */ + *server_name, /* X windows server name - display/animate */ + *font, /* DUP for draw_info */ + *texture, /* montage/display background tile */ + *density; /* DUP for image and draw_info */ + + double + pointsize, + fuzz; /* current color fuzz attribute */ + + PixelInfo + alpha_color, /* deprecated */ + background_color, /* user set background color */ + border_color, /* user set border color */ + transparent_color; /* color for transparent index in color tables */ + /* NB: fill color is only needed in draw_info! */ + /* the same for undercolor (for font drawing) */ + + MagickBooleanType + dither, /* dither enable-disable */ + monochrome; /* read/write pcl,pdf,ps,xps as monochrome image */ + + ColorspaceType + colorspace; + + CompositeOperator + compose; + + ImageType + type; + + MagickBooleanType + ping, /* fast read image attributes, not image data */ + verbose; /* verbose output enable/disable */ + + ChannelType + channel; + + void + *options; /* splay tree of global options */ + + void + *profile; + + MagickBooleanType + synchronize; + + MagickProgressMonitor + progress_monitor; + + void + *client_data, + *cache; + + StreamHandler + stream; + + FILE + *file; + + void + *blob; + + size_t + length; + + char + magick[MagickPathExtent], /* image file format (file magick) */ + unique[MagickPathExtent], /* unique temporary filename - delegates */ + filename[MagickPathExtent]; /* filename when reading/writing image */ + + MagickBooleanType + debug; + + size_t + signature; + + CustomStreamInfo + *custom_stream; + + PixelInfo + matte_color; /* matte (frame) color */ +}; + +extern MagickExport ChannelType + SetImageChannelMask(Image *,const ChannelType); + +extern MagickExport ExceptionType + CatchImageException(Image *); + +extern MagickExport FILE + *GetImageInfoFile(const ImageInfo *); + +extern MagickExport Image + *AcquireImage(const ImageInfo *,ExceptionInfo *), + *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *), + *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType, + ExceptionInfo *), + *DestroyImage(Image *), + *GetImageMask(const Image *,const PixelMask,ExceptionInfo *), + *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *, + ExceptionInfo *), + *ReferenceImage(Image *), + *SmushImages(const Image *,const MagickBooleanType,const ssize_t, + ExceptionInfo *); + +extern MagickExport ImageInfo + *AcquireImageInfo(void), + *CloneImageInfo(const ImageInfo *), + *DestroyImageInfo(ImageInfo *); + +extern MagickExport MagickBooleanType + ClipImage(Image *,ExceptionInfo *), + ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *), + CopyImagePixels(Image *,const Image *,const RectangleInfo *, + const OffsetInfo *,ExceptionInfo *), + IsTaintImage(const Image *), + IsHighDynamicRangeImage(const Image *,ExceptionInfo *), + IsImageObject(const Image *), + ListMagickInfo(FILE *,ExceptionInfo *), + ModifyImage(Image **,ExceptionInfo *), + ResetImagePage(Image *,const char *), + ResetImagePixels(Image *,ExceptionInfo *), + SetImageAlpha(Image *,const Quantum,ExceptionInfo *), + SetImageBackgroundColor(Image *,ExceptionInfo *), + SetImageColor(Image *,const PixelInfo *,ExceptionInfo *), + SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *), + SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *), + SetImageMask(Image *,const PixelMask type,const Image *,ExceptionInfo *), + SetImageRegionMask(Image *,const PixelMask type,const RectangleInfo *, + ExceptionInfo *), + SetImageStorageClass(Image *,const ClassType,ExceptionInfo *), + StripImage(Image *,ExceptionInfo *), + SyncImage(Image *,ExceptionInfo *), + SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *), + SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *); + +extern MagickExport size_t + InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *, + ExceptionInfo *); + +extern MagickExport ssize_t + GetImageReferenceCount(Image *); + +extern MagickExport VirtualPixelMethod + GetImageVirtualPixelMethod(const Image *), + SetImageVirtualPixelMethod(Image *,const VirtualPixelMethod,ExceptionInfo *); + +extern MagickExport void + AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *), + DestroyImagePixels(Image *), + DisassociateImageStream(Image *), + GetImageInfo(ImageInfo *), + SetImageInfoBlob(ImageInfo *,const void *,const size_t), + SetImageInfoFile(ImageInfo *,FILE *), + SetImageInfoCustomStream(ImageInfo *,CustomStreamInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/layer.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/layer.h new file mode 100644 index 0000000000..641e524f48 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/layer.h @@ -0,0 +1,76 @@ +/* + Copyright @ 2006 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image layer methods. +*/ +#ifndef MAGICKCORE_LAYER_H +#define MAGICKCORE_LAYER_H + +#include "MagickCore/composite.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UnrecognizedDispose, + UndefinedDispose = 0, + NoneDispose = 1, + BackgroundDispose = 2, + PreviousDispose = 3 +} DisposeType; + +typedef enum +{ + UndefinedLayer, + CoalesceLayer, + CompareAnyLayer, + CompareClearLayer, + CompareOverlayLayer, + DisposeLayer, + OptimizeLayer, + OptimizeImageLayer, + OptimizePlusLayer, + OptimizeTransLayer, + RemoveDupsLayer, + RemoveZeroLayer, + CompositeLayer, + MergeLayer, + FlattenLayer, + MosaicLayer, + TrimBoundsLayer +} LayerMethod; + +extern MagickExport Image + *CoalesceImages(const Image *,ExceptionInfo *), + *DisposeImages(const Image *,ExceptionInfo *), + *CompareImagesLayers(const Image *,const LayerMethod,ExceptionInfo *), + *MergeImageLayers(Image *,const LayerMethod,ExceptionInfo *), + *OptimizeImageLayers(const Image *,ExceptionInfo *), + *OptimizePlusImageLayers(const Image *,ExceptionInfo *); + +extern MagickExport void + CompositeLayers(Image *,const CompositeOperator,Image *,const ssize_t, + const ssize_t,ExceptionInfo *), + OptimizeImageTransparency(const Image *,ExceptionInfo *), + RemoveDuplicateLayers(Image **,ExceptionInfo *), + RemoveZeroDelayLayers(Image **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/linked-list.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/linked-list.h new file mode 100644 index 0000000000..5ce79947d1 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/linked-list.h @@ -0,0 +1,57 @@ +/* + Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore linked list methods. +*/ +#ifndef MAGICKCORE_LINKED_LIST_H +#define MAGICKCORE_LINKED_LIST_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _LinkedListInfo + LinkedListInfo; + +extern MagickExport LinkedListInfo + *DestroyLinkedList(LinkedListInfo *,void *(*)(void *)), + *NewLinkedList(const size_t); + +extern MagickExport MagickBooleanType + AppendValueToLinkedList(LinkedListInfo *,const void *), + InsertValueInLinkedList(LinkedListInfo *,const size_t,const void *), + InsertValueInSortedLinkedList(LinkedListInfo *, + int (*)(const void *,const void *),void **,const void *), + IsLinkedListEmpty(const LinkedListInfo *), + LinkedListToArray(LinkedListInfo *,void **); + +extern MagickExport size_t + GetNumberOfElementsInLinkedList(const LinkedListInfo *); + +extern MagickExport void + ClearLinkedList(LinkedListInfo *,void *(*)(void *)), + *GetLastValueInLinkedList(LinkedListInfo *), + *GetNextValueInLinkedList(LinkedListInfo *), + *GetValueFromLinkedList(LinkedListInfo *,const size_t), + *RemoveElementByValueFromLinkedList(LinkedListInfo *,const void *), + *RemoveElementFromLinkedList(LinkedListInfo *,const size_t), + *RemoveLastElementFromLinkedList(LinkedListInfo *), + ResetLinkedListIterator(LinkedListInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/list.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/list.h new file mode 100644 index 0000000000..dadf5753c7 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/list.h @@ -0,0 +1,65 @@ +/* + Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image list methods. +*/ +#ifndef MAGICKCORE_LIST_H +#define MAGICKCORE_LIST_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport Image + *CloneImageList(const Image *,ExceptionInfo *), + *CloneImages(const Image *,const char *,ExceptionInfo *), + *DestroyImageList(Image *), + *DuplicateImages(Image *,const size_t,const char *,ExceptionInfo *), + *GetFirstImageInList(const Image *) magick_attribute((__pure__)), + *GetImageFromList(const Image *,const ssize_t) magick_attribute((__pure__)), + *GetLastImageInList(const Image *) magick_attribute((__pure__)), + *GetNextImageInList(const Image *) magick_attribute((__pure__)), + *GetPreviousImageInList(const Image *) magick_attribute((__pure__)), + **ImageListToArray(const Image *,ExceptionInfo *), + *NewImageList(void) magick_attribute((__const__)), + *RemoveImageFromList(Image **), + *RemoveLastImageFromList(Image **), + *RemoveFirstImageFromList(Image **), + *SpliceImageIntoList(Image **,const size_t,const Image *), + *SplitImageList(Image *), + *SyncNextImageInList(const Image *); + +extern MagickExport size_t + GetImageListLength(const Image *) magick_attribute((__pure__)); + +extern MagickExport ssize_t + GetImageIndexInList(const Image *) magick_attribute((__pure__)); + +extern MagickExport void + AppendImageToList(Image **,const Image *), + DeleteImageFromList(Image **), + DeleteImages(Image **,const char *,ExceptionInfo *), + InsertImageInList(Image **,Image *), + PrependImageToList(Image **,Image *), + ReplaceImageInList(Image **,Image *), + ReplaceImageInListReturnLast(Image **,Image *), + ReverseImageList(Image **), + SyncImageList(Image *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/locale_.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/locale_.h new file mode 100644 index 0000000000..67091b2d7a --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/locale_.h @@ -0,0 +1,83 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore locale methods. +*/ +#ifndef MAGICKCORE_LOCALE_H +#define MAGICKCORE_LOCALE_H + +#include "MagickCore/linked-list.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _LocaleInfo +{ + char + *path, + *tag, + *message; + + MagickBooleanType + stealth; + + size_t + signature; +} LocaleInfo; + +extern MagickExport char + **GetLocaleList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const char + *GetLocaleMessage(const char *); + +extern MagickExport const LocaleInfo + *GetLocaleInfo_(const char *,ExceptionInfo *), + **GetLocaleInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport double + InterpretLocaleValue(const char *magick_restrict,char *magick_restrict *); + +extern MagickExport int + LocaleCompare(const char *,const char *) magick_attribute((__pure__)), + LocaleLowercase(const int), + LocaleNCompare(const char *,const char *,const size_t) + magick_attribute((__pure__)), + LocaleUppercase(const int); + +extern MagickExport LinkedListInfo + *DestroyLocaleOptions(LinkedListInfo *), + *GetLocaleOptions(const char *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + ListLocaleInfo(FILE *,ExceptionInfo *); + +extern MagickExport ssize_t + FormatLocaleFile(FILE *,const char *magick_restrict,...) + magick_attribute((__format__ (__printf__,2,3))), + FormatLocaleString(char *magick_restrict,const size_t, + const char *magick_restrict,...) + magick_attribute((__format__ (__printf__,3,4))); + +extern MagickExport void + LocaleLower(char *), + LocaleUpper(char *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/log.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/log.h new file mode 100644 index 0000000000..b4ca71c88e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/log.h @@ -0,0 +1,100 @@ +/* + Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore log methods. +*/ +#ifndef MAGICKCORE_LOG_H +#define MAGICKCORE_LOG_H + +#include "MagickCore/exception.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if !defined(GetMagickModule) +# define GetMagickModule() __FILE__,__func__,(unsigned long) __LINE__ +#endif + +#define MagickLogFilename "log.xml" + +typedef enum +{ + UndefinedEvents = 0x000000, + NoEvents = 0x00000, + AccelerateEvent = 0x00001, + AnnotateEvent = 0x00002, + BlobEvent = 0x00004, + CacheEvent = 0x00008, + CoderEvent = 0x00010, + ConfigureEvent = 0x00020, + DeprecateEvent = 0x00040, + DrawEvent = 0x00080, + ExceptionEvent = 0x00100, /* Log Errors and Warnings immediately */ + ImageEvent = 0x00200, + LocaleEvent = 0x00400, + ModuleEvent = 0x00800, /* Log coder and filter modules */ + PixelEvent = 0x01000, + PolicyEvent = 0x02000, + ResourceEvent = 0x04000, + TraceEvent = 0x08000, + TransformEvent = 0x10000, + UserEvent = 0x20000, + WandEvent = 0x40000, /* Log MagickWand */ + X11Event = 0x80000, + CommandEvent = 0x100000, /* Log Command Processing (CLI & Scripts) */ + AllEvents = 0x7fffffff +} LogEventType; + +typedef struct _LogInfo + LogInfo; + +typedef void + (*MagickLogMethod)(const LogEventType,const char *); + +extern MagickExport char + **GetLogList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const char + *GetLogName(void) magick_attribute((__pure__)), + *SetLogName(const char *); + +extern MagickExport LogEventType + GetLogEventMask(void) magick_attribute((__pure__)); + +extern MagickExport const LogInfo + **GetLogInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport LogEventType + SetLogEventMask(const char *); + +extern MagickExport MagickBooleanType + IsEventLogging(void) magick_attribute((__pure__)), + ListLogInfo(FILE *,ExceptionInfo *), + LogMagickEvent(const LogEventType,const char *,const char *,const size_t, + const char *,...) magick_attribute((__format__ (__printf__,5,6))), + LogMagickEventList(const LogEventType,const char *,const char *,const size_t, + const char *,va_list) magick_attribute((__format__ (__printf__,5,0))); + +extern MagickExport void + CloseMagickLog(void), + SetLogFormat(const char *), + SetLogMethod(MagickLogMethod); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magic.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magic.h new file mode 100644 index 0000000000..d910e8b3fe --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magic.h @@ -0,0 +1,48 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore magic methods. +*/ +#ifndef MAGICKCORE_MAGIC_H +#define MAGICKCORE_MAGIC_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _MagicInfo + MagicInfo; + +extern MagickExport char + **GetMagicList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const char + *GetMagicName(const MagicInfo *); + +extern MagickExport MagickBooleanType + ListMagicInfo(FILE *,ExceptionInfo *); + +extern MagickExport const MagicInfo + *GetMagicInfo(const unsigned char *,const size_t,ExceptionInfo *), + **GetMagicInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport size_t + GetMagicPatternExtent(ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-baseconfig.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-baseconfig.h new file mode 100644 index 0000000000..5caef4099c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-baseconfig.h @@ -0,0 +1,1584 @@ +#ifndef _MAGICKCORE_MAGICK_BASECONFIG_H +#define _MAGICKCORE_MAGICK_BASECONFIG_H 1 + +/* MagickCore/magick-baseconfig.h. Generated automatically at end of configure. */ +/* config/config.h. Generated from config.h.in by configure. */ +/* config/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if you have AUTOTRACE library */ +/* #undef AUTOTRACE_DELEGATE */ + +/* Define if coders and filters are to be built as modules. */ +/* #undef BUILD_MODULES */ + +/* Define if you have the bzip2 library */ +/* #undef BZLIB_DELEGATE */ + +/* Define if you have CAIRO library */ +/* #undef CAIRO_DELEGATE */ + +/* Channel mask depth */ +#ifndef MAGICKCORE_CHANNEL_MASK_DEPTH +#define MAGICKCORE_CHANNEL_MASK_DEPTH 32 +#endif + +/* permit enciphering and deciphering image pixels */ +#ifndef MAGICKCORE_CIPHER_SUPPORT +#define MAGICKCORE_CIPHER_SUPPORT 1 +#endif + +/* coders subdirectory. */ +#ifndef MAGICKCORE_CODER_DIRNAME +#define MAGICKCORE_CODER_DIRNAME "coders" +#endif + +/* Directory where architecture-dependent configuration files live. */ +#ifndef MAGICKCORE_CONFIGURE_PATH +#define MAGICKCORE_CONFIGURE_PATH "/root/lib/etc/ImageMagick-7/" +#endif + +/* Subdirectory of lib where architecture-dependent configuration files live. + */ +#ifndef MAGICKCORE_CONFIGURE_RELATIVE_PATH +#define MAGICKCORE_CONFIGURE_RELATIVE_PATH "ImageMagick-7" +#endif + +/* Define if you have DJVU library */ +/* #undef DJVU_DELEGATE */ + +/* Define if you have DMR library */ +/* #undef DMR_DELEGATE */ + +/* Directory where ImageMagick documents live. */ +#ifndef MAGICKCORE_DOCUMENTATION_PATH +#define MAGICKCORE_DOCUMENTATION_PATH "/root/lib/share/doc/ImageMagick-7/" +#endif + +/* Define to 1 to enable distributed pixel cache support. */ +#ifndef MAGICKCORE_DPC_SUPPORT +#define MAGICKCORE_DPC_SUPPORT 1 +#endif + +/* Define if you have Display Postscript */ +/* #undef DPS_DELEGATE */ + +/* exclude deprecated methods in MagickCore API */ +/* #undef EXCLUDE_DEPRECATED */ + +/* Directory where executables are installed. */ +#ifndef MAGICKCORE_EXECUTABLE_PATH +#define MAGICKCORE_EXECUTABLE_PATH "/root/lib/bin/" +#endif + +/* Define if you have FFTW library */ +/* #undef FFTW_DELEGATE */ + +/* filter subdirectory. */ +#ifndef MAGICKCORE_FILTER_DIRNAME +#define MAGICKCORE_FILTER_DIRNAME "filters" +#endif + +/* Define if you have FLIF library */ +/* #undef FLIF_DELEGATE */ + +/* Define if you have FONTCONFIG library */ +/* #undef FONTCONFIG_DELEGATE */ + +/* Define if you have FlashPIX library */ +/* #undef FPX_DELEGATE */ + +/* Define if you have FREETYPE library */ +/* #undef FREETYPE_DELEGATE */ + +/* Define if you have Ghostscript library or framework */ +/* #undef GS_DELEGATE */ + +/* Define if you have GVC library */ +/* #undef GVC_DELEGATE */ + +/* Define to 1 if you have the `acosh' function. */ +#ifndef MAGICKCORE_HAVE_ACOSH +#define MAGICKCORE_HAVE_ACOSH 1 +#endif + +/* Define to 1 if you have the `aligned_malloc' function. */ +/* #undef HAVE_ALIGNED_MALLOC */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARM_LIMITS_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_ARPA_INET_H +#define MAGICKCORE_HAVE_ARPA_INET_H 1 +#endif + +/* Define to 1 if you have the `asinh' function. */ +#ifndef MAGICKCORE_HAVE_ASINH +#define MAGICKCORE_HAVE_ASINH 1 +#endif + +/* Define to 1 if you have the `atanh' function. */ +#ifndef MAGICKCORE_HAVE_ATANH +#define MAGICKCORE_HAVE_ATANH 1 +#endif + +/* Define to 1 if you have the `atexit' function. */ +#ifndef MAGICKCORE_HAVE_ATEXIT +#define MAGICKCORE_HAVE_ATEXIT 1 +#endif + +/* Define to 1 if you have the `atoll' function. */ +#ifndef MAGICKCORE_HAVE_ATOLL +#define MAGICKCORE_HAVE_ATOLL 1 +#endif + +/* define if bool is a built-in type */ +#ifndef MAGICKCORE_HAVE_BOOL +#define MAGICKCORE_HAVE_BOOL /**/ +#endif + +/* Define to 1 if you have the `cabs' function. */ +#ifndef MAGICKCORE_HAVE_CABS +#define MAGICKCORE_HAVE_CABS 1 +#endif + +/* Define to 1 if you have the `carg' function. */ +#ifndef MAGICKCORE_HAVE_CARG +#define MAGICKCORE_HAVE_CARG 1 +#endif + +/* Define to 1 if you have the `cimag' function. */ +#ifndef MAGICKCORE_HAVE_CIMAG +#define MAGICKCORE_HAVE_CIMAG 1 +#endif + +/* Define to 1 if you have the `clock' function. */ +#ifndef MAGICKCORE_HAVE_CLOCK +#define MAGICKCORE_HAVE_CLOCK 1 +#endif + +/* Define to 1 if you have the `clock_getres' function. */ +#ifndef MAGICKCORE_HAVE_CLOCK_GETRES +#define MAGICKCORE_HAVE_CLOCK_GETRES 1 +#endif + +/* Define to 1 if you have the `clock_gettime' function. */ +#ifndef MAGICKCORE_HAVE_CLOCK_GETTIME +#define MAGICKCORE_HAVE_CLOCK_GETTIME 1 +#endif + +/* Define to 1 if clock_gettime supports CLOCK_REALTIME. */ +#ifndef MAGICKCORE_HAVE_CLOCK_REALTIME +#define MAGICKCORE_HAVE_CLOCK_REALTIME 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CL_CL_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_COMPLEX_H +#define MAGICKCORE_HAVE_COMPLEX_H 1 +#endif + +/* Define to 1 if you have the `creal' function. */ +#ifndef MAGICKCORE_HAVE_CREAL +#define MAGICKCORE_HAVE_CREAL 1 +#endif + +/* Define to 1 if you have the `ctime_r' function. */ +#ifndef MAGICKCORE_HAVE_CTIME_R +#define MAGICKCORE_HAVE_CTIME_R 1 +#endif + +/* Define to 1 if you have the declaration of `pread', and to 0 if you don't. + */ +#ifndef MAGICKCORE_HAVE_DECL_PREAD +#define MAGICKCORE_HAVE_DECL_PREAD 1 +#endif + +/* Define to 1 if you have the declaration of `pwrite', and to 0 if you don't. + */ +#ifndef MAGICKCORE_HAVE_DECL_PWRITE +#define MAGICKCORE_HAVE_DECL_PWRITE 1 +#endif + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#ifndef MAGICKCORE_HAVE_DECL_STRERROR_R +#define MAGICKCORE_HAVE_DECL_STRERROR_R 1 +#endif + +/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you + don't. */ +#ifndef MAGICKCORE_HAVE_DECL_STRLCPY +#define MAGICKCORE_HAVE_DECL_STRLCPY 0 +#endif + +/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. + */ +/* #undef HAVE_DECL_TZNAME */ + +/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you + don't. */ +#ifndef MAGICKCORE_HAVE_DECL_VSNPRINTF +#define MAGICKCORE_HAVE_DECL_VSNPRINTF 1 +#endif + +/* Define to 1 if you have the `directio' function. */ +/* #undef HAVE_DIRECTIO */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#ifndef MAGICKCORE_HAVE_DIRENT_H +#define MAGICKCORE_HAVE_DIRENT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_DLFCN_H +#define MAGICKCORE_HAVE_DLFCN_H 1 +#endif + +/* Define to 1 if you have the `erf' function. */ +#ifndef MAGICKCORE_HAVE_ERF +#define MAGICKCORE_HAVE_ERF 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_ERRNO_H +#define MAGICKCORE_HAVE_ERRNO_H 1 +#endif + +/* Define to 1 if you have the `execvp' function. */ +#ifndef MAGICKCORE_HAVE_EXECVP +#define MAGICKCORE_HAVE_EXECVP 1 +#endif + +/* Define to 1 if you have the `fchmod' function. */ +#ifndef MAGICKCORE_HAVE_FCHMOD +#define MAGICKCORE_HAVE_FCHMOD 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_FCNTL_H +#define MAGICKCORE_HAVE_FCNTL_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_FLOAT_H +#define MAGICKCORE_HAVE_FLOAT_H 1 +#endif + +/* Define to 1 if you have the `floor' function. */ +#ifndef MAGICKCORE_HAVE_FLOOR +#define MAGICKCORE_HAVE_FLOOR 1 +#endif + +/* Define to 1 if you have the `fork' function. */ +#ifndef MAGICKCORE_HAVE_FORK +#define MAGICKCORE_HAVE_FORK 1 +#endif + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#ifndef MAGICKCORE_HAVE_FSEEKO +#define MAGICKCORE_HAVE_FSEEKO 1 +#endif + +/* Define to 1 if you have the `ftime' function. */ +#ifndef MAGICKCORE_HAVE_FTIME +#define MAGICKCORE_HAVE_FTIME 1 +#endif + +/* Define to 1 if you have the `ftruncate' function. */ +#ifndef MAGICKCORE_HAVE_FTRUNCATE +#define MAGICKCORE_HAVE_FTRUNCATE 1 +#endif + +/* Define to 1 if you have the `getcwd' function. */ +#ifndef MAGICKCORE_HAVE_GETCWD +#define MAGICKCORE_HAVE_GETCWD 1 +#endif + +/* Define to 1 if you have the `getc_unlocked' function. */ +#ifndef MAGICKCORE_HAVE_GETC_UNLOCKED +#define MAGICKCORE_HAVE_GETC_UNLOCKED 1 +#endif + +/* Define to 1 if you have the `getdtablesize' function. */ +/* #undef HAVE_GETDTABLESIZE */ + +/* Define to 1 if you have the `getentropy' function. */ +#ifndef MAGICKCORE_HAVE_GETENTROPY +#define MAGICKCORE_HAVE_GETENTROPY 1 +#endif + +/* Define to 1 if you have the `getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the `getpagesize' function. */ +#ifndef MAGICKCORE_HAVE_GETPAGESIZE +#define MAGICKCORE_HAVE_GETPAGESIZE 1 +#endif + +/* Define to 1 if you have the `getpid' function. */ +#ifndef MAGICKCORE_HAVE_GETPID +#define MAGICKCORE_HAVE_GETPID 1 +#endif + +/* Define to 1 if you have the `getpwnam_r' function. */ +#ifndef MAGICKCORE_HAVE_GETPWNAM_R +#define MAGICKCORE_HAVE_GETPWNAM_R 1 +#endif + +/* Define to 1 if you have the `getrlimit' function. */ +#ifndef MAGICKCORE_HAVE_GETRLIMIT +#define MAGICKCORE_HAVE_GETRLIMIT 1 +#endif + +/* Define to 1 if you have the `getrusage' function. */ +#ifndef MAGICKCORE_HAVE_GETRUSAGE +#define MAGICKCORE_HAVE_GETRUSAGE 1 +#endif + +/* Define to 1 if you have the `gettimeofday' function. */ +#ifndef MAGICKCORE_HAVE_GETTIMEOFDAY +#define MAGICKCORE_HAVE_GETTIMEOFDAY 1 +#endif + +/* Define to 1 if you have the `gmtime_r' function. */ +#ifndef MAGICKCORE_HAVE_GMTIME_R +#define MAGICKCORE_HAVE_GMTIME_R 1 +#endif + +/* [Compile with hugepage support] */ +/* #undef HAVE_HUGEPAGES */ + +/* Define to 1 if the system has the type `intmax_t'. */ +#ifndef MAGICKCORE_HAVE_INTMAX_T +#define MAGICKCORE_HAVE_INTMAX_T 1 +#endif + +/* Define to 1 if the system has the type `intptr_t'. */ +#ifndef MAGICKCORE_HAVE_INTPTR_T +#define MAGICKCORE_HAVE_INTPTR_T 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_INTTYPES_H +#define MAGICKCORE_HAVE_INTTYPES_H 1 +#endif + +/* Define to 1 if you have the `isnan' function. */ +/* #undef HAVE_ISNAN */ + +/* Define to 1 if you have the `j0' function. */ +#ifndef MAGICKCORE_HAVE_J0 +#define MAGICKCORE_HAVE_J0 1 +#endif + +/* Define to 1 if you have the `j1' function. */ +#ifndef MAGICKCORE_HAVE_J1 +#define MAGICKCORE_HAVE_J1 1 +#endif + +/* Define if you have jemalloc memory allocation library */ +/* #undef HAVE_JEMALLOC */ + +/* Define if you have the header file. */ +/* #undef HAVE_LCMS2_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_LCMS2_LCMS2_H */ + +/* Define to 1 if you have the `gcov' library (-lgcov). */ +/* #undef HAVE_LIBGCOV */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_LIMITS_H +#define MAGICKCORE_HAVE_LIMITS_H 1 +#endif + +/* Define if you have Linux-compatible sendfile() */ +/* #undef HAVE_LINUX_SENDFILE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_UNISTD_H */ + +/* Define to 1 if you have the `lltostr' function. */ +/* #undef HAVE_LLTOSTR */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_LOCALE_H +#define MAGICKCORE_HAVE_LOCALE_H 1 +#endif + +/* Define to 1 if you have the `localtime_r' function. */ +#ifndef MAGICKCORE_HAVE_LOCALTIME_R +#define MAGICKCORE_HAVE_LOCALTIME_R 1 +#endif + +/* Define to 1 if the system has the type `long long int'. */ +#ifndef MAGICKCORE_HAVE_LONG_LONG_INT +#define MAGICKCORE_HAVE_LONG_LONG_INT 1 +#endif + +/* Define to 1 if you have the `lstat' function. */ +#ifndef MAGICKCORE_HAVE_LSTAT +#define MAGICKCORE_HAVE_LSTAT 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_PARAM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_O_DYLD_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_MALLOC_H +#define MAGICKCORE_HAVE_MALLOC_H 1 +#endif + +/* Define to 1 if declares mbstate_t. */ +#ifndef MAGICKCORE_HAVE_MBSTATE_T +#define MAGICKCORE_HAVE_MBSTATE_T 1 +#endif + +/* Define to 1 if you have the `memmove' function. */ +#ifndef MAGICKCORE_HAVE_MEMMOVE +#define MAGICKCORE_HAVE_MEMMOVE 1 +#endif + +/* Define to 1 if you have the `memset' function. */ +#ifndef MAGICKCORE_HAVE_MEMSET +#define MAGICKCORE_HAVE_MEMSET 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the `mkdir' function. */ +#ifndef MAGICKCORE_HAVE_MKDIR +#define MAGICKCORE_HAVE_MKDIR 1 +#endif + +/* Define to 1 if you have the `mkstemp' function. */ +#ifndef MAGICKCORE_HAVE_MKSTEMP +#define MAGICKCORE_HAVE_MKSTEMP 1 +#endif + +/* Define to 1 if you have the `mmap' function. */ +#ifndef MAGICKCORE_HAVE_MMAP +#define MAGICKCORE_HAVE_MMAP 1 +#endif + +/* Define if you have the mtmalloc memory allocation library */ +/* #undef HAVE_MTMALLOC */ + +/* Define to 1 if you have the `munmap' function. */ +#ifndef MAGICKCORE_HAVE_MUNMAP +#define MAGICKCORE_HAVE_MUNMAP 1 +#endif + +/* define if the compiler implements namespaces */ +#ifndef MAGICKCORE_HAVE_NAMESPACES +#define MAGICKCORE_HAVE_NAMESPACES /**/ +#endif + +/* Define if g++ supports namespace std. */ +#ifndef MAGICKCORE_HAVE_NAMESPACE_STD +#define MAGICKCORE_HAVE_NAMESPACE_STD /**/ +#endif + +/* Define to 1 if you have the `nanosleep' function. */ +#ifndef MAGICKCORE_HAVE_NANOSLEEP +#define MAGICKCORE_HAVE_NANOSLEEP 1 +#endif + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_NETDB_H +#define MAGICKCORE_HAVE_NETDB_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_NETINET_IN_H +#define MAGICKCORE_HAVE_NETINET_IN_H 1 +#endif + +/* Define to 1 if you have the `newlocale' function. */ +#ifndef MAGICKCORE_HAVE_NEWLOCALE +#define MAGICKCORE_HAVE_NEWLOCALE 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENCL_CL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OS_H */ + +/* Define to 1 if you have the `pclose' function. */ +#ifndef MAGICKCORE_HAVE_PCLOSE +#define MAGICKCORE_HAVE_PCLOSE 1 +#endif + +/* Define to 1 if you have the `poll' function. */ +#ifndef MAGICKCORE_HAVE_POLL +#define MAGICKCORE_HAVE_POLL 1 +#endif + +/* Define to 1 if you have the `popen' function. */ +#ifndef MAGICKCORE_HAVE_POPEN +#define MAGICKCORE_HAVE_POPEN 1 +#endif + +/* Define to 1 if you have the `posix_fadvise' function. */ +#ifndef MAGICKCORE_HAVE_POSIX_FADVISE +#define MAGICKCORE_HAVE_POSIX_FADVISE 1 +#endif + +/* Define to 1 if you have the `posix_fallocate' function. */ +#ifndef MAGICKCORE_HAVE_POSIX_FALLOCATE +#define MAGICKCORE_HAVE_POSIX_FALLOCATE 1 +#endif + +/* Define to 1 if you have the `posix_madvise' function. */ +#ifndef MAGICKCORE_HAVE_POSIX_MADVISE +#define MAGICKCORE_HAVE_POSIX_MADVISE 1 +#endif + +/* Define to 1 if you have the `posix_memalign' function. */ +#ifndef MAGICKCORE_HAVE_POSIX_MEMALIGN +#define MAGICKCORE_HAVE_POSIX_MEMALIGN 1 +#endif + +/* Define to 1 if you have the `posix_spawnp' function. */ +/* #undef HAVE_POSIX_SPAWNP */ + +/* Define to 1 if you have the `pow' function. */ +#ifndef MAGICKCORE_HAVE_POW +#define MAGICKCORE_HAVE_POW 1 +#endif + +/* Define to 1 if you have the `pread' function. */ +#ifndef MAGICKCORE_HAVE_PREAD +#define MAGICKCORE_HAVE_PREAD 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PROCESS_H */ + +/* Define if you have POSIX threads libraries and header files. */ +/* #undef HAVE_PTHREAD */ + +/* Have PTHREAD_PRIO_INHERIT. */ +/* #undef HAVE_PTHREAD_PRIO_INHERIT */ + +/* Define to 1 if you have the `putenv' function. */ +#ifndef MAGICKCORE_HAVE_PUTENV +#define MAGICKCORE_HAVE_PUTENV 1 +#endif + +/* Define to 1 if you have the `pwrite' function. */ +#ifndef MAGICKCORE_HAVE_PWRITE +#define MAGICKCORE_HAVE_PWRITE 1 +#endif + +/* Define to 1 if you have the `qsort_r' function. */ +#ifndef MAGICKCORE_HAVE_QSORT_R +#define MAGICKCORE_HAVE_QSORT_R 1 +#endif + +/* Define to 1 if you have the `raise' function. */ +#ifndef MAGICKCORE_HAVE_RAISE +#define MAGICKCORE_HAVE_RAISE 1 +#endif + +/* Define to 1 if you have the `rand_r' function. */ +#ifndef MAGICKCORE_HAVE_RAND_R +#define MAGICKCORE_HAVE_RAND_R 1 +#endif + +/* Define to 1 if you have the `readlink' function. */ +#ifndef MAGICKCORE_HAVE_READLINK +#define MAGICKCORE_HAVE_READLINK 1 +#endif + +/* Define to 1 if you have the `realpath' function. */ +#ifndef MAGICKCORE_HAVE_REALPATH +#define MAGICKCORE_HAVE_REALPATH 1 +#endif + +/* Define to 1 if you have the `seekdir' function. */ +#ifndef MAGICKCORE_HAVE_SEEKDIR +#define MAGICKCORE_HAVE_SEEKDIR 1 +#endif + +/* Define to 1 if you have the `select' function. */ +#ifndef MAGICKCORE_HAVE_SELECT +#define MAGICKCORE_HAVE_SELECT 1 +#endif + +/* Define to 1 if you have the `sendfile' function. */ +/* #undef HAVE_SENDFILE */ + +/* Define to 1 if you have the `setlocale' function. */ +#ifndef MAGICKCORE_HAVE_SETLOCALE +#define MAGICKCORE_HAVE_SETLOCALE 1 +#endif + +/* Define to 1 if you have the `setvbuf' function. */ +#ifndef MAGICKCORE_HAVE_SETVBUF +#define MAGICKCORE_HAVE_SETVBUF 1 +#endif + +/* X11 server supports shape extension */ +/* #undef HAVE_SHAPE */ + +/* X11 server supports shared memory extension */ +/* #undef HAVE_SHARED_MEMORY */ + +/* Define to 1 if you have the `sigaction' function. */ +#ifndef MAGICKCORE_HAVE_SIGACTION +#define MAGICKCORE_HAVE_SIGACTION 1 +#endif + +/* Define to 1 if you have the `sigemptyset' function. */ +#ifndef MAGICKCORE_HAVE_SIGEMPTYSET +#define MAGICKCORE_HAVE_SIGEMPTYSET 1 +#endif + +/* Define to 1 if you have the `socket' function. */ +#ifndef MAGICKCORE_HAVE_SOCKET +#define MAGICKCORE_HAVE_SOCKET 1 +#endif + +/* Define to 1 if you have the `spawnvp' function. */ +/* #undef HAVE_SPAWNVP */ + +/* Define to 1 if you have the `sqrt' function. */ +#ifndef MAGICKCORE_HAVE_SQRT +#define MAGICKCORE_HAVE_SQRT 1 +#endif + +/* Define to 1 if you have the `stat' function. */ +#ifndef MAGICKCORE_HAVE_STAT +#define MAGICKCORE_HAVE_STAT 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_STDARG_H +#define MAGICKCORE_HAVE_STDARG_H 1 +#endif + +/* Define to 1 if stdbool.h conforms to C99. */ +#ifndef MAGICKCORE_HAVE_STDBOOL_H +#define MAGICKCORE_HAVE_STDBOOL_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_STDDEF_H +#define MAGICKCORE_HAVE_STDDEF_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_STDINT_H +#define MAGICKCORE_HAVE_STDINT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_STDIO_H +#define MAGICKCORE_HAVE_STDIO_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_STDLIB_H +#define MAGICKCORE_HAVE_STDLIB_H 1 +#endif + +/* Define to 1 if you have the `strcasecmp' function. */ +#ifndef MAGICKCORE_HAVE_STRCASECMP +#define MAGICKCORE_HAVE_STRCASECMP 1 +#endif + +/* Define to 1 if you have the `strcasestr' function. */ +#ifndef MAGICKCORE_HAVE_STRCASESTR +#define MAGICKCORE_HAVE_STRCASESTR 1 +#endif + +/* Define to 1 if you have the `strchr' function. */ +#ifndef MAGICKCORE_HAVE_STRCHR +#define MAGICKCORE_HAVE_STRCHR 1 +#endif + +/* Define to 1 if you have the `strcspn' function. */ +#ifndef MAGICKCORE_HAVE_STRCSPN +#define MAGICKCORE_HAVE_STRCSPN 1 +#endif + +/* Define to 1 if you have the `strdup' function. */ +#ifndef MAGICKCORE_HAVE_STRDUP +#define MAGICKCORE_HAVE_STRDUP 1 +#endif + +/* Define to 1 if you have the `strerror' function. */ +#ifndef MAGICKCORE_HAVE_STRERROR +#define MAGICKCORE_HAVE_STRERROR 1 +#endif + +/* Define if you have `strerror_r'. */ +#ifndef MAGICKCORE_HAVE_STRERROR_R +#define MAGICKCORE_HAVE_STRERROR_R 1 +#endif + +/* Define to 1 if cpp supports the ANSI # stringizing operator. */ +#ifndef MAGICKCORE_HAVE_STRINGIZE +#define MAGICKCORE_HAVE_STRINGIZE 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_STRINGS_H +#define MAGICKCORE_HAVE_STRINGS_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_STRING_H +#define MAGICKCORE_HAVE_STRING_H 1 +#endif + +/* Define to 1 if you have the `strlcat' function. */ +#ifndef MAGICKCORE_HAVE_STRLCAT +#define MAGICKCORE_HAVE_STRLCAT 1 +#endif + +/* Define to 1 if you have the `strlcpy' function. */ +#ifndef MAGICKCORE_HAVE_STRLCPY +#define MAGICKCORE_HAVE_STRLCPY 1 +#endif + +/* Define to 1 if you have the `strncasecmp' function. */ +#ifndef MAGICKCORE_HAVE_STRNCASECMP +#define MAGICKCORE_HAVE_STRNCASECMP 1 +#endif + +/* Define to 1 if you have the `strpbrk' function. */ +#ifndef MAGICKCORE_HAVE_STRPBRK +#define MAGICKCORE_HAVE_STRPBRK 1 +#endif + +/* Define to 1 if you have the `strrchr' function. */ +#ifndef MAGICKCORE_HAVE_STRRCHR +#define MAGICKCORE_HAVE_STRRCHR 1 +#endif + +/* Define to 1 if you have the `strspn' function. */ +#ifndef MAGICKCORE_HAVE_STRSPN +#define MAGICKCORE_HAVE_STRSPN 1 +#endif + +/* Define to 1 if you have the `strstr' function. */ +#ifndef MAGICKCORE_HAVE_STRSTR +#define MAGICKCORE_HAVE_STRSTR 1 +#endif + +/* Define to 1 if you have the `strtod' function. */ +/* #undef HAVE_STRTOD */ + +/* Define to 1 if you have the `strtod_l' function. */ +#ifndef MAGICKCORE_HAVE_STRTOD_L +#define MAGICKCORE_HAVE_STRTOD_L 1 +#endif + +/* Define to 1 if you have the `strtol' function. */ +#ifndef MAGICKCORE_HAVE_STRTOL +#define MAGICKCORE_HAVE_STRTOL 1 +#endif + +/* Define to 1 if you have the `strtoul' function. */ +#ifndef MAGICKCORE_HAVE_STRTOUL +#define MAGICKCORE_HAVE_STRTOUL 1 +#endif + +/* Define to 1 if `tm_zone' is a member of `struct tm'. */ +#ifndef MAGICKCORE_HAVE_STRUCT_TM_TM_ZONE +#define MAGICKCORE_HAVE_STRUCT_TM_TM_ZONE 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SUN_PREFETCH_H */ + +/* Define to 1 if you have the `symlink' function. */ +#ifndef MAGICKCORE_HAVE_SYMLINK +#define MAGICKCORE_HAVE_SYMLINK 1 +#endif + +/* Define to 1 if you have the `sysconf' function. */ +#ifndef MAGICKCORE_HAVE_SYSCONF +#define MAGICKCORE_HAVE_SYSCONF 1 +#endif + +/* Define to 1 if you have the `system' function. */ +#ifndef MAGICKCORE_HAVE_SYSTEM +#define MAGICKCORE_HAVE_SYSTEM 1 +#endif + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_IPC_H +#define MAGICKCORE_HAVE_SYS_IPC_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_MMAN_H +#define MAGICKCORE_HAVE_SYS_MMAN_H 1 +#endif + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_PARAM_H +#define MAGICKCORE_HAVE_SYS_PARAM_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_RESOURCE_H +#define MAGICKCORE_HAVE_SYS_RESOURCE_H 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SENDFILE_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_SOCKET_H +#define MAGICKCORE_HAVE_SYS_SOCKET_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_STAT_H +#define MAGICKCORE_HAVE_SYS_STAT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSLIMITS_H */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_TIMES_H +#define MAGICKCORE_HAVE_SYS_TIMES_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_TIME_H +#define MAGICKCORE_HAVE_SYS_TIME_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_TYPES_H +#define MAGICKCORE_HAVE_SYS_TYPES_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_UIO_H +#define MAGICKCORE_HAVE_SYS_UIO_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_SYS_WAIT_H +#define MAGICKCORE_HAVE_SYS_WAIT_H 1 +#endif + +/* Define if you have the tcmalloc memory allocation library */ +/* #undef HAVE_TCMALLOC */ + +/* Define to 1 if you have the `telldir' function. */ +#ifndef MAGICKCORE_HAVE_TELLDIR +#define MAGICKCORE_HAVE_TELLDIR 1 +#endif + +/* Define to 1 if you have the `tempnam' function. */ +#ifndef MAGICKCORE_HAVE_TEMPNAM +#define MAGICKCORE_HAVE_TEMPNAM 1 +#endif + +/* Define to 1 if you have the `times' function. */ +#ifndef MAGICKCORE_HAVE_TIMES +#define MAGICKCORE_HAVE_TIMES 1 +#endif + +/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ +#ifndef MAGICKCORE_HAVE_TM_ZONE +#define MAGICKCORE_HAVE_TM_ZONE 1 +#endif + +/* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ +/* #undef HAVE_TZNAME */ + +/* Define to 1 if the system has the type `uintmax_t'. */ +#ifndef MAGICKCORE_HAVE_UINTMAX_T +#define MAGICKCORE_HAVE_UINTMAX_T 1 +#endif + +/* Define to 1 if the system has the type `uintptr_t'. */ +#ifndef MAGICKCORE_HAVE_UINTPTR_T +#define MAGICKCORE_HAVE_UINTPTR_T 1 +#endif + +/* Define to 1 if you have the `ulltostr' function. */ +/* #undef HAVE_ULLTOSTR */ + +/* Define if you have umem memory allocation library */ +/* #undef HAVE_UMEM */ + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_UNISTD_H +#define MAGICKCORE_HAVE_UNISTD_H 1 +#endif + +/* Define to 1 if the system has the type `unsigned long long int'. */ +#ifndef MAGICKCORE_HAVE_UNSIGNED_LONG_LONG_INT +#define MAGICKCORE_HAVE_UNSIGNED_LONG_LONG_INT 1 +#endif + +/* Define to 1 if you have the `uselocale' function. */ +#ifndef MAGICKCORE_HAVE_USELOCALE +#define MAGICKCORE_HAVE_USELOCALE 1 +#endif + +/* Define to 1 if you have the `usleep' function. */ +#ifndef MAGICKCORE_HAVE_USLEEP +#define MAGICKCORE_HAVE_USLEEP 1 +#endif + +/* Define to 1 if you have the `utime' function. */ +#ifndef MAGICKCORE_HAVE_UTIME +#define MAGICKCORE_HAVE_UTIME 1 +#endif + +/* Define to 1 if you have the `utimensat' function. */ +#ifndef MAGICKCORE_HAVE_UTIMENSAT +#define MAGICKCORE_HAVE_UTIMENSAT 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_UTIME_H +#define MAGICKCORE_HAVE_UTIME_H 1 +#endif + +/* Define to 1 if you have the `vfprintf' function. */ +#ifndef MAGICKCORE_HAVE_VFPRINTF +#define MAGICKCORE_HAVE_VFPRINTF 1 +#endif + +/* Define to 1 if you have the `vfprintf_l' function. */ +/* #undef HAVE_VFPRINTF_L */ + +/* Define to 1 if you have the `vsnprintf' function. */ +#ifndef MAGICKCORE_HAVE_VSNPRINTF +#define MAGICKCORE_HAVE_VSNPRINTF 1 +#endif + +/* Define to 1 if you have the `vsnprintf_l' function. */ +/* #undef HAVE_VSNPRINTF_L */ + +/* Define to 1 if you have the `vsprintf' function. */ +#ifndef MAGICKCORE_HAVE_VSPRINTF +#define MAGICKCORE_HAVE_VSPRINTF 1 +#endif + +/* Define to 1 if you have the `waitpid' function. */ +#ifndef MAGICKCORE_HAVE_WAITPID +#define MAGICKCORE_HAVE_WAITPID 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_WCHAR_H +#define MAGICKCORE_HAVE_WCHAR_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#ifndef MAGICKCORE_HAVE_XLOCALE_H +#define MAGICKCORE_HAVE_XLOCALE_H 1 +#endif + +/* Define to 1 if you have the `_aligned_malloc' function. */ +/* #undef HAVE__ALIGNED_MALLOC */ + +/* Define to 1 if the system has the type `_Bool'. */ +#ifndef MAGICKCORE_HAVE__BOOL +#define MAGICKCORE_HAVE__BOOL 1 +#endif + +/* Define to 1 if you have the `_exit' function. */ +#ifndef MAGICKCORE_HAVE__EXIT +#define MAGICKCORE_HAVE__EXIT 1 +#endif + +/* Define to 1 if you have the `_NSGetExecutablePath' function. */ +/* #undef HAVE__NSGETEXECUTABLEPATH */ + +/* Define to 1 if you have the `_pclose' function. */ +/* #undef HAVE__PCLOSE */ + +/* Define to 1 if you have the `_popen' function. */ +/* #undef HAVE__POPEN */ + +/* Define to 1 if you have the `_wfopen' function. */ +/* #undef HAVE__WFOPEN */ + +/* Define to 1 if you have the `_wstat' function. */ +/* #undef HAVE__WSTAT */ + +/* define if your compiler has __attribute__ */ +#ifndef MAGICKCORE_HAVE___ATTRIBUTE__ +#define MAGICKCORE_HAVE___ATTRIBUTE__ 1 +#endif + +/* Define if you have libheif library */ +/* #undef HEIC_DELEGATE */ + +/* Directory where ImageMagick architecture headers live. */ +#ifndef MAGICKCORE_INCLUDEARCH_PATH +#define MAGICKCORE_INCLUDEARCH_PATH "/root/lib/include/ImageMagick-7/" +#endif + +/* Directory where ImageMagick headers live. */ +#ifndef MAGICKCORE_INCLUDE_PATH +#define MAGICKCORE_INCLUDE_PATH "/root/lib/include/ImageMagick-7/" +#endif + +/* ImageMagick is formally installed under prefix */ +#ifndef MAGICKCORE_INSTALLED_SUPPORT +#define MAGICKCORE_INSTALLED_SUPPORT 1 +#endif + +/* Define if you have JBIG library */ +/* #undef JBIG_DELEGATE */ + +/* Define if you have JPEG library */ +#ifndef MAGICKCORE_JPEG_DELEGATE +#define MAGICKCORE_JPEG_DELEGATE 1 +#endif + +/* Define if you have jpeg-xl library */ +/* #undef JXL_DELEGATE */ + +/* Define if you have LCMS library */ +/* #undef LCMS_DELEGATE */ + +/* Define if you have OPENJP2 library */ +/* #undef LIBOPENJP2_DELEGATE */ + +/* Directory where architecture-dependent files live. */ +#ifndef MAGICKCORE_LIBRARY_PATH +#define MAGICKCORE_LIBRARY_PATH "/root/lib/lib/ImageMagick-7.1.1/" +#endif + +/* Subdirectory of lib where ImageMagick architecture dependent files are + installed. */ +#ifndef MAGICKCORE_LIBRARY_RELATIVE_PATH +#define MAGICKCORE_LIBRARY_RELATIVE_PATH "ImageMagick-7.1.1" +#endif + +/* Binaries in libraries path base name (will be during install linked to bin) + */ +#ifndef MAGICKCORE_LIB_BIN_BASEDIRNAME +#define MAGICKCORE_LIB_BIN_BASEDIRNAME "bin" +#endif + +/* Define if you have LQR library */ +/* #undef LQR_DELEGATE */ + +/* Define if using libltdl to support dynamically loadable modules and OpenCL + */ +/* #undef LTDL_DELEGATE */ + +/* Native module suffix */ +/* #undef LTDL_MODULE_EXT */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#ifndef MAGICKCORE_LT_OBJDIR +#define MAGICKCORE_LT_OBJDIR ".libs/" +#endif + +/* Define if you have LZMA library */ +/* #undef LZMA_DELEGATE */ + +/* Define to prepend to default font search path. */ +/* #undef MAGICK_FONT_PATH */ + +/* Target Host CPU */ +#ifndef MAGICKCORE_MAGICK_TARGET_CPU +#define MAGICKCORE_MAGICK_TARGET_CPU wasm32 +#endif + +/* Target Host OS */ +#ifndef MAGICKCORE_MAGICK_TARGET_OS +#define MAGICKCORE_MAGICK_TARGET_OS emscripten +#endif + +/* Target Host Vendor */ +#ifndef MAGICKCORE_MAGICK_TARGET_VENDOR +#define MAGICKCORE_MAGICK_TARGET_VENDOR unknown +#endif + +/* Module directory name without ABI part. */ +#ifndef MAGICKCORE_MODULES_BASEDIRNAME +#define MAGICKCORE_MODULES_BASEDIRNAME "modules" +#endif + +/* Module directory dirname */ +/* #undef MODULES_DIRNAME */ + +/* Magick API method prefix */ +/* #undef NAMESPACE_PREFIX */ + +/* Magick API method prefix tag */ +/* #undef NAMESPACE_PREFIX_TAG */ + +/* Define to 1 if assertions should be disabled. */ +/* #undef NDEBUG */ + +/* Define if you have OPENEXR library */ +/* #undef OPENEXR_DELEGATE */ + +/* Define to the address where bug reports for this package should be sent. */ +#ifndef MAGICKCORE_PACKAGE_BUGREPORT +#define MAGICKCORE_PACKAGE_BUGREPORT "https://github.com/ImageMagick/ImageMagick/issues" +#endif + +/* Define to the full name of this package. */ +#ifndef MAGICKCORE_PACKAGE_NAME +#define MAGICKCORE_PACKAGE_NAME "ImageMagick" +#endif + +/* Define to the full name and version of this package. */ +#ifndef MAGICKCORE_PACKAGE_STRING +#define MAGICKCORE_PACKAGE_STRING "ImageMagick 7.1.1-34" +#endif + +/* Define to the one symbol short name of this package. */ +#ifndef MAGICKCORE_PACKAGE_TARNAME +#define MAGICKCORE_PACKAGE_TARNAME "ImageMagick" +#endif + +/* Define to the home page for this package. */ +#ifndef MAGICKCORE_PACKAGE_URL +#define MAGICKCORE_PACKAGE_URL "https://imagemagick.org" +#endif + +/* Define to the version of this package. */ +#ifndef MAGICKCORE_PACKAGE_VERSION +#define MAGICKCORE_PACKAGE_VERSION "7.1.1-34" +#endif + +/* Define if you have PANGOCAIRO library */ +/* #undef PANGOCAIRO_DELEGATE */ + +/* enable pipes (|) in filenames */ +/* #undef PIPES_SUPPORT */ + +/* Define if you have PNG library */ +/* #undef PNG_DELEGATE */ + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* Pixel cache memory threshold (defaults to available memory) */ +/* #undef PixelCacheThreshold */ + +/* Number of bits in a pixel Quantum (8/16/32/64) */ +#ifndef MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H +#define MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H 16 +#endif + +/* Define if you have RAQM library */ +/* #undef RAQM_DELEGATE */ + +/* Define if you have LIBRAW library */ +/* #undef RAW_R_DELEGATE */ + +/* Define if you have RSVG library */ +/* #undef RSVG_DELEGATE */ + +/* Setjmp/longjmp are thread safe */ +#ifndef MAGICKCORE_SETJMP_IS_THREAD_SAFE +#define MAGICKCORE_SETJMP_IS_THREAD_SAFE 1 +#endif + +/* Sharearch directory name without ABI part. */ +#ifndef MAGICKCORE_SHAREARCH_BASEDIRNAME +#define MAGICKCORE_SHAREARCH_BASEDIRNAME "config" +#endif + +/* Sharearch directory dirname */ +/* #undef SHAREARCH_DIRNAME */ + +/* Directory where architecture-independent configuration files live. */ +#ifndef MAGICKCORE_SHARE_PATH +#define MAGICKCORE_SHARE_PATH "/root/lib/share/ImageMagick-7/" +#endif + +/* Subdirectory of lib where architecture-independent configuration files + live. */ +#ifndef MAGICKCORE_SHARE_RELATIVE_PATH +#define MAGICKCORE_SHARE_RELATIVE_PATH "ImageMagick-7" +#endif + +/* The size of `double', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_DOUBLE +#define MAGICKCORE_SIZEOF_DOUBLE 8 +#endif + +/* The size of `double_t', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_DOUBLE_T +#define MAGICKCORE_SIZEOF_DOUBLE_T 8 +#endif + +/* The size of `float', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_FLOAT +#define MAGICKCORE_SIZEOF_FLOAT 4 +#endif + +/* The size of `float_t', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_FLOAT_T +#define MAGICKCORE_SIZEOF_FLOAT_T 4 +#endif + +/* The size of `long double', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_LONG_DOUBLE +#define MAGICKCORE_SIZEOF_LONG_DOUBLE 16 +#endif + +/* The size of `size_t', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_SIZE_T +#define MAGICKCORE_SIZEOF_SIZE_T 4 +#endif + +/* The size of `unsigned long long', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_UNSIGNED_LONG_LONG +#define MAGICKCORE_SIZEOF_UNSIGNED_LONG_LONG 8 +#endif + +/* The size of `void *', as computed by sizeof. */ +#ifndef MAGICKCORE_SIZEOF_VOID_P +#define MAGICKCORE_SIZEOF_VOID_P 4 +#endif + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#ifndef MAGICKCORE_STDC_HEADERS +#define MAGICKCORE_STDC_HEADERS 1 +#endif + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Define if you have POSIX threads libraries and header files. */ +/* #undef THREAD_SUPPORT */ + +/* Define if you have TIFF library */ +/* #undef TIFF_DELEGATE */ + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Define if you have google ultrahdr library */ +/* #undef UHDR_DELEGATE */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Define if you have WEBPMUX library */ +/* #undef WEBPMUX_DELEGATE */ + +/* Define if you have WEBP library */ +/* #undef WEBP_DELEGATE */ + +/* Define to use the Windows GDI32 library */ +/* #undef WINGDI32_DELEGATE */ + +/* Define if using the dmalloc debugging malloc package */ +/* #undef WITH_DMALLOC */ + +/* Define if you have WMF library */ +/* #undef WMF_DELEGATE */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Location of X11 configure files */ +#ifndef MAGICKCORE_X11_CONFIGURE_PATH +#define MAGICKCORE_X11_CONFIGURE_PATH "" +#endif + +/* Define if you have X11 library */ +/* #undef X11_DELEGATE */ + +/* Define if you have XML library */ +/* #undef XML_DELEGATE */ + +/* Define to 1 if the X Window System is missing or not being used. */ +#ifndef MAGICKCORE_X_DISPLAY_MISSING +#define MAGICKCORE_X_DISPLAY_MISSING 1 +#endif + +/* Build self-contained, embeddable, zero-configuration ImageMagick */ +/* #undef ZERO_CONFIGURATION_SUPPORT */ + +/* Define if you have ZIP library */ +/* #undef ZIP_DELEGATE */ + +/* Define if you have ZLIB library */ +/* #undef ZLIB_DELEGATE */ + +/* Define if you have ZSTD library */ +/* #undef ZSTD_DELEGATE */ + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* enable run-time bounds-checking */ +/* #undef _FORTIFY_SOURCE */ + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* #undef _LARGEFILE_SOURCE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* Define for Solaris 2.5.1 so the uint64_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT64_T */ + +/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT8_T */ + +/* Define to 1 if type `char' is unsigned and your compiler does not + predefine this macro. */ +#ifndef __CHAR_UNSIGNED__ +/* # undef __CHAR_UNSIGNED__ */ +#endif + +/* Define to appropriate substitute if compiler does not have __func__ */ +/* #undef __func__ */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to the type of a signed integer type of width exactly 16 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int16_t */ + +/* Define to the type of a signed integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int32_t */ + +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + +/* Define to the type of a signed integer type of width exactly 8 bits if such + a type exists and the standard includes do not define it. */ +/* #undef int8_t */ + +/* Define to the widest signed integer type if and do + not define. */ +/* #undef intmax_t */ + +/* Define to the type of a signed integer type wide enough to hold a pointer, + if such a type exists, and if the system does not define it. */ +/* #undef intptr_t */ + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define as a signed integer type capable of holding a process identifier. */ +/* #undef pid_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported only directly. */ +#ifndef _magickcore_restrict +#define _magickcore_restrict __restrict__ +#endif +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define to the type of an unsigned integer type of width exactly 16 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint16_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + +/* Define to the type of an unsigned integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint64_t */ + +/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint8_t */ + +/* Define to the widest unsigned integer type if and + do not define. */ +/* #undef uintmax_t */ + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +/* #undef uintptr_t */ + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ + +/* once: _MAGICKCORE_MAGICK_BASECONFIG_H */ +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-config.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-config.h new file mode 100644 index 0000000000..4b5dc069c9 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-config.h @@ -0,0 +1,260 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickConfig not autogenerated (fixed stuff) +*/ +#ifndef MAGICKCORE_MAGICK_CONFIG_H +#define MAGICKCORE_MAGICK_CONFIG_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#include "MagickCore/magick-baseconfig.h" + +#define MAGICKCORE_STRING_QUOTE(str) #str +#define MAGICKCORE_STRING_XQUOTE(str) MAGICKCORE_STRING_QUOTE(str) + +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# if defined(__GNUC__) || defined(__clang__) +# define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(GCC warning w)) +# elif defined(_MSC_VER) +# define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(message(w))) +# endif +#endif + +#ifndef MAGICK_COMPILER_WARNING +# define MAGICK_COMPILER_WARNING(w) +#endif + +#ifdef MAGICKCORE__FILE_OFFSET_BITS +# ifdef _FILE_OFFSET_BITS +# if _FILE_OFFSET_BITS != MAGICKCORE__FILE_OFFSET_BITS + MAGICK_COMPILER_WARNING("_FILE_OFFSET_BITS is already defined, but does not match MAGICKCORE__FILE_OFFSET_BITS") +# else +# undef _FILE_OFFSET_BITS +# endif +# endif +# ifndef _FILE_OFFSET_BITS +# if MAGICKCORE__FILE_OFFSET_BITS == 64 +# define _FILE_OFFSET_BITS 64 +# elif MAGICKCORE__FILE_OFFSET_BITS == 32 +# define _FILE_OFFSET_BITS 32 +# else +# define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS +# endif +# endif +#endif + +/* Compatibility block */ +#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H) +# warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" +# warning "this is an obsolete behavior please fix your makefile" +# define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H +#endif + +/* Number of bits in a pixel Quantum (8/16/32/64) */ +#ifndef MAGICKCORE_QUANTUM_DEPTH +# error "you should set MAGICKCORE_QUANTUM_DEPTH" +#endif + +/* check values */ +#if MAGICKCORE_QUANTUM_DEPTH != 8 +# if MAGICKCORE_QUANTUM_DEPTH != 16 +# if MAGICKCORE_QUANTUM_DEPTH != 32 +# if MAGICKCORE_QUANTUM_DEPTH != 64 +# error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits" +# endif +# endif +# endif +#endif + +/* whether HDRI is enable */ +#if !defined(MAGICKCORE_HDRI_ENABLE) +# error "you should set MAGICKCORE_HDRI_ENABLE" +#endif + +#if MAGICKCORE_HDRI_ENABLE +# define MAGICKCORE_HDRI_SUPPORT 1 +#endif +#if MAGICKCORE_CHANNEL_MASK_DEPTH == 64 +# define MAGICKCORE_64BIT_CHANNEL_MASK_SUPPORT 1 +#endif + +/* Compatibility block */ +#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H) +# warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" +# warning "this is an obsolete behavior please fix yours makefile" +# define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H +#endif + +/* Number of bits in a pixel Quantum (8/16/32/64) */ +#ifndef MAGICKCORE_QUANTUM_DEPTH +# error "you should set MAGICKCORE_QUANTUM_DEPTH" +#endif + +/* check values */ +#if MAGICKCORE_QUANTUM_DEPTH != 8 +# if MAGICKCORE_QUANTUM_DEPTH != 16 +# if MAGICKCORE_QUANTUM_DEPTH != 32 +# if MAGICKCORE_QUANTUM_DEPTH != 64 +# error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits" +# endif +# endif +# endif +#endif + +/* whether HDRI is enable */ +#if !defined(MAGICKCORE_HDRI_ENABLE) +# error "you should set MAGICKCORE_HDRI_ENABLE" +#endif + +#if MAGICKCORE_HDRI_ENABLE +# define MAGICKCORE_HDRI_SUPPORT 1 +#endif + +#if defined __CYGWIN32__ && !defined __CYGWIN__ + /* For backwards compatibility with Cygwin b19 and + earlier, we define __CYGWIN__ here, so that + we can rely on checking just for that macro. */ +# define __CYGWIN__ __CYGWIN32__ +#endif + +/* ABI SUFFIX */ +#ifndef MAGICKCORE_HDRI_SUPPORT +#define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) +#else +#define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI" +#endif + +/* some path game */ +#if !defined __CYGWIN__ +# if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__) + /* Use Windows separators on all _WIN32 defining + environments, except Cygwin. */ +# define MAGICKCORE_DIR_SEPARATOR_CHAR '\\' +# define MAGICKCORE_DIR_SEPARATOR "\\" +# define MAGICKCORE_PATH_SEPARATOR_CHAR ';' +# define MAGICKCORE_PATH_SEPARATOR ";" +# endif +#endif + +/* posix */ +#ifndef MAGICKCORE_DIR_SEPARATOR_CHAR + /* Assume that not having this is an indicator that all + are missing. */ +# define MAGICKCORE_DIR_SEPARATOR_CHAR '/' +# define MAGICKCORE_DIR_SEPARATOR "/" +# define MAGICKCORE_PATH_SEPARATOR_CHAR ':' +# define MAGICKCORE_PATH_SEPARATOR ":" +#endif /* !DIR_SEPARATOR_CHAR */ + +# if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__) + +/* module dir */ +#ifndef MAGICKCORE_MODULES_DIRNAME +# define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX +#endif + +#ifndef MAGICKCORE_MODULES_PATH +# define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME +#endif + +#ifndef MAGICKCORE_MODULES_RELATIVE_PATH +#define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME +#endif + +/* Subdirectory under lib to place ImageMagick coder module files */ +#ifndef MAGICKCORE_CODER_PATH +# if defined(vms) +# define MAGICKCORE_CODER_PATH "sys$login:" +# else +# define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME +# endif +#endif + +#ifndef MAGICKCORE_CODER_RELATIVE_PATH +# define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME +#endif + +/* subdirectory under lib to place ImageMagick filter module files */ +#ifndef MAGICKCORE_FILTER_PATH +# if defined(vms) +# define MAGICKCORE_FILTER_PATH "sys$login:" +# else +# define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME +# endif +#endif + +#ifndef MAGICKCORE_FILTER_RELATIVE_PATH +# define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME +#endif + +/* sharearch dir */ +#ifndef MAGICKCORE_SHAREARCH_DIRNAME +# define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX +#endif + +#ifndef MAGICKCORE_SHAREARCH_PATH +# define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR +#endif + +#ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH +#define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME +#endif + +#endif + +/* for Clang compatibility */ +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +#if defined(__GNUC__) && !defined(__clang__) +# define MAGICKCORE_DIAGNOSTIC_PUSH() \ + _Pragma("GCC diagnostic push") +# define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define MAGICKCORE_DIAGNOSTIC_POP() \ + _Pragma("GCC diagnostic pop") +#else +# define MAGICKCORE_DIAGNOSTIC_PUSH() +# define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() +# define MAGICKCORE_DIAGNOSTIC_POP() +#endif + +#define MAGICKCORE_BITS_BELOW(power_of_2) \ + ((power_of_2)-1) + +#define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \ + MAGICKCORE_BITS_BELOW(power_of_2) + +#define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \ + ((n) & MAGICKCORE_BITS_BELOW(power_of_2)) + +#define MAGICKCORE_IS_NOT_POWER_OF_2(n) \ + MAGICKCORE_IS_NOT_ALIGNED((n), (n)) + +#define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \ + ((n) & ~MAGICKCORE_BITS_BELOW(power_of_2)) + +#define MAGICKCORE_ALIGN_UP(n, power_of_2) \ + MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2) + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-type.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-type.h new file mode 100644 index 0000000000..9a99394662 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick-type.h @@ -0,0 +1,202 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore types. +*/ +#ifndef MAGICKCORE_MAGICK_TYPE_H +#define MAGICKCORE_MAGICK_TYPE_H + +#include "MagickCore/magick-config.h" + +#if defined(MAGICKCORE_HAVE_UINTPTR_T) +# include +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if !defined(MAGICKCORE_QUANTUM_DEPTH) +#define MAGICKCORE_QUANTUM_DEPTH 16 +#endif + +#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__) +# define MagickLLConstant(c) ((MagickOffsetType) (c ## i64)) +# define MagickULLConstant(c) ((MagickSizeType) (c ## ui64)) +#else +# define MagickLLConstant(c) ((MagickOffsetType) (c ## LL)) +# define MagickULLConstant(c) ((MagickSizeType) (c ## ULL)) +#endif + +#if MAGICKCORE_SIZEOF_FLOAT_T == 0 +typedef float MagickFloatType; +#elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_FLOAT) +typedef float MagickFloatType; +#elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_DOUBLE) +typedef double MagickFloatType; +#elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_LONG_DOUBLE) +typedef double MagickFloatType; +#else +#error Your MagickFloatType type is neither a float, nor a double, nor a long double +#endif +#if MAGICKCORE_SIZEOF_DOUBLE_T == 0 +typedef double MagickDoubleType; +#elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_DOUBLE) +typedef double MagickDoubleType; +#elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_LONG_DOUBLE) +typedef double MagickDoubleType; +#else +#error Your MagickDoubleType type is neither a float, nor a double, nor a long double +#endif + +#if (MAGICKCORE_QUANTUM_DEPTH == 8) +#define MaxColormapSize 256UL +#define MaxMap 255UL + +#if defined(MAGICKCORE_HDRI_SUPPORT) +typedef MagickFloatType Quantum; +#define QuantumRange ((Quantum) 255.0) +#define QuantumFormat "%g" +#else +typedef unsigned char Quantum; +#define QuantumRange ((Quantum) 255) +#define QuantumFormat "%u" +#endif +#elif (MAGICKCORE_QUANTUM_DEPTH == 16) +#define MaxColormapSize 65536UL +#define MaxMap 65535UL + +#if defined(MAGICKCORE_HDRI_SUPPORT) +typedef MagickFloatType Quantum; +#define QuantumRange ((Quantum) 65535.0) +#define QuantumFormat "%g" +#else +typedef unsigned short Quantum; +#define QuantumRange ((Quantum) 65535) +#define QuantumFormat "%u" +#endif +#elif (MAGICKCORE_QUANTUM_DEPTH == 32) +#define MaxColormapSize 65536UL +#define MaxMap 65535UL + +#if defined(MAGICKCORE_HDRI_SUPPORT) +typedef MagickDoubleType Quantum; +#define QuantumRange ((Quantum) 4294967295.0) +#define QuantumFormat "%g" +#else +typedef unsigned int Quantum; +#define QuantumRange ((Quantum) 4294967295) +#define QuantumFormat "%u" +#endif +#elif (MAGICKCORE_QUANTUM_DEPTH == 64) +#define MAGICKCORE_HDRI_SUPPORT 1 +#define MaxColormapSize 65536UL +#define MaxMap 65535UL + +typedef MagickDoubleType Quantum; +#define QuantumRange ((Quantum) 18446744073709551615.0) +#define QuantumFormat "%g" +#else +#error "MAGICKCORE_QUANTUM_DEPTH must be one of 8, 16, 32, or 64" +#endif +#define MagickEpsilon 1.0e-12 +#define MagickMaximumValue 1.79769313486231570E+308 +#define MagickMinimumValue 2.22507385850720140E-308 +#define MagickStringify(macro_or_string) MagickStringifyArg(macro_or_string) +#define MagickStringifyArg(contents) #contents +#define QuantumScale ((double) 1.0/(double) QuantumRange) + +/* + Typedef declarations. +*/ +typedef MagickDoubleType MagickRealType; +typedef unsigned int MagickStatusType; +#if !defined(MAGICKCORE_WINDOWS_SUPPORT) +#if (MAGICKCORE_SIZEOF_UNSIGNED_LONG_LONG == 8) +typedef long long MagickOffsetType; +typedef unsigned long long MagickSizeType; +#define MagickOffsetFormat "lld" +#define MagickSizeFormat "llu" +#else +typedef ssize_t MagickOffsetType; +typedef size_t MagickSizeType; +#define MagickOffsetFormat "ld" +#define MagickSizeFormat "lu" +#endif +#else +typedef __int64 MagickOffsetType; +typedef unsigned __int64 MagickSizeType; +#define MagickOffsetFormat "I64i" +#define MagickSizeFormat "I64u" +#endif + +#if defined(MAGICKCORE_HAVE_UINTPTR_T) || defined(uintptr_t) +typedef uintptr_t MagickAddressType; +#else +/* Hope for the best, I guess. */ +typedef size_t MagickAddressType; +#endif + +typedef MagickSizeType QuantumAny; + +typedef enum +{ + UndefinedClass, + DirectClass, + PseudoClass +} ClassType; + +typedef enum +{ + MagickFalse = 0, + MagickTrue = 1 +} MagickBooleanType; + +/* + The IsNaN test is for special floating point numbers of value Nan (not a + number). NaN's are defined as part of the IEEE standard for floating point + number representation, and need to be watched out for. Morphology Kernels + often use these special numbers as neighbourhood masks. + + The special property that two NaN's are never equal, even if they are from + the same variable allows you to test if a value is special NaN value. + + The macros are thus is only true if the value given is NaN. +*/ +#if defined(MAGICKCORE_HAVE_ISNAN) && !defined(__cplusplus) && !defined(c_plusplus) +# define IsNaN(a) isnan(a) +#elif defined(_MSC_VER) +# include +# define IsNaN(a) _isnan(a) +#else +# define IsNaN(a) ((a) != (a)) +#endif +#if !defined(INFINITY) +# define INFINITY ((double) -logf(0f)) +#endif + +typedef struct _BlobInfo BlobInfo; + +typedef struct _ExceptionInfo ExceptionInfo; + +typedef struct _Image Image; + +typedef struct _ImageInfo ImageInfo; + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick.h new file mode 100644 index 0000000000..97aadee967 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/magick.h @@ -0,0 +1,158 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore magick methods. +*/ +#ifndef MAGICKCORE_MAGICK_H +#define MAGICKCORE_MAGICK_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#include +#include "MagickCore/semaphore.h" + +#if defined(__cplusplus) || defined(c_plusplus) +# define magick_module _module /* reserved word in C++(20) */ +#else +# define magick_module module +#endif + +typedef enum +{ + UndefinedFormatType, + ImplicitFormatType, + ExplicitFormatType +} MagickFormatType; + +typedef enum +{ + CoderNoFlag = 0x0000, + CoderAdjoinFlag = 0x0001, + CoderBlobSupportFlag = 0x0002, + CoderDecoderThreadSupportFlag = 0x0004, + CoderEncoderThreadSupportFlag = 0x0008, + CoderEndianSupportFlag = 0x0010, + CoderRawSupportFlag = 0x0020, + CoderSeekableStreamFlag = 0x0040, /* deprecated */ + CoderStealthFlag = 0x0080, + CoderUseExtensionFlag = 0x0100, + CoderDecoderSeekableStreamFlag = 0x0200, + CoderEncoderSeekableStreamFlag = 0x0400 +} MagickInfoFlag; + +typedef Image + *DecodeImageHandler(const ImageInfo *,ExceptionInfo *); + +typedef MagickBooleanType + EncodeImageHandler(const ImageInfo *,Image *,ExceptionInfo *); + +typedef MagickBooleanType + IsImageFormatHandler(const unsigned char *,const size_t); + +typedef struct _MagickInfo +{ + char + *name, + *description, + *version, + *mime_type, + *note, + *magick_module; + + DecodeImageHandler + *decoder; + + EncodeImageHandler + *encoder; + + ImageInfo + *image_info; + + IsImageFormatHandler + *magick; + + MagickFormatType + format_type; + + MagickStatusType + flags; + + SemaphoreInfo + *semaphore; + + size_t + signature; + + void + *client_data; +} MagickInfo; + +extern MagickExport char + **GetMagickList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const char + *GetMagickDescription(const MagickInfo *), + *GetMagickMimeType(const MagickInfo *), + *GetMagickModuleName(const MagickInfo *), + *GetMagickName(const MagickInfo *); + +extern MagickExport DecodeImageHandler + *GetImageDecoder(const MagickInfo *) magick_attribute((__pure__)); + +extern MagickExport EncodeImageHandler + *GetImageEncoder(const MagickInfo *) magick_attribute((__pure__)); + +extern MagickExport int + GetMagickPrecision(void), + SetMagickPrecision(const int); + +extern MagickExport MagickBooleanType + GetImageMagick(const unsigned char *,const size_t,char *), + GetMagickAdjoin(const MagickInfo *) magick_attribute((__pure__)), + GetMagickBlobSupport(const MagickInfo *) magick_attribute((__pure__)), + GetMagickDecoderSeekableStream(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickDecoderThreadSupport(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickEncoderSeekableStream(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickEncoderThreadSupport(const MagickInfo *) + magick_attribute((__pure__)), + GetMagickEndianSupport(const MagickInfo *) magick_attribute((__pure__)), + GetMagickRawSupport(const MagickInfo *) magick_attribute((__pure__)), + GetMagickStealth(const MagickInfo *) magick_attribute((__pure__)), + GetMagickUseExtension(const MagickInfo *) magick_attribute((__pure__)), + IsMagickCoreInstantiated(void) magick_attribute((__pure__)), + RegisterMagickInfo(MagickInfo *), + UnregisterMagickInfo(const char *); + +extern const MagickExport MagickInfo + *GetMagickInfo(const char *,ExceptionInfo *), + **GetMagickInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport MagickInfo + *AcquireMagickInfo(const char *, const char *, const char *); + +extern MagickExport void + MagickCoreGenesis(const char *,const MagickBooleanType), + MagickCoreTerminus(void); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/matrix.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/matrix.h new file mode 100644 index 0000000000..d59a32930c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/matrix.h @@ -0,0 +1,52 @@ +/* + Copyright @ 2007 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore matrix methods. +*/ +#ifndef MAGICKCORE_MATRIX_H +#define MAGICKCORE_MATRIX_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _MatrixInfo + MatrixInfo; + +extern MagickExport double + **AcquireMagickMatrix(const size_t,const size_t), + **RelinquishMagickMatrix(double **,const size_t); + +extern MagickExport Image + *MatrixToImage(const MatrixInfo *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + GetMatrixElement(const MatrixInfo *,const ssize_t,const ssize_t,void *), + NullMatrix(MatrixInfo *), + SetMatrixElement(const MatrixInfo *,const ssize_t,const ssize_t,const void *); + +MagickExport MatrixInfo + *AcquireMatrixInfo(const size_t,const size_t,const size_t,ExceptionInfo *), + *DestroyMatrixInfo(MatrixInfo *); + +MagickExport size_t + GetMatrixColumns(const MatrixInfo *), + GetMatrixRows(const MatrixInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/memory_.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/memory_.h new file mode 100644 index 0000000000..89c6ba856f --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/memory_.h @@ -0,0 +1,107 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore memory methods. +*/ +#ifndef MAGICKCORE_MEMORY_H +#define MAGICKCORE_MEMORY_H + +#include + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _MemoryInfo + MemoryInfo; + +typedef void + *(*AcquireMemoryHandler)(size_t) magick_alloc_size(1), + (*DestroyMemoryHandler)(void *), + *(*ResizeMemoryHandler)(void *,size_t) magick_alloc_size(2), + *(*AcquireAlignedMemoryHandler)(const size_t,const size_t), + (*RelinquishAlignedMemoryHandler)(void *); + +extern MagickExport MemoryInfo + *AcquireVirtualMemory(const size_t,const size_t) magick_alloc_sizes(1,2), + *RelinquishVirtualMemory(MemoryInfo *); + +extern MagickExport size_t + GetMaxMemoryRequest(void), + GetMaxProfileSize(void); + +extern MagickExport void + *AcquireAlignedMemory(const size_t,const size_t) + magick_attribute((__malloc__)) magick_alloc_sizes(1,2), + *AcquireMagickMemory(const size_t) magick_attribute((__malloc__)) + magick_alloc_size(1), + *AcquireCriticalMemory(const size_t), + *AcquireQuantumMemory(const size_t,const size_t) + magick_attribute((__malloc__)) magick_alloc_sizes(1,2), + *CopyMagickMemory(void *magick_restrict,const void *magick_restrict, + const size_t) magick_attribute((__nonnull__)), + DestroyMagickMemory(void), + GetMagickMemoryMethods(AcquireMemoryHandler *,ResizeMemoryHandler *, + DestroyMemoryHandler *), + *GetVirtualMemoryBlob(const MemoryInfo *), + *RelinquishAlignedMemory(void *), + *RelinquishMagickMemory(void *), + *ResetMagickMemory(void *,int,const size_t), + *ResizeMagickMemory(void *,const size_t) + magick_attribute((__malloc__)) magick_alloc_size(2), + *ResizeQuantumMemory(void *,const size_t,const size_t) + magick_attribute((__malloc__)) magick_alloc_sizes(2,3), + SetMagickAlignedMemoryMethods(AcquireAlignedMemoryHandler, + RelinquishAlignedMemoryHandler), + SetMagickMemoryMethods(AcquireMemoryHandler,ResizeMemoryHandler, + DestroyMemoryHandler); + +static inline MagickBooleanType HeapOverflowSanityCheck( + const size_t count,const size_t quantum) +{ + if ((count == 0) || (quantum == 0)) + return(MagickTrue); + if (quantum != ((count*quantum)/count)) + { + errno=ENOMEM; + return(MagickTrue); + } + return(MagickFalse); +} + +static inline MagickBooleanType HeapOverflowSanityCheckGetSize( + const size_t count,const size_t quantum,size_t *const extent) +{ + size_t + length; + + if ((count == 0) || (quantum == 0)) + return(MagickTrue); + length=count*quantum; + if (quantum != (length/count)) + { + errno=ENOMEM; + return(MagickTrue); + } + if (extent != NULL) + *extent=length; + return(MagickFalse); +} + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/method-attribute.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/method-attribute.h new file mode 100644 index 0000000000..8dcec47d5a --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/method-attribute.h @@ -0,0 +1,125 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore method attributes. +*/ +#ifndef MAGICKCORE_METHOD_ATTRIBUTE_H +#define MAGICKCORE_METHOD_ATTRIBUTE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__CYGWIN__) +# define MagickPrivate +# if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB) +# define _MAGICKDLL_ +# endif +# if defined(_MAGICKDLL_) +# if defined(_VISUALC_) +# pragma warning( disable: 4273 ) /* Disable the dll linkage warnings */ +# endif +# if !defined(_MAGICKLIB_) +# if defined(__clang__) || defined(__GNUC__) +# define MagickExport __attribute__ ((dllimport)) +# else +# define MagickExport __declspec(dllimport) +# endif +# else +# if defined(__clang__) || defined(__GNUC__) +# define MagickExport __attribute__ ((dllexport)) +# else +# define MagickExport __declspec(dllexport) +# endif +# endif +# else +# define MagickExport +# endif +# if defined(_DLL) && !defined(_LIB) +# if defined(__clang__) || defined(__GNUC__) +# define ModuleExport __attribute__ ((dllexport)) +# else +# define ModuleExport __declspec(dllexport) +# endif +# else +# define ModuleExport +# endif +# if defined(_VISUALC_) +# pragma warning(disable : 4018) +# pragma warning(disable : 4068) +# pragma warning(disable : 4244) +# pragma warning(disable : 4142) +# pragma warning(disable : 4800) +# pragma warning(disable : 4786) +# pragma warning(disable : 4996) +# endif +#else +# if defined(__clang__) || (__GNUC__ >= 4) +# define MagickExport __attribute__ ((visibility ("default"))) +# define MagickPrivate __attribute__ ((visibility ("hidden"))) +# else +# define MagickExport +# define MagickPrivate +# endif +# define ModuleExport MagickExport +#endif + +#define MagickCoreSignature 0xabacadabUL +#if !defined(MagickPathExtent) +# define MagickPathExtent 4096 /* always >= max(PATH_MAX,4096) */ +#endif +#define MaxTextExtent MagickPathExtent +#define MagickTimeExtent 26 + +#if defined(MAGICKCORE_HAVE___ATTRIBUTE__) +# define magick_aligned(x,y) x __attribute__((aligned(y))) +# define magick_attribute __attribute__ +# define magick_unused(x) magick_unused_ ## x __attribute__((unused)) +# define magick_unreferenced(x) /* nothing */ +#elif defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__CYGWIN__) +# define magick_aligned(x,y) __declspec(align(y)) x +# define magick_attribute(x) /* nothing */ +# define magick_unused(x) x +# define magick_unreferenced(x) (x) +#else +# define magick_aligned(x,y) /* nothing */ +# define magick_attribute(x) /* nothing */ +# define magick_unused(x) x +# define magick_unreferenced(x) /* nothing */ +#endif + +#if !defined(__clang__) && (defined(__GNUC__) && (__GNUC__) > 4) +# define magick_alloc_size(x) __attribute__((__alloc_size__(x))) +# define magick_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) +# define magick_fallthrough __attribute__((fallthrough)) +#else +# define magick_alloc_size(x) /* nothing */ +# define magick_alloc_sizes(x,y) /* nothing */ +# define magick_fallthrough /* nothing */ +#endif + +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__) > 4) +# define magick_cold_spot __attribute__((__cold__)) +# define magick_hot_spot __attribute__((__hot__)) +#else +# define magick_cold_spot +# define magick_hot_spot +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/methods.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/methods.h new file mode 100644 index 0000000000..9c9b5d822c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/methods.h @@ -0,0 +1,1513 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore API methods prefix. + + nm -p MagickCore/.libs/libMagickCore-7.Q16HDRI.a | grep ' T ' | \ + egrep -v '(MagickError)|(MagickFatalError)|(MagickWarning)|(ThrowException)' | \ + awk '{ printf("#define %s PrependMagickMethod(%s)\n", $3, $3); }' | sort +*/ +#ifndef MAGICKCORE_METHOD_H +#define MAGICKCORE_METHOD_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if defined(MAGICKCORE_NAMESPACE_PREFIX) + +#if defined(__STDC__) +#define PrescanMagickPrefix(prefix,method) prefix ## method +#else +#define PrescanMagickPrefix(prefix,method) prefix(method) +#endif +#define EvaluateMagickPrefix(prefix,method) PrescanMagickPrefix(prefix,method) +#define PrependMagickMethod(method) \ + EvaluateMagickPrefix(MAGICKCORE_NAMESPACE_PREFIX,method) + +#define AcquireAlignedMemory PrependMagickMethod(AcquireAlignedMemory) +#define AcquireAuthenticCacheView PrependMagickMethod(AcquireAuthenticCacheView) +#define AcquireCriticalMemory PrependMagickMethod(AcquireCriticalMemory) +#define AcquireCustomStreamInfo PrependMagickMethod(AcquireCustomStreamInfo) +#define AcquireDistributeCacheInfo PrependMagickMethod(AcquireDistributeCacheInfo) +#define AcquireDrawInfo PrependMagickMethod(AcquireDrawInfo) +#define AcquireExceptionInfo PrependMagickMethod(AcquireExceptionInfo) +#define AcquireFxInfo PrependMagickMethod(AcquireFxInfo) +#define AcquireImageColormap PrependMagickMethod(AcquireImageColormap) +#define AcquireImageInfo PrependMagickMethod(AcquireImageInfo) +#define AcquireImage PrependMagickMethod(AcquireImage) +#define AcquireKernelBuiltIn PrependMagickMethod(AcquireKernelBuiltIn) +#define AcquireKernelInfo PrependMagickMethod(AcquireKernelInfo) +#define AcquireMagickInfo PrependMagickMethod(AcquireMagickInfo) +#define AcquireMagickMatrix PrependMagickMethod(AcquireMagickMatrix) +#define AcquireMagickMemory PrependMagickMethod(AcquireMagickMemory) +#define AcquireMagickResource PrependMagickMethod(AcquireMagickResource) +#define AcquireMatrixInfo PrependMagickMethod(AcquireMatrixInfo) +#define AcquireMimeCache PrependMagickMethod(AcquireMimeCache) +#define AcquireNextImage PrependMagickMethod(AcquireNextImage) +#define AcquirePixelCacheNexus PrependMagickMethod(AcquirePixelCacheNexus) +#define AcquirePixelCachePixels PrependMagickMethod(AcquirePixelCachePixels) +#define AcquirePixelCache PrependMagickMethod(AcquirePixelCache) +#define AcquirePixelChannelMap PrependMagickMethod(AcquirePixelChannelMap) +#define AcquireQuantizeInfo PrependMagickMethod(AcquireQuantizeInfo) +#define AcquireQuantumInfo PrependMagickMethod(AcquireQuantumInfo) +#define AcquireQuantumMemory PrependMagickMethod(AcquireQuantumMemory) +#define AcquireRandomInfo PrependMagickMethod(AcquireRandomInfo) +#define AcquireResampleFilter PrependMagickMethod(AcquireResampleFilter) +#define AcquireResizeFilter PrependMagickMethod(AcquireResizeFilter) +#define AcquireSemaphoreInfo PrependMagickMethod(AcquireSemaphoreInfo) +#define AcquireSignatureInfo PrependMagickMethod(AcquireSignatureInfo) +#define AcquireStreamInfo PrependMagickMethod(AcquireStreamInfo) +#define AcquireStringInfo PrependMagickMethod(AcquireStringInfo) +#define AcquireString PrependMagickMethod(AcquireString) +#define AcquireTimerInfo PrependMagickMethod(AcquireTimerInfo) +#define AcquireTokenInfo PrependMagickMethod(AcquireTokenInfo) +#define AcquireUniqueFilename PrependMagickMethod(AcquireUniqueFilename) +#define AcquireUniqueFileResource PrependMagickMethod(AcquireUniqueFileResource) +#define AcquireUniqueSymbolicLink PrependMagickMethod(AcquireUniqueSymbolicLink) +#define AcquireVirtualCacheView PrependMagickMethod(AcquireVirtualCacheView) +#define AcquireVirtualMemory PrependMagickMethod(AcquireVirtualMemory) +#define ActivateSemaphoreInfo PrependMagickMethod(ActivateSemaphoreInfo) +#define AdaptiveBlurImage PrependMagickMethod(AdaptiveBlurImage) +#define AdaptiveResizeImage PrependMagickMethod(AdaptiveResizeImage) +#define AdaptiveSharpenImage PrependMagickMethod(AdaptiveSharpenImage) +#define AdaptiveThresholdImage PrependMagickMethod(AdaptiveThresholdImage) +#define AddChildToXMLTree PrependMagickMethod(AddChildToXMLTree) +#define AddNoiseImage PrependMagickMethod(AddNoiseImage) +#define AddPathToXMLTree PrependMagickMethod(AddPathToXMLTree) +#define AddValueToSplayTree PrependMagickMethod(AddValueToSplayTree) +#define AffineTransformImage PrependMagickMethod(AffineTransformImage) +#define analyzeImage PrependMagickMethod(analyzeImage) +#define AnimateImages PrependMagickMethod(AnimateImages) +#define AnnotateComponentGenesis PrependMagickMethod(AnnotateComponentGenesis) +#define AnnotateComponentTerminus PrependMagickMethod(AnnotateComponentTerminus) +#define AnnotateImage PrependMagickMethod(AnnotateImage) +#define AppendImageFormat PrependMagickMethod(AppendImageFormat) +#define AppendImages PrependMagickMethod(AppendImages) +#define AppendImageToList PrependMagickMethod(AppendImageToList) +#define AppendValueToLinkedList PrependMagickMethod(AppendValueToLinkedList) +#define Ascii85Encode PrependMagickMethod(Ascii85Encode) +#define Ascii85Flush PrependMagickMethod(Ascii85Flush) +#define Ascii85Initialize PrependMagickMethod(Ascii85Initialize) +#define AsynchronousResourceComponentTerminus PrependMagickMethod(AsynchronousResourceComponentTerminus) +#define AttachBlob PrependMagickMethod(AttachBlob) +#define AttachCustomStream PrependMagickMethod(AttachCustomStream) +#define AutoGammaImage PrependMagickMethod(AutoGammaImage) +#define AutoLevelImage PrependMagickMethod(AutoLevelImage) +#define AutoOrientImage PrependMagickMethod(AutoOrientImage) +#define AutoThresholdImage PrependMagickMethod(AutoThresholdImage) +#define Base64Decode PrependMagickMethod(Base64Decode) +#define Base64Encode PrependMagickMethod(Base64Encode) +#define BilateralBlurImage PrependMagickMethod(BilateralBlurImage) +#define BilevelImage PrependMagickMethod(BilevelImage) +#define BlackThresholdImage PrependMagickMethod(BlackThresholdImage) +#define BlobToFile PrependMagickMethod(BlobToFile) +#define BlobToImage PrependMagickMethod(BlobToImage) +#define BlobToStringInfo PrependMagickMethod(BlobToStringInfo) +#define BlueShiftImage PrependMagickMethod(BlueShiftImage) +#define BlurImage PrependMagickMethod(BlurImage) +#define BorderImage PrependMagickMethod(BorderImage) +#define BrightnessContrastImage PrependMagickMethod(BrightnessContrastImage) +#define CacheComponentGenesis PrependMagickMethod(CacheComponentGenesis) +#define CacheComponentTerminus PrependMagickMethod(CacheComponentTerminus) +#define CannyEdgeImage PrependMagickMethod(CannyEdgeImage) +#define CanonicalXMLContent PrependMagickMethod(CanonicalXMLContent) +#define CatchException PrependMagickMethod(CatchException) +#define CatchImageException PrependMagickMethod(CatchImageException) +#define ChannelFxImage PrependMagickMethod(ChannelFxImage) +#define CharcoalImage PrependMagickMethod(CharcoalImage) +#define ChopImage PrependMagickMethod(ChopImage) +#define ChopPathComponents PrependMagickMethod(ChopPathComponents) +#define CLAHEImage PrependMagickMethod(CLAHEImage) +#define ClampImage PrependMagickMethod(ClampImage) +#define ClearLinkedList PrependMagickMethod(ClearLinkedList) +#define ClearMagickException PrependMagickMethod(ClearMagickException) +#define ClipImagePath PrependMagickMethod(ClipImagePath) +#define ClipImage PrependMagickMethod(ClipImage) +#define CloneBlobInfo PrependMagickMethod(CloneBlobInfo) +#define CloneCacheView PrependMagickMethod(CloneCacheView) +#define CloneDrawInfo PrependMagickMethod(CloneDrawInfo) +#define CloneExceptionInfo PrependMagickMethod(CloneExceptionInfo) +#define CloneImageArtifacts PrependMagickMethod(CloneImageArtifacts) +#define CloneImageInfo PrependMagickMethod(CloneImageInfo) +#define CloneImageList PrependMagickMethod(CloneImageList) +#define CloneImageOptions PrependMagickMethod(CloneImageOptions) +#define CloneImage PrependMagickMethod(CloneImage) +#define CloneImageProfiles PrependMagickMethod(CloneImageProfiles) +#define CloneImageProperties PrependMagickMethod(CloneImageProperties) +#define CloneImages PrependMagickMethod(CloneImages) +#define CloneImageView PrependMagickMethod(CloneImageView) +#define CloneKernelInfo PrependMagickMethod(CloneKernelInfo) +#define CloneMontageInfo PrependMagickMethod(CloneMontageInfo) +#define ClonePixelCacheMethods PrependMagickMethod(ClonePixelCacheMethods) +#define ClonePixelCache PrependMagickMethod(ClonePixelCache) +#define ClonePixelChannelMap PrependMagickMethod(ClonePixelChannelMap) +#define ClonePixelInfo PrependMagickMethod(ClonePixelInfo) +#define CloneQuantizeInfo PrependMagickMethod(CloneQuantizeInfo) +#define CloneSplayTree PrependMagickMethod(CloneSplayTree) +#define CloneStringInfo PrependMagickMethod(CloneStringInfo) +#define CloneString PrependMagickMethod(CloneString) +#define CloseBlob PrependMagickMethod(CloseBlob) +#define CloseMagickLog PrependMagickMethod(CloseMagickLog) +#define ClutImage PrependMagickMethod(ClutImage) +#define CoalesceImages PrependMagickMethod(CoalesceImages) +#define CoderComponentGenesis PrependMagickMethod(CoderComponentGenesis) +#define CoderComponentTerminus PrependMagickMethod(CoderComponentTerminus) +#define ColorComponentGenesis PrependMagickMethod(ColorComponentGenesis) +#define ColorComponentTerminus PrependMagickMethod(ColorComponentTerminus) +#define ColorDecisionListImage PrependMagickMethod(ColorDecisionListImage) +#define ColorizeImage PrependMagickMethod(ColorizeImage) +#define ColorMatrixImage PrependMagickMethod(ColorMatrixImage) +#define ColorThresholdImage PrependMagickMethod(ColorThresholdImage) +#define CombineImages PrependMagickMethod(CombineImages) +#define CommandOptionToMnemonic PrependMagickMethod(CommandOptionToMnemonic) +#define CompareImagesLayers PrependMagickMethod(CompareImagesLayers) +#define CompareImages PrependMagickMethod(CompareImages) +#define CompareSplayTreeStringInfo PrependMagickMethod(CompareSplayTreeStringInfo) +#define CompareSplayTreeString PrependMagickMethod(CompareSplayTreeString) +#define CompareStringInfo PrependMagickMethod(CompareStringInfo) +#define ComplexImages PrependMagickMethod(ComplexImages) +#define CompositeImage PrependMagickMethod(CompositeImage) +#define CompositeLayers PrependMagickMethod(CompositeLayers) +#define CompressImageColormap PrependMagickMethod(CompressImageColormap) +#define ConcatenateColorComponent PrependMagickMethod(ConcatenateColorComponent) +#define ConcatenateMagickString PrependMagickMethod(ConcatenateMagickString) +#define ConcatenateStringInfo PrependMagickMethod(ConcatenateStringInfo) +#define ConcatenateString PrependMagickMethod(ConcatenateString) +#define ConfigureComponentGenesis PrependMagickMethod(ConfigureComponentGenesis) +#define ConfigureComponentTerminus PrependMagickMethod(ConfigureComponentTerminus) +#define ConfigureFileToStringInfo PrependMagickMethod(ConfigureFileToStringInfo) +#define ConformPixelInfo PrependMagickMethod(ConformPixelInfo) +#define ConnectedComponentsImage PrependMagickMethod(ConnectedComponentsImage) +#define ConsolidateCMYKImages PrependMagickMethod(ConsolidateCMYKImages) +#define ConstantString PrependMagickMethod(ConstantString) +#define ConstituteImage PrependMagickMethod(ConstituteImage) +#define ContinueTimer PrependMagickMethod(ContinueTimer) +#define ContrastImage PrependMagickMethod(ContrastImage) +#define ContrastStretchImage PrependMagickMethod(ContrastStretchImage) +#define ConvertHCLpToRGB PrependMagickMethod(ConvertHCLpToRGB) +#define ConvertHCLToRGB PrependMagickMethod(ConvertHCLToRGB) +#define ConvertHSBToRGB PrependMagickMethod(ConvertHSBToRGB) +#define ConvertHSIToRGB PrependMagickMethod(ConvertHSIToRGB) +#define ConvertHSLToRGB PrependMagickMethod(ConvertHSLToRGB) +#define ConvertHSVToRGB PrependMagickMethod(ConvertHSVToRGB) +#define ConvertHWBToRGB PrependMagickMethod(ConvertHWBToRGB) +#define ConvertLCHabToRGB PrependMagickMethod(ConvertLCHabToRGB) +#define ConvertLCHuvToRGB PrependMagickMethod(ConvertLCHuvToRGB) +#define ConvertRGBToHCLp PrependMagickMethod(ConvertRGBToHCLp) +#define ConvertRGBToHCL PrependMagickMethod(ConvertRGBToHCL) +#define ConvertRGBToHSB PrependMagickMethod(ConvertRGBToHSB) +#define ConvertRGBToHSI PrependMagickMethod(ConvertRGBToHSI) +#define ConvertRGBToHSL PrependMagickMethod(ConvertRGBToHSL) +#define ConvertRGBToHSV PrependMagickMethod(ConvertRGBToHSV) +#define ConvertRGBToHWB PrependMagickMethod(ConvertRGBToHWB) +#define ConvertRGBToLab PrependMagickMethod(ConvertRGBToLab) +#define ConvertRGBToLCHab PrependMagickMethod(ConvertRGBToLCHab) +#define ConvertRGBToLCHuv PrependMagickMethod(ConvertRGBToLCHuv) +#define ConvolveImage PrependMagickMethod(ConvolveImage) +#define CopyImagePixels PrependMagickMethod(CopyImagePixels) +#define CopyMagickMemory PrependMagickMethod(CopyMagickMemory) +#define CopyMagickString PrependMagickMethod(CopyMagickString) +#define CreateMagickThreadKey PrependMagickMethod(CreateMagickThreadKey) +#define CropImage PrependMagickMethod(CropImage) +#define CropImageToTiles PrependMagickMethod(CropImageToTiles) +#define CustomStreamToImage PrependMagickMethod(CustomStreamToImage) +#define CycleColormapImage PrependMagickMethod(CycleColormapImage) +#define DecipherImage PrependMagickMethod(DecipherImage) +#define DecodePixelGamma PrependMagickMethod(DecodePixelGamma) +#define DefineImageArtifact PrependMagickMethod(DefineImageArtifact) +#define DefineImageOption PrependMagickMethod(DefineImageOption) +#define DefineImageProperty PrependMagickMethod(DefineImageProperty) +#define DefineImageRegistry PrependMagickMethod(DefineImageRegistry) +#define DelegateComponentGenesis PrependMagickMethod(DelegateComponentGenesis) +#define DelegateComponentTerminus PrependMagickMethod(DelegateComponentTerminus) +#define DeleteImageArtifact PrependMagickMethod(DeleteImageArtifact) +#define DeleteImageFromList PrependMagickMethod(DeleteImageFromList) +#define DeleteImageOption PrependMagickMethod(DeleteImageOption) +#define DeleteImageProfile PrependMagickMethod(DeleteImageProfile) +#define DeleteImageProperty PrependMagickMethod(DeleteImageProperty) +#define DeleteImageRegistry PrependMagickMethod(DeleteImageRegistry) +#define DeleteImages PrependMagickMethod(DeleteImages) +#define DeleteMagickThreadKey PrependMagickMethod(DeleteMagickThreadKey) +#define DeleteNodeByValueFromSplayTree PrependMagickMethod(DeleteNodeByValueFromSplayTree) +#define DeleteNodeFromSplayTree PrependMagickMethod(DeleteNodeFromSplayTree) +#define DeskewImage PrependMagickMethod(DeskewImage) +#define DespeckleImage PrependMagickMethod(DespeckleImage) +#define DestroyBlob PrependMagickMethod(DestroyBlob) +#define DestroyCacheView PrependMagickMethod(DestroyCacheView) +#define DestroyConfigureOptions PrependMagickMethod(DestroyConfigureOptions) +#define DestroyCustomStreamInfo PrependMagickMethod(DestroyCustomStreamInfo) +#define DestroyDistributeCacheInfo PrependMagickMethod(DestroyDistributeCacheInfo) +#define DestroyDrawInfo PrependMagickMethod(DestroyDrawInfo) +#define DestroyExceptionInfo PrependMagickMethod(DestroyExceptionInfo) +#define DestroyFxInfo PrependMagickMethod(DestroyFxInfo) +#define DestroyImageArtifacts PrependMagickMethod(DestroyImageArtifacts) +#define DestroyImageInfo PrependMagickMethod(DestroyImageInfo) +#define DestroyImageList PrependMagickMethod(DestroyImageList) +#define DestroyImageOptions PrependMagickMethod(DestroyImageOptions) +#define DestroyImagePixels PrependMagickMethod(DestroyImagePixels) +#define DestroyImage PrependMagickMethod(DestroyImage) +#define DestroyImageProfiles PrependMagickMethod(DestroyImageProfiles) +#define DestroyImageProperties PrependMagickMethod(DestroyImageProperties) +#define DestroyImageView PrependMagickMethod(DestroyImageView) +#define DestroyKernelInfo PrependMagickMethod(DestroyKernelInfo) +#define DestroyLinkedList PrependMagickMethod(DestroyLinkedList) +#define DestroyLocaleOptions PrependMagickMethod(DestroyLocaleOptions) +#define DestroyMagickMemory PrependMagickMethod(DestroyMagickMemory) +#define DestroyMatrixInfo PrependMagickMethod(DestroyMatrixInfo) +#define DestroyMontageInfo PrependMagickMethod(DestroyMontageInfo) +#define DestroyPixelCacheNexus PrependMagickMethod(DestroyPixelCacheNexus) +#define DestroyPixelCache PrependMagickMethod(DestroyPixelCache) +#define DestroyPixelChannelMap PrependMagickMethod(DestroyPixelChannelMap) +#define DestroyQuantizeInfo PrependMagickMethod(DestroyQuantizeInfo) +#define DestroyQuantumInfo PrependMagickMethod(DestroyQuantumInfo) +#define DestroyRandomInfo PrependMagickMethod(DestroyRandomInfo) +#define DestroyResampleFilter PrependMagickMethod(DestroyResampleFilter) +#define DestroyResizeFilter PrependMagickMethod(DestroyResizeFilter) +#define DestroySignatureInfo PrependMagickMethod(DestroySignatureInfo) +#define DestroySplayTree PrependMagickMethod(DestroySplayTree) +#define DestroyStreamInfo PrependMagickMethod(DestroyStreamInfo) +#define DestroyStringInfo PrependMagickMethod(DestroyStringInfo) +#define DestroyStringList PrependMagickMethod(DestroyStringList) +#define DestroyString PrependMagickMethod(DestroyString) +#define DestroyThresholdMap PrependMagickMethod(DestroyThresholdMap) +#define DestroyTimerInfo PrependMagickMethod(DestroyTimerInfo) +#define DestroyTokenInfo PrependMagickMethod(DestroyTokenInfo) +#define DestroyXMLTree PrependMagickMethod(DestroyXMLTree) +#define DestroyXResources PrependMagickMethod(DestroyXResources) +#define DestroyXWidget PrependMagickMethod(DestroyXWidget) +#define DetachBlob PrependMagickMethod(DetachBlob) +#define DisassociateBlob PrependMagickMethod(DisassociateBlob) +#define DisassociateImageStream PrependMagickMethod(DisassociateImageStream) +#define DiscardBlobBytes PrependMagickMethod(DiscardBlobBytes) +#define DisplayImages PrependMagickMethod(DisplayImages) +#define DisposeImages PrependMagickMethod(DisposeImages) +#define DistortImage PrependMagickMethod(DistortImage) +#define DistortResizeImage PrependMagickMethod(DistortResizeImage) +#define DistributePixelCacheServer PrependMagickMethod(DistributePixelCacheServer) +#define DrawAffineImage PrependMagickMethod(DrawAffineImage) +#define DrawClipPath PrependMagickMethod(DrawClipPath) +#define DrawGradientImage PrependMagickMethod(DrawGradientImage) +#define DrawImage PrependMagickMethod(DrawImage) +#define DrawPatternPath PrependMagickMethod(DrawPatternPath) +#define DrawPrimitive PrependMagickMethod(DrawPrimitive) +#define DuplexTransferImageViewIterator PrependMagickMethod(DuplexTransferImageViewIterator) +#define DuplicateBlob PrependMagickMethod(DuplicateBlob) +#define DuplicateImages PrependMagickMethod(DuplicateImages) +#define EdgeImage PrependMagickMethod(EdgeImage) +#define EmbossImage PrependMagickMethod(EmbossImage) +#define EncipherImage PrependMagickMethod(EncipherImage) +#define EncodePixelGamma PrependMagickMethod(EncodePixelGamma) +#define EnhanceImage PrependMagickMethod(EnhanceImage) +#define EOFBlob PrependMagickMethod(EOFBlob) +#define EqualizeImage PrependMagickMethod(EqualizeImage) +#define ErrorBlob PrependMagickMethod(ErrorBlob) +#define EscapeString PrependMagickMethod(EscapeString) +#define EvaluateImage PrependMagickMethod(EvaluateImage) +#define EvaluateImages PrependMagickMethod(EvaluateImages) +#define ExceptionComponentGenesis PrependMagickMethod(ExceptionComponentGenesis) +#define ExceptionComponentTerminus PrependMagickMethod(ExceptionComponentTerminus) +#define ExcerptImage PrependMagickMethod(ExcerptImage) +#define ExpandAffine PrependMagickMethod(ExpandAffine) +#define ExpandFilename PrependMagickMethod(ExpandFilename) +#define ExpandFilenames PrependMagickMethod(ExpandFilenames) +#define ExportImagePixels PrependMagickMethod(ExportImagePixels) +#define ExportQuantumPixels PrependMagickMethod(ExportQuantumPixels) +#define ExtentImage PrependMagickMethod(ExtentImage) +#define ExternalDelegateCommand PrependMagickMethod(ExternalDelegateCommand) +#define FileToBlob PrependMagickMethod(FileToBlob) +#define FileToImage PrependMagickMethod(FileToImage) +#define FileToStringInfo PrependMagickMethod(FileToStringInfo) +#define FileToString PrependMagickMethod(FileToString) +#define FileToXML PrependMagickMethod(FileToXML) +#define FinalizeSignature PrependMagickMethod(FinalizeSignature) +#define FlipImage PrependMagickMethod(FlipImage) +#define FloodfillPaintImage PrependMagickMethod(FloodfillPaintImage) +#define FlopImage PrependMagickMethod(FlopImage) +#define FormatImageProperty PrependMagickMethod(FormatImageProperty) +#define FormatLocaleFileList PrependMagickMethod(FormatLocaleFileList) +#define FormatLocaleFile PrependMagickMethod(FormatLocaleFile) +#define FormatLocaleStringList PrependMagickMethod(FormatLocaleStringList) +#define FormatLocaleString PrependMagickMethod(FormatLocaleString) +#define FormatMagickCaption PrependMagickMethod(FormatMagickCaption) +#define FormatMagickSize PrependMagickMethod(FormatMagickSize) +#define FormatMagickTime PrependMagickMethod(FormatMagickTime) +#define ForwardFourierTransformImage PrependMagickMethod(ForwardFourierTransformImage) +#define FrameImage PrependMagickMethod(FrameImage) +#define FunctionImage PrependMagickMethod(FunctionImage) +#define FxEvaluateChannelExpression PrependMagickMethod(FxEvaluateChannelExpression) +#define FxImage PrependMagickMethod(FxImage) +#define GammaImage PrependMagickMethod(GammaImage) +#define GaussianBlurImage PrependMagickMethod(GaussianBlurImage) +#define GaussJordanElimination PrependMagickMethod(GaussJordanElimination) +#define GenerateDifferentialNoise PrependMagickMethod(GenerateDifferentialNoise) +#define GetAffineMatrix PrependMagickMethod(GetAffineMatrix) +#define GetAuthenticMetacontent PrependMagickMethod(GetAuthenticMetacontent) +#define GetAuthenticPixelCacheNexus PrependMagickMethod(GetAuthenticPixelCacheNexus) +#define GetAuthenticPixelQueue PrependMagickMethod(GetAuthenticPixelQueue) +#define GetAuthenticPixels PrependMagickMethod(GetAuthenticPixels) +#define GetBlobError PrependMagickMethod(GetBlobError) +#define GetBlobFileHandle PrependMagickMethod(GetBlobFileHandle) +#define GetBlobInfo PrependMagickMethod(GetBlobInfo) +#define GetBlobProperties PrependMagickMethod(GetBlobProperties) +#define GetBlobSize PrependMagickMethod(GetBlobSize) +#define GetBlobStreamData PrependMagickMethod(GetBlobStreamData) +#define GetBlobStreamHandler PrependMagickMethod(GetBlobStreamHandler) +#define GetCacheViewAuthenticMetacontent PrependMagickMethod(GetCacheViewAuthenticMetacontent) +#define GetCacheViewAuthenticPixelQueue PrependMagickMethod(GetCacheViewAuthenticPixelQueue) +#define GetCacheViewAuthenticPixels PrependMagickMethod(GetCacheViewAuthenticPixels) +#define GetCacheViewColorspace PrependMagickMethod(GetCacheViewColorspace) +#define GetCacheViewExtent PrependMagickMethod(GetCacheViewExtent) +#define GetCacheViewImage PrependMagickMethod(GetCacheViewImage) +#define GetCacheViewStorageClass PrependMagickMethod(GetCacheViewStorageClass) +#define GetCacheViewVirtualMetacontent PrependMagickMethod(GetCacheViewVirtualMetacontent) +#define GetCacheViewVirtualPixelQueue PrependMagickMethod(GetCacheViewVirtualPixelQueue) +#define GetCacheViewVirtualPixels PrependMagickMethod(GetCacheViewVirtualPixels) +#define GetClientName PrependMagickMethod(GetClientName) +#define GetClientPath PrependMagickMethod(GetClientPath) +#define GetCoderInfoList PrependMagickMethod(GetCoderInfoList) +#define GetCoderInfo PrependMagickMethod(GetCoderInfo) +#define GetCoderList PrependMagickMethod(GetCoderList) +#define GetColorCompliance PrependMagickMethod(GetColorCompliance) +#define GetColorInfoList PrependMagickMethod(GetColorInfoList) +#define GetColorInfo PrependMagickMethod(GetColorInfo) +#define GetColorList PrependMagickMethod(GetColorList) +#define GetColorTuple PrependMagickMethod(GetColorTuple) +#define GetCommandOptionFlags PrependMagickMethod(GetCommandOptionFlags) +#define GetCommandOptionInfo PrependMagickMethod(GetCommandOptionInfo) +#define GetCommandOptions PrependMagickMethod(GetCommandOptions) +#define GetConfigureInfoList PrependMagickMethod(GetConfigureInfoList) +#define GetConfigureInfo PrependMagickMethod(GetConfigureInfo) +#define GetConfigureList PrependMagickMethod(GetConfigureList) +#define GetConfigureOption PrependMagickMethod(GetConfigureOption) +#define GetConfigureOptions PrependMagickMethod(GetConfigureOptions) +#define GetConfigurePaths PrependMagickMethod(GetConfigurePaths) +#define GetConfigureValue PrependMagickMethod(GetConfigureValue) +#define GetDelegateCommand PrependMagickMethod(GetDelegateCommand) +#define GetDelegateCommands PrependMagickMethod(GetDelegateCommands) +#define GetDelegateInfoList PrependMagickMethod(GetDelegateInfoList) +#define GetDelegateInfo PrependMagickMethod(GetDelegateInfo) +#define GetDelegateList PrependMagickMethod(GetDelegateList) +#define GetDelegateMode PrependMagickMethod(GetDelegateMode) +#define GetDelegateThreadSupport PrependMagickMethod(GetDelegateThreadSupport) +#define GetDistributeCacheFile PrependMagickMethod(GetDistributeCacheFile) +#define GetDistributeCacheHostname PrependMagickMethod(GetDistributeCacheHostname) +#define GetDistributeCachePort PrependMagickMethod(GetDistributeCachePort) +#define GetDrawInfo PrependMagickMethod(GetDrawInfo) +#define GetElapsedTime PrependMagickMethod(GetElapsedTime) +#define GetEnvironmentValue PrependMagickMethod(GetEnvironmentValue) +#define GetExceptionMessage PrependMagickMethod(GetExceptionMessage) +#define GetExecutionPath PrependMagickMethod(GetExecutionPath) +#define GetFirstImageInList PrependMagickMethod(GetFirstImageInList) +#define GetGeometry PrependMagickMethod(GetGeometry) +#define GetHeadElementInLinkedList PrependMagickMethod(GetHeadElementInLinkedList) +#define GetImageAlphaChannel PrependMagickMethod(GetImageAlphaChannel) +#define GetImageArtifact PrependMagickMethod(GetImageArtifact) +#define GetImageBoundingBox PrependMagickMethod(GetImageBoundingBox) +#define GetImageColorspaceType PrependMagickMethod(GetImageColorspaceType) +#define GetImageConvexHull PrependMagickMethod(GetImageConvexHull) +#define GetImageDecoder PrependMagickMethod(GetImageDecoder) +#define GetImageDepth PrependMagickMethod(GetImageDepth) +#define GetImageDistortion PrependMagickMethod(GetImageDistortion) +#define GetImageDistortions PrependMagickMethod(GetImageDistortions) +#define GetImageDynamicThreshold PrependMagickMethod(GetImageDynamicThreshold) +#define GetImageEncoder PrependMagickMethod(GetImageEncoder) +#define GetImageEntropy PrependMagickMethod(GetImageEntropy) +#define GetImageExtent PrependMagickMethod(GetImageExtent) +#define GetImageExtrema PrependMagickMethod(GetImageExtrema) +#define GetImageFeatures PrependMagickMethod(GetImageFeatures) +#define GetImageFromList PrependMagickMethod(GetImageFromList) +#define GetImageHistogram PrependMagickMethod(GetImageHistogram) +#define GetImageIndexInList PrependMagickMethod(GetImageIndexInList) +#define GetImageInfoFile PrependMagickMethod(GetImageInfoFile) +#define GetImageInfo PrependMagickMethod(GetImageInfo) +#define GetImageKurtosis PrependMagickMethod(GetImageKurtosis) +#define GetImageListLength PrependMagickMethod(GetImageListLength) +#define GetImageMagick PrependMagickMethod(GetImageMagick) +#define GetImageMask PrependMagickMethod(GetImageMask) +#define GetImageMean PrependMagickMethod(GetImageMean) +#define GetImageMedian PrependMagickMethod(GetImageMedian) +#define GetImageMinimumBoundingBox PrependMagickMethod(GetImageMinimumBoundingBox) +#define GetImageMoments PrependMagickMethod(GetImageMoments) +#define GetImageOption PrependMagickMethod(GetImageOption) +#define GetImagePerceptualHash PrependMagickMethod(GetImagePerceptualHash) +#define GetImagePixelCacheType PrependMagickMethod(GetImagePixelCacheType) +#define GetImageProfile PrependMagickMethod(GetImageProfile) +#define GetImageProperty PrependMagickMethod(GetImageProperty) +#define GetImageQuantizeError PrependMagickMethod(GetImageQuantizeError) +#define GetImageQuantumDepth PrependMagickMethod(GetImageQuantumDepth) +#define GetImageRange PrependMagickMethod(GetImageRange) +#define GetImageReferenceCount PrependMagickMethod(GetImageReferenceCount) +#define GetImageRegistry PrependMagickMethod(GetImageRegistry) +#define GetImageStatistics PrependMagickMethod(GetImageStatistics) +#define GetImageTotalInkDensity PrependMagickMethod(GetImageTotalInkDensity) +#define GetImageType PrependMagickMethod(GetImageType) +#define GetImageViewAuthenticMetacontent PrependMagickMethod(GetImageViewAuthenticMetacontent) +#define GetImageViewAuthenticPixels PrependMagickMethod(GetImageViewAuthenticPixels) +#define GetImageViewException PrependMagickMethod(GetImageViewException) +#define GetImageViewExtent PrependMagickMethod(GetImageViewExtent) +#define GetImageViewImage PrependMagickMethod(GetImageViewImage) +#define GetImageViewIterator PrependMagickMethod(GetImageViewIterator) +#define GetImageViewVirtualMetacontent PrependMagickMethod(GetImageViewVirtualMetacontent) +#define GetImageViewVirtualPixels PrependMagickMethod(GetImageViewVirtualPixels) +#define GetImageVirtualPixelMethod PrependMagickMethod(GetImageVirtualPixelMethod) +#define GetLastImageInList PrependMagickMethod(GetLastImageInList) +#define GetLastValueInLinkedList PrependMagickMethod(GetLastValueInLinkedList) +#define GetLocaleExceptionMessage PrependMagickMethod(GetLocaleExceptionMessage) +#define GetLocaleInfoList PrependMagickMethod(GetLocaleInfoList) +#define GetLocaleInfo_ PrependMagickMethod(GetLocaleInfo_) +#define GetLocaleList PrependMagickMethod(GetLocaleList) +#define GetLocaleMessage PrependMagickMethod(GetLocaleMessage) +#define GetLocaleOptions PrependMagickMethod(GetLocaleOptions) +#define GetLocaleValue PrependMagickMethod(GetLocaleValue) +#define GetLogEventMask PrependMagickMethod(GetLogEventMask) +#define GetLogInfoList PrependMagickMethod(GetLogInfoList) +#define GetLogList PrependMagickMethod(GetLogList) +#define GetLogName PrependMagickMethod(GetLogName) +#define GetMagicInfoList PrependMagickMethod(GetMagicInfoList) +#define GetMagicInfo PrependMagickMethod(GetMagicInfo) +#define GetMagickAdjoin PrependMagickMethod(GetMagickAdjoin) +#define GetMagickBlobSupport PrependMagickMethod(GetMagickBlobSupport) +#define GetMagickCopyright PrependMagickMethod(GetMagickCopyright) +#define GetMagickDecoderSeekableStream PrependMagickMethod(GetMagickDecoderSeekableStream) +#define GetMagickDecoderThreadSupport PrependMagickMethod(GetMagickDecoderThreadSupport) +#define GetMagickDelegates PrependMagickMethod(GetMagickDelegates) +#define GetMagickDescription PrependMagickMethod(GetMagickDescription) +#define GetMagickEncoderSeekableStream PrependMagickMethod(GetMagickEncoderSeekableStream) +#define GetMagickEncoderThreadSupport PrependMagickMethod(GetMagickEncoderThreadSupport) +#define GetMagickEndianSupport PrependMagickMethod(GetMagickEndianSupport) +#define GetMagickFeatures PrependMagickMethod(GetMagickFeatures) +#define GetMagickHomeURL PrependMagickMethod(GetMagickHomeURL) +#define GetMagickInfoList PrependMagickMethod(GetMagickInfoList) +#define GetMagickInfo PrependMagickMethod(GetMagickInfo) +#define GetMagickLicense PrependMagickMethod(GetMagickLicense) +#define GetMagickList PrependMagickMethod(GetMagickList) +#define GetMagickMemoryMethods PrependMagickMethod(GetMagickMemoryMethods) +#define GetMagickMimeType PrependMagickMethod(GetMagickMimeType) +#define GetMagickModuleName PrependMagickMethod(GetMagickModuleName) +#define GetMagickName PrependMagickMethod(GetMagickName) +#define GetMagickPackageName PrependMagickMethod(GetMagickPackageName) +#define GetMagickPageSize PrependMagickMethod(GetMagickPageSize) +#define GetMagickPrecision PrependMagickMethod(GetMagickPrecision) +#define GetMagickProperty PrependMagickMethod(GetMagickProperty) +#define GetMagickQuantumDepth PrependMagickMethod(GetMagickQuantumDepth) +#define GetMagickQuantumRange PrependMagickMethod(GetMagickQuantumRange) +#define GetMagickRawSupport PrependMagickMethod(GetMagickRawSupport) +#define GetMagickReleaseDate PrependMagickMethod(GetMagickReleaseDate) +#define GetMagickResourceLimit PrependMagickMethod(GetMagickResourceLimit) +#define GetMagickResource PrependMagickMethod(GetMagickResource) +#define GetMagickSeekableStream PrependMagickMethod(GetMagickSeekableStream) +#define GetMagickSignature PrependMagickMethod(GetMagickSignature) +#define GetMagickStealth PrependMagickMethod(GetMagickStealth) +#define GetMagickThreadValue PrependMagickMethod(GetMagickThreadValue) +#define GetMagickTime PrependMagickMethod(GetMagickTime) +#define GetMagickUseExtension PrependMagickMethod(GetMagickUseExtension) +#define GetMagickVersion PrependMagickMethod(GetMagickVersion) +#define GetMagicList PrependMagickMethod(GetMagicList) +#define GetMagicName PrependMagickMethod(GetMagicName) +#define GetMagicPatternExtent PrependMagickMethod(GetMagicPatternExtent) +#define GetMatrixColumns PrependMagickMethod(GetMatrixColumns) +#define GetMatrixElement PrependMagickMethod(GetMatrixElement) +#define GetMatrixRows PrependMagickMethod(GetMatrixRows) +#define GetMaxMemoryRequest PrependMagickMethod(GetMaxMemoryRequest) +#define GetMimeDescription PrependMagickMethod(GetMimeDescription) +#define GetMimeInfoList PrependMagickMethod(GetMimeInfoList) +#define GetMimeInfo PrependMagickMethod(GetMimeInfo) +#define GetMimeList PrependMagickMethod(GetMimeList) +#define GetMimeType PrependMagickMethod(GetMimeType) +#define GetMontageInfo PrependMagickMethod(GetMontageInfo) +#define GetMultilineTypeMetrics PrependMagickMethod(GetMultilineTypeMetrics) +#define GetNextImageArtifact PrependMagickMethod(GetNextImageArtifact) +#define GetNextImageInList PrependMagickMethod(GetNextImageInList) +#define GetNextImageOption PrependMagickMethod(GetNextImageOption) +#define GetNextImageProfile PrependMagickMethod(GetNextImageProfile) +#define GetNextImageProperty PrependMagickMethod(GetNextImageProperty) +#define GetNextImageRegistry PrependMagickMethod(GetNextImageRegistry) +#define GetNextKeyInSplayTree PrependMagickMethod(GetNextKeyInSplayTree) +#define GetNextToken PrependMagickMethod(GetNextToken) +#define GetNextValueInLinkedList PrependMagickMethod(GetNextValueInLinkedList) +#define GetNextValueInSplayTree PrependMagickMethod(GetNextValueInSplayTree) +#define GetNextXMLTreeTag PrependMagickMethod(GetNextXMLTreeTag) +#define GetNumberColors PrependMagickMethod(GetNumberColors) +#define GetNumberOfElementsInLinkedList PrependMagickMethod(GetNumberOfElementsInLinkedList) +#define GetNumberOfNodesInSplayTree PrependMagickMethod(GetNumberOfNodesInSplayTree) +#define GetOneAuthenticPixel PrependMagickMethod(GetOneAuthenticPixel) +#define GetOneCacheViewAuthenticPixel PrependMagickMethod(GetOneCacheViewAuthenticPixel) +#define GetOneCacheViewVirtualMethodPixel PrependMagickMethod(GetOneCacheViewVirtualMethodPixel) +#define GetOneCacheViewVirtualPixelInfo PrependMagickMethod(GetOneCacheViewVirtualPixelInfo) +#define GetOneCacheViewVirtualPixel PrependMagickMethod(GetOneCacheViewVirtualPixel) +#define GetOneVirtualPixelInfo PrependMagickMethod(GetOneVirtualPixelInfo) +#define GetOneVirtualPixel PrependMagickMethod(GetOneVirtualPixel) +#define GetOpenCLDeviceBenchmarkScore PrependMagickMethod(GetOpenCLDeviceBenchmarkScore) +#define GetOpenCLDeviceEnabled PrependMagickMethod(GetOpenCLDeviceEnabled) +#define GetOpenCLDeviceName PrependMagickMethod(GetOpenCLDeviceName) +#define GetOpenCLDevices PrependMagickMethod(GetOpenCLDevices) +#define GetOpenCLDeviceType PrependMagickMethod(GetOpenCLDeviceType) +#define GetOpenCLDeviceVersion PrependMagickMethod(GetOpenCLDeviceVersion) +#define GetOpenCLEnabled PrependMagickMethod(GetOpenCLEnabled) +#define GetOpenCLKernelProfileRecords PrependMagickMethod(GetOpenCLKernelProfileRecords) +#define GetOptimalKernelWidth1D PrependMagickMethod(GetOptimalKernelWidth1D) +#define GetOptimalKernelWidth2D PrependMagickMethod(GetOptimalKernelWidth2D) +#define GetOptimalKernelWidth PrependMagickMethod(GetOptimalKernelWidth) +#define GetPageGeometry PrependMagickMethod(GetPageGeometry) +#define GetPathAttributes PrependMagickMethod(GetPathAttributes) +#define GetPathComponent PrependMagickMethod(GetPathComponent) +#define GetPathComponents PrependMagickMethod(GetPathComponents) +#define GetPathTemplate PrependMagickMethod(GetPathTemplate) +#define GetPixelCacheColorspace PrependMagickMethod(GetPixelCacheColorspace) +#define GetPixelCacheFilename PrependMagickMethod(GetPixelCacheFilename) +#define GetPixelCacheMethods PrependMagickMethod(GetPixelCacheMethods) +#define GetPixelCacheNexusExtent PrependMagickMethod(GetPixelCacheNexusExtent) +#define GetPixelCachePixels PrependMagickMethod(GetPixelCachePixels) +#define GetPixelCacheStorageClass PrependMagickMethod(GetPixelCacheStorageClass) +#define GetPixelCacheTileSize PrependMagickMethod(GetPixelCacheTileSize) +#define GetPixelCacheVirtualMethod PrependMagickMethod(GetPixelCacheVirtualMethod) +#define GetPixelInfoIntensity PrependMagickMethod(GetPixelInfoIntensity) +#define GetPixelInfo PrependMagickMethod(GetPixelInfo) +#define GetPixelIntensity PrependMagickMethod(GetPixelIntensity) +#define GetPolicyInfoList PrependMagickMethod(GetPolicyInfoList) +#define GetPolicyList PrependMagickMethod(GetPolicyList) +#define GetPolicyValue PrependMagickMethod(GetPolicyValue) +#define GetPreviousImageInList PrependMagickMethod(GetPreviousImageInList) +#define GetPseudoRandomValue PrependMagickMethod(GetPseudoRandomValue) +#define GetQuantizeInfo PrependMagickMethod(GetQuantizeInfo) +#define GetQuantumEndian PrependMagickMethod(GetQuantumEndian) +#define GetQuantumExtent PrependMagickMethod(GetQuantumExtent) +#define GetQuantumFormat PrependMagickMethod(GetQuantumFormat) +#define GetQuantumInfo PrependMagickMethod(GetQuantumInfo) +#define GetQuantumPixels PrependMagickMethod(GetQuantumPixels) +#define GetQuantumType PrependMagickMethod(GetQuantumType) +#define GetRandomInfoNormalize PrependMagickMethod(GetRandomInfoNormalize) +#define GetRandomInfoSeed PrependMagickMethod(GetRandomInfoSeed) +#define GetRandomKey PrependMagickMethod(GetRandomKey) +#define GetRandomSecretKey PrependMagickMethod(GetRandomSecretKey) +#define GetRandomValue PrependMagickMethod(GetRandomValue) +#define GetResizeFilterBlur PrependMagickMethod(GetResizeFilterBlur) +#define GetResizeFilterCoefficient PrependMagickMethod(GetResizeFilterCoefficient) +#define GetResizeFilterScale PrependMagickMethod(GetResizeFilterScale) +#define GetResizeFilterSupport PrependMagickMethod(GetResizeFilterSupport) +#define GetResizeFilterWeightingType PrependMagickMethod(GetResizeFilterWeightingType) +#define GetResizeFilterWeight PrependMagickMethod(GetResizeFilterWeight) +#define GetResizeFilterWindowSupport PrependMagickMethod(GetResizeFilterWindowSupport) +#define GetResizeFilterWindowWeightingType PrependMagickMethod(GetResizeFilterWindowWeightingType) +#define GetRootValueFromSplayTree PrependMagickMethod(GetRootValueFromSplayTree) +#define GetSignatureBlocksize PrependMagickMethod(GetSignatureBlocksize) +#define GetSignatureDigest PrependMagickMethod(GetSignatureDigest) +#define GetSignatureDigestsize PrependMagickMethod(GetSignatureDigestsize) +#define GetStreamInfoClientData PrependMagickMethod(GetStreamInfoClientData) +#define GetStringInfoDatum PrependMagickMethod(GetStringInfoDatum) +#define GetStringInfoLength PrependMagickMethod(GetStringInfoLength) +#define GetStringInfoName PrependMagickMethod(GetStringInfoName) +#define GetStringInfoPath PrependMagickMethod(GetStringInfoPath) +#define GetThresholdMap PrependMagickMethod(GetThresholdMap) +#define GetTimerInfo PrependMagickMethod(GetTimerInfo) +#define GetTypeInfoByFamily PrependMagickMethod(GetTypeInfoByFamily) +#define GetTypeInfoList PrependMagickMethod(GetTypeInfoList) +#define GetTypeInfo PrependMagickMethod(GetTypeInfo) +#define GetTypeList PrependMagickMethod(GetTypeList) +#define GetTypeMetrics PrependMagickMethod(GetTypeMetrics) +#define GetUserTime PrependMagickMethod(GetUserTime) +#define GetValueFromLinkedList PrependMagickMethod(GetValueFromLinkedList) +#define GetValueFromSplayTree PrependMagickMethod(GetValueFromSplayTree) +#define GetVirtualMemoryBlob PrependMagickMethod(GetVirtualMemoryBlob) +#define GetVirtualMetacontentFromNexus PrependMagickMethod(GetVirtualMetacontentFromNexus) +#define GetVirtualMetacontent PrependMagickMethod(GetVirtualMetacontent) +#define GetVirtualPixelCacheNexus PrependMagickMethod(GetVirtualPixelCacheNexus) +#define GetVirtualPixelQueue PrependMagickMethod(GetVirtualPixelQueue) +#define GetVirtualPixelsNexus PrependMagickMethod(GetVirtualPixelsNexus) +#define GetVirtualPixels PrependMagickMethod(GetVirtualPixels) +#define GetXMLTreeAttribute PrependMagickMethod(GetXMLTreeAttribute) +#define GetXMLTreeAttributes PrependMagickMethod(GetXMLTreeAttributes) +#define GetXMLTreeChild PrependMagickMethod(GetXMLTreeChild) +#define GetXMLTreeContent PrependMagickMethod(GetXMLTreeContent) +#define GetXMLTreeOrdered PrependMagickMethod(GetXMLTreeOrdered) +#define GetXMLTreePath PrependMagickMethod(GetXMLTreePath) +#define GetXMLTreeProcessingInstructions PrependMagickMethod(GetXMLTreeProcessingInstructions) +#define GetXMLTreeSibling PrependMagickMethod(GetXMLTreeSibling) +#define GetXMLTreeTag PrependMagickMethod(GetXMLTreeTag) +#define GlobExpression PrependMagickMethod(GlobExpression) +#define GradientImage PrependMagickMethod(GradientImage) +#define GravityAdjustGeometry PrependMagickMethod(GravityAdjustGeometry) +#define GrayscaleImage PrependMagickMethod(GrayscaleImage) +#define HaldClutImage PrependMagickMethod(HaldClutImage) +#define HoughLineImage PrependMagickMethod(HoughLineImage) +#define HuffmanDecodeImage PrependMagickMethod(HuffmanDecodeImage) +#define HuffmanEncodeImage PrependMagickMethod(HuffmanEncodeImage) +#define IdentifyImageGray PrependMagickMethod(IdentifyImageGray) +#define IdentifyImageMonochrome PrependMagickMethod(IdentifyImageMonochrome) +#define IdentifyImage PrependMagickMethod(IdentifyImage) +#define IdentifyImageType PrependMagickMethod(IdentifyImageType) +#define IdentifyPaletteImage PrependMagickMethod(IdentifyPaletteImage) +#define ImageListToArray PrependMagickMethod(ImageListToArray) +#define ImagesToBlob PrependMagickMethod(ImagesToBlob) +#define ImagesToCustomStream PrependMagickMethod(ImagesToCustomStream) +#define ImageToBlob PrependMagickMethod(ImageToBlob) +#define ImageToCustomStream PrependMagickMethod(ImageToCustomStream) +#define ImageToFile PrependMagickMethod(ImageToFile) +#define ImplodeImage PrependMagickMethod(ImplodeImage) +#define ImportImagePixels PrependMagickMethod(ImportImagePixels) +#define ImportQuantumPixels PrependMagickMethod(ImportQuantumPixels) +#define InheritException PrependMagickMethod(InheritException) +#define InitializeExceptionInfo PrependMagickMethod(InitializeExceptionInfo) +#define InitializePixelChannelMap PrependMagickMethod(InitializePixelChannelMap) +#define InitializeSignature PrependMagickMethod(InitializeSignature) +#define InjectImageBlob PrependMagickMethod(InjectImageBlob) +#define InsertImageInList PrependMagickMethod(InsertImageInList) +#define InsertTagIntoXMLTree PrependMagickMethod(InsertTagIntoXMLTree) +#define InsertValueInLinkedList PrependMagickMethod(InsertValueInLinkedList) +#define InsertValueInSortedLinkedList PrependMagickMethod(InsertValueInSortedLinkedList) +#define IntegralImage PrependMagickMethod(IntegralImage) +#define IntegralRotateImage PrependMagickMethod(IntegralRotateImage) +#define InterpolatePixelChannel PrependMagickMethod(InterpolatePixelChannel) +#define InterpolatePixelChannels PrependMagickMethod(InterpolatePixelChannels) +#define InterpolatePixelInfo PrependMagickMethod(InterpolatePixelInfo) +#define InterpolativeResizeImage PrependMagickMethod(InterpolativeResizeImage) +#define InterpretImageFilename PrependMagickMethod(InterpretImageFilename) +#define InterpretImageProperties PrependMagickMethod(InterpretImageProperties) +#define InterpretLocaleValue PrependMagickMethod(InterpretLocaleValue) +#define InterpretSiPrefixValue PrependMagickMethod(InterpretSiPrefixValue) +#define InverseFourierTransformImage PrependMagickMethod(InverseFourierTransformImage) +#define InvokeDelegate PrependMagickMethod(InvokeDelegate) +#define InvokeDynamicImageFilter PrependMagickMethod(InvokeDynamicImageFilter) +#define IsBlobExempt PrependMagickMethod(IsBlobExempt) +#define IsBlobSeekable PrependMagickMethod(IsBlobSeekable) +#define IsBlobTemporary PrependMagickMethod(IsBlobTemporary) +#define IsCommandOption PrependMagickMethod(IsCommandOption) +#define IsEquivalentAlpha PrependMagickMethod(IsEquivalentAlpha) +#define IsEquivalentImage PrependMagickMethod(IsEquivalentImage) +#define IsEquivalentIntensity PrependMagickMethod(IsEquivalentIntensity) +#define IsEventLogging PrependMagickMethod(IsEventLogging) +#define IsFuzzyEquivalencePixelInfo PrependMagickMethod(IsFuzzyEquivalencePixelInfo) +#define IsFuzzyEquivalencePixel PrependMagickMethod(IsFuzzyEquivalencePixel) +#define IsGeometry PrependMagickMethod(IsGeometry) +#define IsGlob PrependMagickMethod(IsGlob) +#define IsHighDynamicRangeImage PrependMagickMethod(IsHighDynamicRangeImage) +#define IsHistogramImage PrependMagickMethod(IsHistogramImage) +#define IsImageGray PrependMagickMethod(IsImageGray) +#define IsImageMonochrome PrependMagickMethod(IsImageMonochrome) +#define IsImageObject PrependMagickMethod(IsImageObject) +#define IsImageOpaque PrependMagickMethod(IsImageOpaque) +#define IsImagesEqual PrependMagickMethod(IsImagesEqual) +#define IsImageView PrependMagickMethod(IsImageView) +#define IsLinkedListEmpty PrependMagickMethod(IsLinkedListEmpty) +#define IsMagickConflict PrependMagickMethod(IsMagickConflict) +#define IsMagickCoreInstantiated PrependMagickMethod(IsMagickCoreInstantiated) +#define IsOptionMember PrependMagickMethod(IsOptionMember) +#define IsPaletteImage PrependMagickMethod(IsPaletteImage) +#define IsPathAccessible PrependMagickMethod(IsPathAccessible) +#define IsRightsAuthorized PrependMagickMethod(IsRightsAuthorized) +#define IsSceneGeometry PrependMagickMethod(IsSceneGeometry) +#define IsStringFalse PrependMagickMethod(IsStringFalse) +#define IsStringTrue PrependMagickMethod(IsStringTrue) +#define IsTaintImage PrependMagickMethod(IsTaintImage) +#define KmeansImage PrependMagickMethod(KmeansImage) +#define KuwaharaImage PrependMagickMethod(KuwaharaImage) +#define LeastSquaresAddTerms PrependMagickMethod(LeastSquaresAddTerms) +#define LevelImageColors PrependMagickMethod(LevelImageColors) +#define LevelImage PrependMagickMethod(LevelImage) +#define LevelizeImage PrependMagickMethod(LevelizeImage) +#define LinearStretchImage PrependMagickMethod(LinearStretchImage) +#define LinkedListToArray PrependMagickMethod(LinkedListToArray) +#define LiquidRescaleImage PrependMagickMethod(LiquidRescaleImage) +#define ListCoderInfo PrependMagickMethod(ListCoderInfo) +#define ListColorInfo PrependMagickMethod(ListColorInfo) +#define ListCommandOptions PrependMagickMethod(ListCommandOptions) +#define ListConfigureInfo PrependMagickMethod(ListConfigureInfo) +#define ListDelegateInfo PrependMagickMethod(ListDelegateInfo) +#define ListFiles PrependMagickMethod(ListFiles) +#define ListLocaleInfo PrependMagickMethod(ListLocaleInfo) +#define ListLogInfo PrependMagickMethod(ListLogInfo) +#define ListMagicInfo PrependMagickMethod(ListMagicInfo) +#define ListMagickInfo PrependMagickMethod(ListMagickInfo) +#define ListMagickResourceInfo PrependMagickMethod(ListMagickResourceInfo) +#define ListMagickVersion PrependMagickMethod(ListMagickVersion) +#define ListMimeInfo PrependMagickMethod(ListMimeInfo) +#define ListModuleInfo PrependMagickMethod(ListModuleInfo) +#define ListPolicyInfo PrependMagickMethod(ListPolicyInfo) +#define ListThresholdMapFile PrependMagickMethod(ListThresholdMapFile) +#define ListThresholdMaps PrependMagickMethod(ListThresholdMaps) +#define ListTypeInfo PrependMagickMethod(ListTypeInfo) +#define LoadFontConfigFonts PrependMagickMethod(LoadFontConfigFonts) +#define LocalContrastImage PrependMagickMethod(LocalContrastImage) +#define LocaleCompare PrependMagickMethod(LocaleCompare) +#define LocaleComponentGenesis PrependMagickMethod(LocaleComponentGenesis) +#define LocaleComponentTerminus PrependMagickMethod(LocaleComponentTerminus) +#define LocaleLowercase PrependMagickMethod(LocaleLowercase) +#define LocaleLower PrependMagickMethod(LocaleLower) +#define LocaleNCompare PrependMagickMethod(LocaleNCompare) +#define LocaleUppercase PrependMagickMethod(LocaleUppercase) +#define LocaleUpper PrependMagickMethod(LocaleUpper) +#define LockSemaphoreInfo PrependMagickMethod(LockSemaphoreInfo) +#define LogComponentGenesis PrependMagickMethod(LogComponentGenesis) +#define LogComponentTerminus PrependMagickMethod(LogComponentTerminus) +#define LogMagickEventList PrependMagickMethod(LogMagickEventList) +#define LogMagickEvent PrependMagickMethod(LogMagickEvent) +#define LZWEncodeImage PrependMagickMethod(LZWEncodeImage) +#define MagicComponentGenesis PrependMagickMethod(MagicComponentGenesis) +#define MagicComponentTerminus PrependMagickMethod(MagicComponentTerminus) +#define MagickComponentGenesis PrependMagickMethod(MagickComponentGenesis) +#define MagickComponentTerminus PrependMagickMethod(MagickComponentTerminus) +#define MagickCoreGenesis PrependMagickMethod(MagickCoreGenesis) +#define MagickCoreTerminus PrependMagickMethod(MagickCoreTerminus) +#define MagickDelay PrependMagickMethod(MagickDelay) +#define MagickToMime PrependMagickMethod(MagickToMime) +#define MagnifyImage PrependMagickMethod(MagnifyImage) +#define MapBlob PrependMagickMethod(MapBlob) +#define MatrixToImage PrependMagickMethod(MatrixToImage) +#define MeanShiftImage PrependMagickMethod(MeanShiftImage) +#define MergeImageLayers PrependMagickMethod(MergeImageLayers) +#define MimeComponentGenesis PrependMagickMethod(MimeComponentGenesis) +#define MimeComponentTerminus PrependMagickMethod(MimeComponentTerminus) +#define MinifyImage PrependMagickMethod(MinifyImage) +#define MinMaxStretchImage PrependMagickMethod(MinMaxStretchImage) +#define ModifyImage PrependMagickMethod(ModifyImage) +#define ModulateImage PrependMagickMethod(ModulateImage) +#define MonitorComponentGenesis PrependMagickMethod(MonitorComponentGenesis) +#define MonitorComponentTerminus PrependMagickMethod(MonitorComponentTerminus) +#define MontageImageList PrependMagickMethod(MontageImageList) +#define MontageImages PrependMagickMethod(MontageImages) +#define MorphImages PrependMagickMethod(MorphImages) +#define MorphologyApply PrependMagickMethod(MorphologyApply) +#define MorphologyImage PrependMagickMethod(MorphologyImage) +#define MotionBlurImage PrependMagickMethod(MotionBlurImage) +#define MSBOrderLong PrependMagickMethod(MSBOrderLong) +#define MSBOrderShort PrependMagickMethod(MSBOrderShort) +#define MultilineCensus PrependMagickMethod(MultilineCensus) +#define NegateImage PrependMagickMethod(NegateImage) +#define NewImageList PrependMagickMethod(NewImageList) +#define NewImageView PrependMagickMethod(NewImageView) +#define NewImageViewRegion PrependMagickMethod(NewImageViewRegion) +#define NewLinkedList PrependMagickMethod(NewLinkedList) +#define NewMagickImage PrependMagickMethod(NewMagickImage) +#define NewSplayTree PrependMagickMethod(NewSplayTree) +#define NewXMLTree PrependMagickMethod(NewXMLTree) +#define NewXMLTreeTag PrependMagickMethod(NewXMLTreeTag) +#define NormalizeImage PrependMagickMethod(NormalizeImage) +#define NullMatrix PrependMagickMethod(NullMatrix) +#define OilPaintImage PrependMagickMethod(OilPaintImage) +#define OpaquePaintImage PrependMagickMethod(OpaquePaintImage) +#define OpenBlob PrependMagickMethod(OpenBlob) +#define OpenDistributePixelCache PrependMagickMethod(OpenDistributePixelCache) +#define OpenStream PrependMagickMethod(OpenStream) +#define OptimizeImageLayers PrependMagickMethod(OptimizeImageLayers) +#define OptimizeImageTransparency PrependMagickMethod(OptimizeImageTransparency) +#define OptimizePlusImageLayers PrependMagickMethod(OptimizePlusImageLayers) +#define OrderedDitherImage PrependMagickMethod(OrderedDitherImage) +#define PackbitsEncodeImage PrependMagickMethod(PackbitsEncodeImage) +#define ParseAbsoluteGeometry PrependMagickMethod(ParseAbsoluteGeometry) +#define ParseAffineGeometry PrependMagickMethod(ParseAffineGeometry) +#define ParseChannelOption PrependMagickMethod(ParseChannelOption) +#define ParseCommandOption PrependMagickMethod(ParseCommandOption) +#define ParseGeometry PrependMagickMethod(ParseGeometry) +#define ParseGravityGeometry PrependMagickMethod(ParseGravityGeometry) +#define ParseMetaGeometry PrependMagickMethod(ParseMetaGeometry) +#define ParsePageGeometry PrependMagickMethod(ParsePageGeometry) +#define ParsePixelChannelOption PrependMagickMethod(ParsePixelChannelOption) +#define ParseRegionGeometry PrependMagickMethod(ParseRegionGeometry) +#define PasskeyDecipherImage PrependMagickMethod(PasskeyDecipherImage) +#define PasskeyEncipherImage PrependMagickMethod(PasskeyEncipherImage) +#define PerceptibleImage PrependMagickMethod(PerceptibleImage) +#define PersistPixelCache PrependMagickMethod(PersistPixelCache) +#define PingBlob PrependMagickMethod(PingBlob) +#define PingImage PrependMagickMethod(PingImage) +#define PingImages PrependMagickMethod(PingImages) +#define PlasmaImage PrependMagickMethod(PlasmaImage) +#define PolaroidImage PrependMagickMethod(PolaroidImage) +#define PolicyComponentGenesis PrependMagickMethod(PolicyComponentGenesis) +#define PolicyComponentTerminus PrependMagickMethod(PolicyComponentTerminus) +#define PolynomialImage PrependMagickMethod(PolynomialImage) +#define PosterizeImage PrependMagickMethod(PosterizeImage) +#define PrependImageToList PrependMagickMethod(PrependImageToList) +#define PreviewImage PrependMagickMethod(PreviewImage) +#define PrintStringInfo PrependMagickMethod(PrintStringInfo) +#define process_message PrependMagickMethod(process_message) +#define ProfileImage PrependMagickMethod(ProfileImage) +#define PruneTagFromXMLTree PrependMagickMethod(PruneTagFromXMLTree) +#define QuantizeImage PrependMagickMethod(QuantizeImage) +#define QuantizeImages PrependMagickMethod(QuantizeImages) +#define QueryColorCompliance PrependMagickMethod(QueryColorCompliance) +#define QueryColorname PrependMagickMethod(QueryColorname) +#define QueueAuthenticPixelCacheNexus PrependMagickMethod(QueueAuthenticPixelCacheNexus) +#define QueueAuthenticPixels PrependMagickMethod(QueueAuthenticPixels) +#define QueueCacheViewAuthenticPixels PrependMagickMethod(QueueCacheViewAuthenticPixels) +#define RaiseImage PrependMagickMethod(RaiseImage) +#define RandomComponentGenesis PrependMagickMethod(RandomComponentGenesis) +#define RandomComponentTerminus PrependMagickMethod(RandomComponentTerminus) +#define RandomThresholdImage PrependMagickMethod(RandomThresholdImage) +#define RangeThresholdImage PrependMagickMethod(RangeThresholdImage) +#define ReadBlobByte PrependMagickMethod(ReadBlobByte) +#define ReadBlobDouble PrependMagickMethod(ReadBlobDouble) +#define ReadBlobFloat PrependMagickMethod(ReadBlobFloat) +#define ReadBlobLongLong PrependMagickMethod(ReadBlobLongLong) +#define ReadBlobLong PrependMagickMethod(ReadBlobLong) +#define ReadBlobLSBLong PrependMagickMethod(ReadBlobLSBLong) +#define ReadBlobLSBShort PrependMagickMethod(ReadBlobLSBShort) +#define ReadBlobLSBSignedLong PrependMagickMethod(ReadBlobLSBSignedLong) +#define ReadBlobLSBSignedShort PrependMagickMethod(ReadBlobLSBSignedShort) +#define ReadBlobMSBLongLong PrependMagickMethod(ReadBlobMSBLongLong) +#define ReadBlobMSBLong PrependMagickMethod(ReadBlobMSBLong) +#define ReadBlobMSBShort PrependMagickMethod(ReadBlobMSBShort) +#define ReadBlobMSBSignedLong PrependMagickMethod(ReadBlobMSBSignedLong) +#define ReadBlobMSBSignedShort PrependMagickMethod(ReadBlobMSBSignedShort) +#define ReadBlob PrependMagickMethod(ReadBlob) +#define ReadBlobShort PrependMagickMethod(ReadBlobShort) +#define ReadBlobSignedLong PrependMagickMethod(ReadBlobSignedLong) +#define ReadBlobSignedShort PrependMagickMethod(ReadBlobSignedShort) +#define ReadBlobStream PrependMagickMethod(ReadBlobStream) +#define ReadBlobString PrependMagickMethod(ReadBlobString) +#define ReadDistributePixelCacheMetacontent PrependMagickMethod(ReadDistributePixelCacheMetacontent) +#define ReadDistributePixelCachePixels PrependMagickMethod(ReadDistributePixelCachePixels) +#define ReadImage PrependMagickMethod(ReadImage) +#define ReadImages PrependMagickMethod(ReadImages) +#define ReadInlineImage PrependMagickMethod(ReadInlineImage) +#define ReadPSDLayers PrependMagickMethod(ReadPSDLayers) +#define ReadStream PrependMagickMethod(ReadStream) +#define ReferenceBlob PrependMagickMethod(ReferenceBlob) +#define ReferenceImage PrependMagickMethod(ReferenceImage) +#define ReferencePixelCache PrependMagickMethod(ReferencePixelCache) +#define RegisterAAIImage PrependMagickMethod(RegisterAAIImage) +#define RegisterARTImage PrependMagickMethod(RegisterARTImage) +#define RegisterASHLARImage PrependMagickMethod(RegisterASHLARImage) +#define RegisterAVSImage PrependMagickMethod(RegisterAVSImage) +#define RegisterBAYERImage PrependMagickMethod(RegisterBAYERImage) +#define RegisterBGRImage PrependMagickMethod(RegisterBGRImage) +#define RegisterBMPImage PrependMagickMethod(RegisterBMPImage) +#define RegisterBRAILLEImage PrependMagickMethod(RegisterBRAILLEImage) +#define RegisterCALSImage PrependMagickMethod(RegisterCALSImage) +#define RegisterCAPTIONImage PrependMagickMethod(RegisterCAPTIONImage) +#define RegisterCINImage PrependMagickMethod(RegisterCINImage) +#define RegisterCIPImage PrependMagickMethod(RegisterCIPImage) +#define RegisterCLIPImage PrependMagickMethod(RegisterCLIPImage) +#define RegisterCMYKImage PrependMagickMethod(RegisterCMYKImage) +#define RegisterCUBEImage PrependMagickMethod(RegisterCUBEImage) +#define RegisterCUTImage PrependMagickMethod(RegisterCUTImage) +#define RegisterDCMImage PrependMagickMethod(RegisterDCMImage) +#define RegisterDDSImage PrependMagickMethod(RegisterDDSImage) +#define RegisterDEBUGImage PrependMagickMethod(RegisterDEBUGImage) +#define RegisterDIBImage PrependMagickMethod(RegisterDIBImage) +#define RegisterDJVUImage PrependMagickMethod(RegisterDJVUImage) +#define RegisterDNGImage PrependMagickMethod(RegisterDNGImage) +#define RegisterDOTImage PrependMagickMethod(RegisterDOTImage) +#define RegisterDPXImage PrependMagickMethod(RegisterDPXImage) +#define RegisterEPTImage PrependMagickMethod(RegisterEPTImage) +#define RegisterEXRImage PrependMagickMethod(RegisterEXRImage) +#define RegisterFARBFELDImage PrependMagickMethod(RegisterFARBFELDImage) +#define RegisterFAXImage PrependMagickMethod(RegisterFAXImage) +#define RegisterFITSImage PrependMagickMethod(RegisterFITSImage) +#define RegisterFL32Image PrependMagickMethod(RegisterFL32Image) +#define RegisterFTXTImage PrependMagickMethod(RegisterFTXTImage) +#define RegisterGIFImage PrependMagickMethod(RegisterGIFImage) +#define RegisterGRADIENTImage PrependMagickMethod(RegisterGRADIENTImage) +#define RegisterGRAYImage PrependMagickMethod(RegisterGRAYImage) +#define RegisterHALDImage PrependMagickMethod(RegisterHALDImage) +#define RegisterHDRImage PrependMagickMethod(RegisterHDRImage) +#define RegisterHEICImage PrependMagickMethod(RegisterHEICImage) +#define RegisterHISTOGRAMImage PrependMagickMethod(RegisterHISTOGRAMImage) +#define RegisterHRZImage PrependMagickMethod(RegisterHRZImage) +#define RegisterHTMLImage PrependMagickMethod(RegisterHTMLImage) +#define RegisterICONImage PrependMagickMethod(RegisterICONImage) +#define RegisterINFOImage PrependMagickMethod(RegisterINFOImage) +#define RegisterINLINEImage PrependMagickMethod(RegisterINLINEImage) +#define RegisterIPLImage PrependMagickMethod(RegisterIPLImage) +#define RegisterJBIGImage PrependMagickMethod(RegisterJBIGImage) +#define RegisterJNXImage PrependMagickMethod(RegisterJNXImage) +#define RegisterJP2Image PrependMagickMethod(RegisterJP2Image) +#define RegisterJPEGImage PrependMagickMethod(RegisterJPEGImage) +#define RegisterJSONImage PrependMagickMethod(RegisterJSONImage) +#define RegisterJXLImage PrependMagickMethod(RegisterJXLImage) +#define RegisterKERNELImage PrependMagickMethod(RegisterKERNELImage) +#define RegisterLABELImage PrependMagickMethod(RegisterLABELImage) +#define RegisterMACImage PrependMagickMethod(RegisterMACImage) +#define RegisterMAGICKImage PrependMagickMethod(RegisterMAGICKImage) +#define RegisterMagickInfo PrependMagickMethod(RegisterMagickInfo) +#define RegisterMAPImage PrependMagickMethod(RegisterMAPImage) +#define RegisterMASKImage PrependMagickMethod(RegisterMASKImage) +#define RegisterMATImage PrependMagickMethod(RegisterMATImage) +#define RegisterMATTEImage PrependMagickMethod(RegisterMATTEImage) +#define RegisterMETAImage PrependMagickMethod(RegisterMETAImage) +#define RegisterMIFFImage PrependMagickMethod(RegisterMIFFImage) +#define RegisterMONOImage PrependMagickMethod(RegisterMONOImage) +#define RegisterMPCImage PrependMagickMethod(RegisterMPCImage) +#define RegisterMPRImage PrependMagickMethod(RegisterMPRImage) +#define RegisterMSLImage PrependMagickMethod(RegisterMSLImage) +#define RegisterMTVImage PrependMagickMethod(RegisterMTVImage) +#define RegisterMVGImage PrependMagickMethod(RegisterMVGImage) +#define RegisterNULLImage PrependMagickMethod(RegisterNULLImage) +#define RegisterORAImage PrependMagickMethod(RegisterORAImage) +#define RegisterOTBImage PrependMagickMethod(RegisterOTBImage) +#define RegisterPALMImage PrependMagickMethod(RegisterPALMImage) +#define RegisterPANGOImage PrependMagickMethod(RegisterPANGOImage) +#define RegisterPATTERNImage PrependMagickMethod(RegisterPATTERNImage) +#define RegisterPCDImage PrependMagickMethod(RegisterPCDImage) +#define RegisterPCLImage PrependMagickMethod(RegisterPCLImage) +#define RegisterPCXImage PrependMagickMethod(RegisterPCXImage) +#define RegisterPDBImage PrependMagickMethod(RegisterPDBImage) +#define RegisterPDFImage PrependMagickMethod(RegisterPDFImage) +#define RegisterPESImage PrependMagickMethod(RegisterPESImage) +#define RegisterPGXImage PrependMagickMethod(RegisterPGXImage) +#define RegisterPICTImage PrependMagickMethod(RegisterPICTImage) +#define RegisterPIXImage PrependMagickMethod(RegisterPIXImage) +#define RegisterPLASMAImage PrependMagickMethod(RegisterPLASMAImage) +#define RegisterPNGImage PrependMagickMethod(RegisterPNGImage) +#define RegisterPNMImage PrependMagickMethod(RegisterPNMImage) +#define RegisterPS2Image PrependMagickMethod(RegisterPS2Image) +#define RegisterPS3Image PrependMagickMethod(RegisterPS3Image) +#define RegisterPSDImage PrependMagickMethod(RegisterPSDImage) +#define RegisterPSImage PrependMagickMethod(RegisterPSImage) +#define RegisterPWPImage PrependMagickMethod(RegisterPWPImage) +#define RegisterQOIImage PrependMagickMethod(RegisterQOIImage) +#define RegisterRAWImage PrependMagickMethod(RegisterRAWImage) +#define RegisterRGBImage PrependMagickMethod(RegisterRGBImage) +#define RegisterRGFImage PrependMagickMethod(RegisterRGFImage) +#define RegisterRLAImage PrependMagickMethod(RegisterRLAImage) +#define RegisterRLEImage PrependMagickMethod(RegisterRLEImage) +#define RegisterSCREENSHOTImage PrependMagickMethod(RegisterSCREENSHOTImage) +#define RegisterSCRImage PrependMagickMethod(RegisterSCRImage) +#define RegisterSCTImage PrependMagickMethod(RegisterSCTImage) +#define RegisterSFWImage PrependMagickMethod(RegisterSFWImage) +#define RegisterSGIImage PrependMagickMethod(RegisterSGIImage) +#define RegisterSIXELImage PrependMagickMethod(RegisterSIXELImage) +#define RegisterStaticModule PrependMagickMethod(RegisterStaticModule) +#define RegisterStaticModules PrependMagickMethod(RegisterStaticModules) +#define RegisterSTEGANOImage PrependMagickMethod(RegisterSTEGANOImage) +#define RegisterSTRIMGImage PrependMagickMethod(RegisterSTRIMGImage) +#define RegisterSUNImage PrependMagickMethod(RegisterSUNImage) +#define RegisterSVGImage PrependMagickMethod(RegisterSVGImage) +#define RegisterTGAImage PrependMagickMethod(RegisterTGAImage) +#define RegisterTHUMBNAILImage PrependMagickMethod(RegisterTHUMBNAILImage) +#define RegisterTIFFImage PrependMagickMethod(RegisterTIFFImage) +#define RegisterTILEImage PrependMagickMethod(RegisterTILEImage) +#define RegisterTIM2Image PrependMagickMethod(RegisterTIM2Image) +#define RegisterTIMImage PrependMagickMethod(RegisterTIMImage) +#define RegisterTTFImage PrependMagickMethod(RegisterTTFImage) +#define RegisterTXTImage PrependMagickMethod(RegisterTXTImage) +#define RegisterUILImage PrependMagickMethod(RegisterUILImage) +#define RegisterUndefinedImage PrependMagickMethod(RegisterUndefinedImage) +#define RegisterURLImage PrependMagickMethod(RegisterURLImage) +#define RegisterUYVYImage PrependMagickMethod(RegisterUYVYImage) +#define RegisterVICARImage PrependMagickMethod(RegisterVICARImage) +#define RegisterVIDEOImage PrependMagickMethod(RegisterVIDEOImage) +#define RegisterVIDImage PrependMagickMethod(RegisterVIDImage) +#define RegisterVIFFImage PrependMagickMethod(RegisterVIFFImage) +#define RegisterVIPSImage PrependMagickMethod(RegisterVIPSImage) +#define RegisterWBMPImage PrependMagickMethod(RegisterWBMPImage) +#define RegisterWEBPImage PrependMagickMethod(RegisterWEBPImage) +#define RegisterWPGImage PrependMagickMethod(RegisterWPGImage) +#define RegisterXBMImage PrependMagickMethod(RegisterXBMImage) +#define RegisterXCFImage PrependMagickMethod(RegisterXCFImage) +#define RegisterXCImage PrependMagickMethod(RegisterXCImage) +#define RegisterXImage PrependMagickMethod(RegisterXImage) +#define RegisterXPMImage PrependMagickMethod(RegisterXPMImage) +#define RegisterXPSImage PrependMagickMethod(RegisterXPSImage) +#define RegisterXWDImage PrependMagickMethod(RegisterXWDImage) +#define RegisterYAMLImage PrependMagickMethod(RegisterYAMLImage) +#define RegisterYCBCRImage PrependMagickMethod(RegisterYCBCRImage) +#define RegisterYUVImage PrependMagickMethod(RegisterYUVImage) +#define RegistryComponentGenesis PrependMagickMethod(RegistryComponentGenesis) +#define RegistryComponentTerminus PrependMagickMethod(RegistryComponentTerminus) +#define RelinquishAlignedMemory PrependMagickMethod(RelinquishAlignedMemory) +#define RelinquishDistributePixelCache PrependMagickMethod(RelinquishDistributePixelCache) +#define RelinquishMagickMatrix PrependMagickMethod(RelinquishMagickMatrix) +#define RelinquishMagickMemory PrependMagickMethod(RelinquishMagickMemory) +#define RelinquishMagickResource PrependMagickMethod(RelinquishMagickResource) +#define RelinquishSemaphoreInfo PrependMagickMethod(RelinquishSemaphoreInfo) +#define RelinquishUniqueFileResource PrependMagickMethod(RelinquishUniqueFileResource) +#define RelinquishVirtualMemory PrependMagickMethod(RelinquishVirtualMemory) +#define RemapImage PrependMagickMethod(RemapImage) +#define RemapImages PrependMagickMethod(RemapImages) +#define RemoteDisplayCommand PrependMagickMethod(RemoteDisplayCommand) +#define RemoveDuplicateLayers PrependMagickMethod(RemoveDuplicateLayers) +#define RemoveElementByValueFromLinkedList PrependMagickMethod(RemoveElementByValueFromLinkedList) +#define RemoveElementFromLinkedList PrependMagickMethod(RemoveElementFromLinkedList) +#define RemoveFirstImageFromList PrependMagickMethod(RemoveFirstImageFromList) +#define RemoveImageArtifact PrependMagickMethod(RemoveImageArtifact) +#define RemoveImageFromList PrependMagickMethod(RemoveImageFromList) +#define RemoveImageOption PrependMagickMethod(RemoveImageOption) +#define RemoveImageProfile PrependMagickMethod(RemoveImageProfile) +#define RemoveImageProperty PrependMagickMethod(RemoveImageProperty) +#define RemoveImageRegistry PrependMagickMethod(RemoveImageRegistry) +#define RemoveLastElementFromLinkedList PrependMagickMethod(RemoveLastElementFromLinkedList) +#define RemoveLastImageFromList PrependMagickMethod(RemoveLastImageFromList) +#define RemoveNodeByValueFromSplayTree PrependMagickMethod(RemoveNodeByValueFromSplayTree) +#define RemoveNodeFromSplayTree PrependMagickMethod(RemoveNodeFromSplayTree) +#define RemoveZeroDelayLayers PrependMagickMethod(RemoveZeroDelayLayers) +#define ReplaceImageInList PrependMagickMethod(ReplaceImageInList) +#define ReplaceImageInListReturnLast PrependMagickMethod(ReplaceImageInListReturnLast) +#define ResampleImage PrependMagickMethod(ResampleImage) +#define ResamplePixelColor PrependMagickMethod(ResamplePixelColor) +#define ResetCacheAnonymousMemory PrependMagickMethod(ResetCacheAnonymousMemory) +#define ResetImageArtifactIterator PrependMagickMethod(ResetImageArtifactIterator) +#define ResetImageOptionIterator PrependMagickMethod(ResetImageOptionIterator) +#define ResetImageOptions PrependMagickMethod(ResetImageOptions) +#define ResetImagePage PrependMagickMethod(ResetImagePage) +#define ResetImagePixels PrependMagickMethod(ResetImagePixels) +#define ResetImageProfileIterator PrependMagickMethod(ResetImageProfileIterator) +#define ResetImagePropertyIterator PrependMagickMethod(ResetImagePropertyIterator) +#define ResetImageRegistryIterator PrependMagickMethod(ResetImageRegistryIterator) +#define ResetLinkedListIterator PrependMagickMethod(ResetLinkedListIterator) +#define ResetMagickMemory PrependMagickMethod(ResetMagickMemory) +#define ResetMagickPrecision PrependMagickMethod(ResetMagickPrecision) +#define ResetMaxMemoryRequest PrependMagickMethod(ResetMaxMemoryRequest) +#define ResetPixelCacheChannels PrependMagickMethod(ResetPixelCacheChannels) +#define ResetPixelCacheEpoch PrependMagickMethod(ResetPixelCacheEpoch) +#define ResetQuantumState PrependMagickMethod(ResetQuantumState) +#define ResetSplayTreeIterator PrependMagickMethod(ResetSplayTreeIterator) +#define ResetSplayTree PrependMagickMethod(ResetSplayTree) +#define ResetStreamAnonymousMemory PrependMagickMethod(ResetStreamAnonymousMemory) +#define ResetStringInfo PrependMagickMethod(ResetStringInfo) +#define ResetTimer PrependMagickMethod(ResetTimer) +#define ResetVirtualAnonymousMemory PrependMagickMethod(ResetVirtualAnonymousMemory) +#define ResizeImage PrependMagickMethod(ResizeImage) +#define ResizeMagickMemory PrependMagickMethod(ResizeMagickMemory) +#define ResizeQuantumMemory PrependMagickMethod(ResizeQuantumMemory) +#define ResourceComponentGenesis PrependMagickMethod(ResourceComponentGenesis) +#define ResourceComponentTerminus PrependMagickMethod(ResourceComponentTerminus) +#define ReverseImageList PrependMagickMethod(ReverseImageList) +#define RollImage PrependMagickMethod(RollImage) +#define RotateImage PrependMagickMethod(RotateImage) +#define RotationalBlurImage PrependMagickMethod(RotationalBlurImage) +#define SampleImage PrependMagickMethod(SampleImage) +#define SanitizeString PrependMagickMethod(SanitizeString) +#define ScaleGeometryKernelInfo PrependMagickMethod(ScaleGeometryKernelInfo) +#define ScaleImage PrependMagickMethod(ScaleImage) +#define ScaleKernelInfo PrependMagickMethod(ScaleKernelInfo) +#define ScaleResampleFilter PrependMagickMethod(ScaleResampleFilter) +#define SeekBlob PrependMagickMethod(SeekBlob) +#define SegmentImage PrependMagickMethod(SegmentImage) +#define SelectiveBlurImage PrependMagickMethod(SelectiveBlurImage) +#define SemaphoreComponentGenesis PrependMagickMethod(SemaphoreComponentGenesis) +#define SemaphoreComponentTerminus PrependMagickMethod(SemaphoreComponentTerminus) +#define SeparateImage PrependMagickMethod(SeparateImage) +#define SeparateImages PrependMagickMethod(SeparateImages) +#define SepiaToneImage PrependMagickMethod(SepiaToneImage) +#define SetBlobExempt PrependMagickMethod(SetBlobExempt) +#define SetBlobExtent PrependMagickMethod(SetBlobExtent) +#define SetCacheViewStorageClass PrependMagickMethod(SetCacheViewStorageClass) +#define SetCacheViewVirtualPixelMethod PrependMagickMethod(SetCacheViewVirtualPixelMethod) +#define SetClientName PrependMagickMethod(SetClientName) +#define SetClientPath PrependMagickMethod(SetClientPath) +#define SetCustomStreamData PrependMagickMethod(SetCustomStreamData) +#define SetCustomStreamReader PrependMagickMethod(SetCustomStreamReader) +#define SetCustomStreamSeeker PrependMagickMethod(SetCustomStreamSeeker) +#define SetCustomStreamTeller PrependMagickMethod(SetCustomStreamTeller) +#define SetCustomStreamWriter PrependMagickMethod(SetCustomStreamWriter) +#define SetErrorHandler PrependMagickMethod(SetErrorHandler) +#define SetFatalErrorHandler PrependMagickMethod(SetFatalErrorHandler) +#define SetGeometryInfo PrependMagickMethod(SetGeometryInfo) +#define SetGeometry PrependMagickMethod(SetGeometry) +#define SetHeadElementInLinkedList PrependMagickMethod(SetHeadElementInLinkedList) +#define SetImageAlphaChannel PrependMagickMethod(SetImageAlphaChannel) +#define SetImageAlpha PrependMagickMethod(SetImageAlpha) +#define SetImageArtifact PrependMagickMethod(SetImageArtifact) +#define SetImageBackgroundColor PrependMagickMethod(SetImageBackgroundColor) +#define SetImageChannelMask PrependMagickMethod(SetImageChannelMask) +#define SetImageColorMetric PrependMagickMethod(SetImageColorMetric) +#define SetImageColor PrependMagickMethod(SetImageColor) +#define SetImageColorspace PrependMagickMethod(SetImageColorspace) +#define SetImageDepth PrependMagickMethod(SetImageDepth) +#define SetImageExtent PrependMagickMethod(SetImageExtent) +#define SetImageGray PrependMagickMethod(SetImageGray) +#define SetImageInfoBlob PrependMagickMethod(SetImageInfoBlob) +#define SetImageInfoCustomStream PrependMagickMethod(SetImageInfoCustomStream) +#define SetImageInfoFile PrependMagickMethod(SetImageInfoFile) +#define SetImageInfo PrependMagickMethod(SetImageInfo) +#define SetImageInfoProgressMonitor PrependMagickMethod(SetImageInfoProgressMonitor) +#define SetImageMask PrependMagickMethod(SetImageMask) +#define SetImageMonochrome PrependMagickMethod(SetImageMonochrome) +#define SetImageOption PrependMagickMethod(SetImageOption) +#define SetImageProfile PrependMagickMethod(SetImageProfile) +#define SetImageProgressMonitor PrependMagickMethod(SetImageProgressMonitor) +#define SetImageProgress PrependMagickMethod(SetImageProgress) +#define SetImageProperty PrependMagickMethod(SetImageProperty) +#define SetImageRegionMask PrependMagickMethod(SetImageRegionMask) +#define SetImageRegistry PrependMagickMethod(SetImageRegistry) +#define SetImageStorageClass PrependMagickMethod(SetImageStorageClass) +#define SetImageType PrependMagickMethod(SetImageType) +#define SetImageViewDescription PrependMagickMethod(SetImageViewDescription) +#define SetImageViewIterator PrependMagickMethod(SetImageViewIterator) +#define SetImageVirtualPixelMethod PrependMagickMethod(SetImageVirtualPixelMethod) +#define SetLogEventMask PrependMagickMethod(SetLogEventMask) +#define SetLogFormat PrependMagickMethod(SetLogFormat) +#define SetLogMethod PrependMagickMethod(SetLogMethod) +#define SetLogName PrependMagickMethod(SetLogName) +#define SetMagickAlignedMemoryMethods PrependMagickMethod(SetMagickAlignedMemoryMethods) +#define SetMagickDatePrecision PrependMagickMethod(SetMagickDatePrecision) +#define SetMagickMemoryMethods PrependMagickMethod(SetMagickMemoryMethods) +#define SetMagickPrecision PrependMagickMethod(SetMagickPrecision) +#define SetMagickResourceLimit PrependMagickMethod(SetMagickResourceLimit) +#define SetMagickSecurityPolicy PrependMagickMethod(SetMagickSecurityPolicy) +#define SetMagickSecurityPolicyValue PrependMagickMethod(SetMagickSecurityPolicyValue) +#define SetMagickThreadValue PrependMagickMethod(SetMagickThreadValue) +#define SetMatrixElement PrependMagickMethod(SetMatrixElement) +#define SetOpenCLDeviceEnabled PrependMagickMethod(SetOpenCLDeviceEnabled) +#define SetOpenCLEnabled PrependMagickMethod(SetOpenCLEnabled) +#define SetOpenCLKernelProfileEnabled PrependMagickMethod(SetOpenCLKernelProfileEnabled) +#define SetPixelCacheMethods PrependMagickMethod(SetPixelCacheMethods) +#define SetPixelCacheVirtualMethod PrependMagickMethod(SetPixelCacheVirtualMethod) +#define SetPixelChannelMask PrependMagickMethod(SetPixelChannelMask) +#define SetPixelMetaChannels PrependMagickMethod(SetPixelMetaChannels) +#define SetQuantumAlphaType PrependMagickMethod(SetQuantumAlphaType) +#define SetQuantumDepth PrependMagickMethod(SetQuantumDepth) +#define SetQuantumEndian PrependMagickMethod(SetQuantumEndian) +#define SetQuantumFormat PrependMagickMethod(SetQuantumFormat) +#define SetQuantumImageType PrependMagickMethod(SetQuantumImageType) +#define SetQuantumMinIsWhite PrependMagickMethod(SetQuantumMinIsWhite) +#define SetQuantumPack PrependMagickMethod(SetQuantumPack) +#define SetQuantumPad PrependMagickMethod(SetQuantumPad) +#define SetQuantumQuantum PrependMagickMethod(SetQuantumQuantum) +#define SetQuantumScale PrependMagickMethod(SetQuantumScale) +#define SetRandomKey PrependMagickMethod(SetRandomKey) +#define SetRandomSecretKey PrependMagickMethod(SetRandomSecretKey) +#define SetRandomTrueRandom PrependMagickMethod(SetRandomTrueRandom) +#define SetResampleFilterInterpolateMethod PrependMagickMethod(SetResampleFilterInterpolateMethod) +#define SetResampleFilter PrependMagickMethod(SetResampleFilter) +#define SetResampleFilterVirtualPixelMethod PrependMagickMethod(SetResampleFilterVirtualPixelMethod) +#define SetSignatureDigest PrependMagickMethod(SetSignatureDigest) +#define SetStreamInfoClientData PrependMagickMethod(SetStreamInfoClientData) +#define SetStreamInfoMap PrependMagickMethod(SetStreamInfoMap) +#define SetStreamInfoStorageType PrependMagickMethod(SetStreamInfoStorageType) +#define SetStringInfoDatum PrependMagickMethod(SetStringInfoDatum) +#define SetStringInfoLength PrependMagickMethod(SetStringInfoLength) +#define SetStringInfoName PrependMagickMethod(SetStringInfoName) +#define SetStringInfoPath PrependMagickMethod(SetStringInfoPath) +#define SetStringInfo PrependMagickMethod(SetStringInfo) +#define SetWarningHandler PrependMagickMethod(SetWarningHandler) +#define SetXMLTreeAttribute PrependMagickMethod(SetXMLTreeAttribute) +#define SetXMLTreeContent PrependMagickMethod(SetXMLTreeContent) +#define ShadeImage PrependMagickMethod(ShadeImage) +#define ShadowImage PrependMagickMethod(ShadowImage) +#define SharpenImage PrependMagickMethod(SharpenImage) +#define ShaveImage PrependMagickMethod(ShaveImage) +#define ShearImage PrependMagickMethod(ShearImage) +#define ShearRotateImage PrependMagickMethod(ShearRotateImage) +#define ShowKernelInfo PrependMagickMethod(ShowKernelInfo) +#define ShredFile PrependMagickMethod(ShredFile) +#define ShredMagickMemory PrependMagickMethod(ShredMagickMemory) +#define SigmoidalContrastImage PrependMagickMethod(SigmoidalContrastImage) +#define SignatureImage PrependMagickMethod(SignatureImage) +#define SimilarityImage PrependMagickMethod(SimilarityImage) +#define SketchImage PrependMagickMethod(SketchImage) +#define SmushImages PrependMagickMethod(SmushImages) +#define SolarizeImage PrependMagickMethod(SolarizeImage) +#define SortColormapByIntensity PrependMagickMethod(SortColormapByIntensity) +#define SortImagePixels PrependMagickMethod(SortImagePixels) +#define SparseColorImage PrependMagickMethod(SparseColorImage) +#define SpliceImageIntoList PrependMagickMethod(SpliceImageIntoList) +#define SpliceImage PrependMagickMethod(SpliceImage) +#define SplitImageList PrependMagickMethod(SplitImageList) +#define SplitStringInfo PrependMagickMethod(SplitStringInfo) +#define SpreadImage PrependMagickMethod(SpreadImage) +#define StartTimer PrependMagickMethod(StartTimer) +#define StatisticImage PrependMagickMethod(StatisticImage) +#define SteganoImage PrependMagickMethod(SteganoImage) +#define StereoAnaglyphImage PrependMagickMethod(StereoAnaglyphImage) +#define StereoImage PrependMagickMethod(StereoImage) +#define StreamImage PrependMagickMethod(StreamImage) +#define StringInfoToDigest PrependMagickMethod(StringInfoToDigest) +#define StringInfoToHexString PrependMagickMethod(StringInfoToHexString) +#define StringInfoToString PrependMagickMethod(StringInfoToString) +#define StringToArgv PrependMagickMethod(StringToArgv) +#define StringToArrayOfDoubles PrependMagickMethod(StringToArrayOfDoubles) +#define StringToken PrependMagickMethod(StringToken) +#define StringToList PrependMagickMethod(StringToList) +#define StringToStringInfo PrependMagickMethod(StringToStringInfo) +#define StringToStrings PrependMagickMethod(StringToStrings) +#define StripImage PrependMagickMethod(StripImage) +#define StripMagickString PrependMagickMethod(StripMagickString) +#define StripString PrependMagickMethod(StripString) +#define SubstituteString PrependMagickMethod(SubstituteString) +#define SwirlImage PrependMagickMethod(SwirlImage) +#define SyncAuthenticPixelCacheNexus PrependMagickMethod(SyncAuthenticPixelCacheNexus) +#define SyncAuthenticPixels PrependMagickMethod(SyncAuthenticPixels) +#define SyncCacheViewAuthenticPixels PrependMagickMethod(SyncCacheViewAuthenticPixels) +#define SyncImageList PrependMagickMethod(SyncImageList) +#define SyncImagePixelCache PrependMagickMethod(SyncImagePixelCache) +#define SyncImage PrependMagickMethod(SyncImage) +#define SyncImageProfiles PrependMagickMethod(SyncImageProfiles) +#define SyncImageSettings PrependMagickMethod(SyncImageSettings) +#define SyncImagesSettings PrependMagickMethod(SyncImagesSettings) +#define SyncNextImageInList PrependMagickMethod(SyncNextImageInList) +#define TellBlob PrependMagickMethod(TellBlob) +#define TextureImage PrependMagickMethod(TextureImage) +#define ThrowMagickExceptionList PrependMagickMethod(ThrowMagickExceptionList) +#define ThrowMagickException PrependMagickMethod(ThrowMagickException) +#define ThumbnailImage PrependMagickMethod(ThumbnailImage) +#define TintImage PrependMagickMethod(TintImage) +#define Tokenizer PrependMagickMethod(Tokenizer) +#define TraceConvexHull PrependMagickMethod(TraceConvexHull) +#define TransferImageViewIterator PrependMagickMethod(TransferImageViewIterator) +#define TransformImageColorspace PrependMagickMethod(TransformImageColorspace) +#define TransformImage PrependMagickMethod(TransformImage) +#define TransparentPaintImageChroma PrependMagickMethod(TransparentPaintImageChroma) +#define TransparentPaintImage PrependMagickMethod(TransparentPaintImage) +#define TransposeImage PrependMagickMethod(TransposeImage) +#define TransverseImage PrependMagickMethod(TransverseImage) +#define TrimImage PrependMagickMethod(TrimImage) +#define TypeComponentGenesis PrependMagickMethod(TypeComponentGenesis) +#define TypeComponentTerminus PrependMagickMethod(TypeComponentTerminus) +#define UniqueImageColors PrependMagickMethod(UniqueImageColors) +#define UnityAddKernelInfo PrependMagickMethod(UnityAddKernelInfo) +#define UnlockSemaphoreInfo PrependMagickMethod(UnlockSemaphoreInfo) +#define UnmapBlob PrependMagickMethod(UnmapBlob) +#define UnregisterAAIImage PrependMagickMethod(UnregisterAAIImage) +#define UnregisterARTImage PrependMagickMethod(UnregisterARTImage) +#define UnregisterASHLARImage PrependMagickMethod(UnregisterASHLARImage) +#define UnregisterAVSImage PrependMagickMethod(UnregisterAVSImage) +#define UnregisterBAYERImage PrependMagickMethod(UnregisterBAYERImage) +#define UnregisterBGRImage PrependMagickMethod(UnregisterBGRImage) +#define UnregisterBMPImage PrependMagickMethod(UnregisterBMPImage) +#define UnregisterBRAILLEImage PrependMagickMethod(UnregisterBRAILLEImage) +#define UnregisterCALSImage PrependMagickMethod(UnregisterCALSImage) +#define UnregisterCAPTIONImage PrependMagickMethod(UnregisterCAPTIONImage) +#define UnregisterCINImage PrependMagickMethod(UnregisterCINImage) +#define UnregisterCIPImage PrependMagickMethod(UnregisterCIPImage) +#define UnregisterCLIPImage PrependMagickMethod(UnregisterCLIPImage) +#define UnregisterCMYKImage PrependMagickMethod(UnregisterCMYKImage) +#define UnregisterCUBEImage PrependMagickMethod(UnregisterCUBEImage) +#define UnregisterCUTImage PrependMagickMethod(UnregisterCUTImage) +#define UnregisterDCMImage PrependMagickMethod(UnregisterDCMImage) +#define UnregisterDDSImage PrependMagickMethod(UnregisterDDSImage) +#define UnregisterDEBUGImage PrependMagickMethod(UnregisterDEBUGImage) +#define UnregisterDIBImage PrependMagickMethod(UnregisterDIBImage) +#define UnregisterDJVUImage PrependMagickMethod(UnregisterDJVUImage) +#define UnregisterDNGImage PrependMagickMethod(UnregisterDNGImage) +#define UnregisterDOTImage PrependMagickMethod(UnregisterDOTImage) +#define UnregisterDPXImage PrependMagickMethod(UnregisterDPXImage) +#define UnregisterEPTImage PrependMagickMethod(UnregisterEPTImage) +#define UnregisterEXRImage PrependMagickMethod(UnregisterEXRImage) +#define UnregisterFARBFELDImage PrependMagickMethod(UnregisterFARBFELDImage) +#define UnregisterFAXImage PrependMagickMethod(UnregisterFAXImage) +#define UnregisterFITSImage PrependMagickMethod(UnregisterFITSImage) +#define UnregisterFL32Image PrependMagickMethod(UnregisterFL32Image) +#define UnregisterFTXTImage PrependMagickMethod(UnregisterFTXTImage) +#define UnregisterGIFImage PrependMagickMethod(UnregisterGIFImage) +#define UnregisterGRADIENTImage PrependMagickMethod(UnregisterGRADIENTImage) +#define UnregisterGRAYImage PrependMagickMethod(UnregisterGRAYImage) +#define UnregisterHALDImage PrependMagickMethod(UnregisterHALDImage) +#define UnregisterHDRImage PrependMagickMethod(UnregisterHDRImage) +#define UnregisterHEICImage PrependMagickMethod(UnregisterHEICImage) +#define UnregisterHISTOGRAMImage PrependMagickMethod(UnregisterHISTOGRAMImage) +#define UnregisterHRZImage PrependMagickMethod(UnregisterHRZImage) +#define UnregisterHTMLImage PrependMagickMethod(UnregisterHTMLImage) +#define UnregisterICONImage PrependMagickMethod(UnregisterICONImage) +#define UnregisterINFOImage PrependMagickMethod(UnregisterINFOImage) +#define UnregisterINLINEImage PrependMagickMethod(UnregisterINLINEImage) +#define UnregisterIPLImage PrependMagickMethod(UnregisterIPLImage) +#define UnregisterJBIGImage PrependMagickMethod(UnregisterJBIGImage) +#define UnregisterJNXImage PrependMagickMethod(UnregisterJNXImage) +#define UnregisterJP2Image PrependMagickMethod(UnregisterJP2Image) +#define UnregisterJPEGImage PrependMagickMethod(UnregisterJPEGImage) +#define UnregisterJSONImage PrependMagickMethod(UnregisterJSONImage) +#define UnregisterJXLImage PrependMagickMethod(UnregisterJXLImage) +#define UnregisterKERNELImage PrependMagickMethod(UnregisterKERNELImage) +#define UnregisterLABELImage PrependMagickMethod(UnregisterLABELImage) +#define UnregisterMACImage PrependMagickMethod(UnregisterMACImage) +#define UnregisterMAGICKImage PrependMagickMethod(UnregisterMAGICKImage) +#define UnregisterMagickInfo PrependMagickMethod(UnregisterMagickInfo) +#define UnregisterMAPImage PrependMagickMethod(UnregisterMAPImage) +#define UnregisterMASKImage PrependMagickMethod(UnregisterMASKImage) +#define UnregisterMATImage PrependMagickMethod(UnregisterMATImage) +#define UnregisterMATTEImage PrependMagickMethod(UnregisterMATTEImage) +#define UnregisterMETAImage PrependMagickMethod(UnregisterMETAImage) +#define UnregisterMIFFImage PrependMagickMethod(UnregisterMIFFImage) +#define UnregisterMONOImage PrependMagickMethod(UnregisterMONOImage) +#define UnregisterMPCImage PrependMagickMethod(UnregisterMPCImage) +#define UnregisterMPRImage PrependMagickMethod(UnregisterMPRImage) +#define UnregisterMSLImage PrependMagickMethod(UnregisterMSLImage) +#define UnregisterMTVImage PrependMagickMethod(UnregisterMTVImage) +#define UnregisterMVGImage PrependMagickMethod(UnregisterMVGImage) +#define UnregisterNULLImage PrependMagickMethod(UnregisterNULLImage) +#define UnregisterORAImage PrependMagickMethod(UnregisterORAImage) +#define UnregisterOTBImage PrependMagickMethod(UnregisterOTBImage) +#define UnregisterPALMImage PrependMagickMethod(UnregisterPALMImage) +#define UnregisterPANGOImage PrependMagickMethod(UnregisterPANGOImage) +#define UnregisterPATTERNImage PrependMagickMethod(UnregisterPATTERNImage) +#define UnregisterPCDImage PrependMagickMethod(UnregisterPCDImage) +#define UnregisterPCLImage PrependMagickMethod(UnregisterPCLImage) +#define UnregisterPCXImage PrependMagickMethod(UnregisterPCXImage) +#define UnregisterPDBImage PrependMagickMethod(UnregisterPDBImage) +#define UnregisterPDFImage PrependMagickMethod(UnregisterPDFImage) +#define UnregisterPESImage PrependMagickMethod(UnregisterPESImage) +#define UnregisterPGXImage PrependMagickMethod(UnregisterPGXImage) +#define UnregisterPICTImage PrependMagickMethod(UnregisterPICTImage) +#define UnregisterPIXImage PrependMagickMethod(UnregisterPIXImage) +#define UnregisterPLASMAImage PrependMagickMethod(UnregisterPLASMAImage) +#define UnregisterPNGImage PrependMagickMethod(UnregisterPNGImage) +#define UnregisterPNMImage PrependMagickMethod(UnregisterPNMImage) +#define UnregisterPS2Image PrependMagickMethod(UnregisterPS2Image) +#define UnregisterPS3Image PrependMagickMethod(UnregisterPS3Image) +#define UnregisterPSDImage PrependMagickMethod(UnregisterPSDImage) +#define UnregisterPSImage PrependMagickMethod(UnregisterPSImage) +#define UnregisterPWPImage PrependMagickMethod(UnregisterPWPImage) +#define UnregisterQOIImage PrependMagickMethod(UnregisterQOIImage) +#define UnregisterRAWImage PrependMagickMethod(UnregisterRAWImage) +#define UnregisterRGBImage PrependMagickMethod(UnregisterRGBImage) +#define UnregisterRGFImage PrependMagickMethod(UnregisterRGFImage) +#define UnregisterRLAImage PrependMagickMethod(UnregisterRLAImage) +#define UnregisterRLEImage PrependMagickMethod(UnregisterRLEImage) +#define UnregisterSCREENSHOTImage PrependMagickMethod(UnregisterSCREENSHOTImage) +#define UnregisterSCRImage PrependMagickMethod(UnregisterSCRImage) +#define UnregisterSCTImage PrependMagickMethod(UnregisterSCTImage) +#define UnregisterSFWImage PrependMagickMethod(UnregisterSFWImage) +#define UnregisterSGIImage PrependMagickMethod(UnregisterSGIImage) +#define UnregisterSIXELImage PrependMagickMethod(UnregisterSIXELImage) +#define UnregisterStaticModule PrependMagickMethod(UnregisterStaticModule) +#define UnregisterStaticModules PrependMagickMethod(UnregisterStaticModules) +#define UnregisterSTEGANOImage PrependMagickMethod(UnregisterSTEGANOImage) +#define UnregisterSTRIMGImage PrependMagickMethod(UnregisterSTRIMGImage) +#define UnregisterSUNImage PrependMagickMethod(UnregisterSUNImage) +#define UnregisterSVGImage PrependMagickMethod(UnregisterSVGImage) +#define UnregisterTGAImage PrependMagickMethod(UnregisterTGAImage) +#define UnregisterTHUMBNAILImage PrependMagickMethod(UnregisterTHUMBNAILImage) +#define UnregisterTIFFImage PrependMagickMethod(UnregisterTIFFImage) +#define UnregisterTILEImage PrependMagickMethod(UnregisterTILEImage) +#define UnregisterTIM2Image PrependMagickMethod(UnregisterTIM2Image) +#define UnregisterTIMImage PrependMagickMethod(UnregisterTIMImage) +#define UnregisterTTFImage PrependMagickMethod(UnregisterTTFImage) +#define UnregisterTXTImage PrependMagickMethod(UnregisterTXTImage) +#define UnregisterUILImage PrependMagickMethod(UnregisterUILImage) +#define UnregisterUndefinedImage PrependMagickMethod(UnregisterUndefinedImage) +#define UnregisterURLImage PrependMagickMethod(UnregisterURLImage) +#define UnregisterUYVYImage PrependMagickMethod(UnregisterUYVYImage) +#define UnregisterVICARImage PrependMagickMethod(UnregisterVICARImage) +#define UnregisterVIDEOImage PrependMagickMethod(UnregisterVIDEOImage) +#define UnregisterVIDImage PrependMagickMethod(UnregisterVIDImage) +#define UnregisterVIFFImage PrependMagickMethod(UnregisterVIFFImage) +#define UnregisterVIPSImage PrependMagickMethod(UnregisterVIPSImage) +#define UnregisterWBMPImage PrependMagickMethod(UnregisterWBMPImage) +#define UnregisterWEBPImage PrependMagickMethod(UnregisterWEBPImage) +#define UnregisterWPGImage PrependMagickMethod(UnregisterWPGImage) +#define UnregisterXBMImage PrependMagickMethod(UnregisterXBMImage) +#define UnregisterXCFImage PrependMagickMethod(UnregisterXCFImage) +#define UnregisterXCImage PrependMagickMethod(UnregisterXCImage) +#define UnregisterXImage PrependMagickMethod(UnregisterXImage) +#define UnregisterXPMImage PrependMagickMethod(UnregisterXPMImage) +#define UnregisterXPSImage PrependMagickMethod(UnregisterXPSImage) +#define UnregisterXWDImage PrependMagickMethod(UnregisterXWDImage) +#define UnregisterYAMLImage PrependMagickMethod(UnregisterYAMLImage) +#define UnregisterYCBCRImage PrependMagickMethod(UnregisterYCBCRImage) +#define UnregisterYUVImage PrependMagickMethod(UnregisterYUVImage) +#define UnsharpMaskImage PrependMagickMethod(UnsharpMaskImage) +#define Update8BIMClipPath PrependMagickMethod(Update8BIMClipPath) +#define UpdateImageViewIterator PrependMagickMethod(UpdateImageViewIterator) +#define UpdateSignature PrependMagickMethod(UpdateSignature) +#define VignetteImage PrependMagickMethod(VignetteImage) +#define WaveImage PrependMagickMethod(WaveImage) +#define WaveletDenoiseImage PrependMagickMethod(WaveletDenoiseImage) +#define WhiteBalanceImage PrependMagickMethod(WhiteBalanceImage) +#define WhiteThresholdImage PrependMagickMethod(WhiteThresholdImage) +#define WriteBlobByte PrependMagickMethod(WriteBlobByte) +#define WriteBlobFloat PrependMagickMethod(WriteBlobFloat) +#define WriteBlobLongLong PrependMagickMethod(WriteBlobLongLong) +#define WriteBlobLong PrependMagickMethod(WriteBlobLong) +#define WriteBlobLSBLong PrependMagickMethod(WriteBlobLSBLong) +#define WriteBlobLSBShort PrependMagickMethod(WriteBlobLSBShort) +#define WriteBlobLSBSignedLong PrependMagickMethod(WriteBlobLSBSignedLong) +#define WriteBlobLSBSignedShort PrependMagickMethod(WriteBlobLSBSignedShort) +#define WriteBlobMSBLong PrependMagickMethod(WriteBlobMSBLong) +#define WriteBlobMSBShort PrependMagickMethod(WriteBlobMSBShort) +#define WriteBlobMSBSignedShort PrependMagickMethod(WriteBlobMSBSignedShort) +#define WriteBlob PrependMagickMethod(WriteBlob) +#define WriteBlobShort PrependMagickMethod(WriteBlobShort) +#define WriteBlobSignedLong PrependMagickMethod(WriteBlobSignedLong) +#define WriteBlobString PrependMagickMethod(WriteBlobString) +#define WriteDistributePixelCacheMetacontent PrependMagickMethod(WriteDistributePixelCacheMetacontent) +#define WriteDistributePixelCachePixels PrependMagickMethod(WriteDistributePixelCachePixels) +#define WriteImage PrependMagickMethod(WriteImage) +#define WriteImages PrependMagickMethod(WriteImages) +#define WritePSDLayers PrependMagickMethod(WritePSDLayers) +#define WriteStream PrependMagickMethod(WriteStream) +#define XAnimateBackgroundImage PrependMagickMethod(XAnimateBackgroundImage) +#define XAnimateImages PrependMagickMethod(XAnimateImages) +#define XAnnotateImage PrependMagickMethod(XAnnotateImage) +#define XBestFont PrependMagickMethod(XBestFont) +#define XBestIconSize PrependMagickMethod(XBestIconSize) +#define XBestPixel PrependMagickMethod(XBestPixel) +#define XBestVisualInfo PrependMagickMethod(XBestVisualInfo) +#define XCheckDefineCursor PrependMagickMethod(XCheckDefineCursor) +#define XCheckRefreshWindows PrependMagickMethod(XCheckRefreshWindows) +#define XClientMessage PrependMagickMethod(XClientMessage) +#define XColorBrowserWidget PrependMagickMethod(XColorBrowserWidget) +#define XCommandWidget PrependMagickMethod(XCommandWidget) +#define XComponentGenesis PrependMagickMethod(XComponentGenesis) +#define XComponentTerminus PrependMagickMethod(XComponentTerminus) +#define XConfigureImageColormap PrependMagickMethod(XConfigureImageColormap) +#define XConfirmWidget PrependMagickMethod(XConfirmWidget) +#define XConstrainWindowPosition PrependMagickMethod(XConstrainWindowPosition) +#define XDelay PrependMagickMethod(XDelay) +#define XDestroyResourceInfo PrependMagickMethod(XDestroyResourceInfo) +#define XDestroyWindowColors PrependMagickMethod(XDestroyWindowColors) +#define XDialogWidget PrependMagickMethod(XDialogWidget) +#define XDisplayBackgroundImage PrependMagickMethod(XDisplayBackgroundImage) +#define XDisplayImageInfo PrependMagickMethod(XDisplayImageInfo) +#define XDisplayImage PrependMagickMethod(XDisplayImage) +#define XDrawImage PrependMagickMethod(XDrawImage) +#define XError PrependMagickMethod(XError) +#define XFileBrowserWidget PrependMagickMethod(XFileBrowserWidget) +#define XFontBrowserWidget PrependMagickMethod(XFontBrowserWidget) +#define XFreeResources PrependMagickMethod(XFreeResources) +#define XFreeStandardColormap PrependMagickMethod(XFreeStandardColormap) +#define XGetAnnotateInfo PrependMagickMethod(XGetAnnotateInfo) +#define XGetImportInfo PrependMagickMethod(XGetImportInfo) +#define XGetMapInfo PrependMagickMethod(XGetMapInfo) +#define XGetPixelInfo PrependMagickMethod(XGetPixelInfo) +#define XGetResourceClass PrependMagickMethod(XGetResourceClass) +#define XGetResourceDatabase PrependMagickMethod(XGetResourceDatabase) +#define XGetResourceInfo PrependMagickMethod(XGetResourceInfo) +#define XGetResourceInstance PrependMagickMethod(XGetResourceInstance) +#define XGetScreenDensity PrependMagickMethod(XGetScreenDensity) +#define XGetWindowColor PrependMagickMethod(XGetWindowColor) +#define XGetWindowInfo PrependMagickMethod(XGetWindowInfo) +#define XHighlightEllipse PrependMagickMethod(XHighlightEllipse) +#define XHighlightLine PrependMagickMethod(XHighlightLine) +#define XHighlightRectangle PrependMagickMethod(XHighlightRectangle) +#define XImportImage PrependMagickMethod(XImportImage) +#define XInfoWidget PrependMagickMethod(XInfoWidget) +#define XInitializeWindows PrependMagickMethod(XInitializeWindows) +#define XListBrowserWidget PrependMagickMethod(XListBrowserWidget) +#define XMagickProgressMonitor PrependMagickMethod(XMagickProgressMonitor) +#define XMakeCursor PrependMagickMethod(XMakeCursor) +#define XMakeImage PrependMagickMethod(XMakeImage) +#define XMakeMagnifyImage PrependMagickMethod(XMakeMagnifyImage) +#define XMakeStandardColormap PrependMagickMethod(XMakeStandardColormap) +#define XMakeWindow PrependMagickMethod(XMakeWindow) +#define XMenuWidget PrependMagickMethod(XMenuWidget) +#define XMLTreeInfoToXML PrependMagickMethod(XMLTreeInfoToXML) +#define XNoticeWidget PrependMagickMethod(XNoticeWidget) +#define XPreferencesWidget PrependMagickMethod(XPreferencesWidget) +#define XProgressMonitorWidget PrependMagickMethod(XProgressMonitorWidget) +#define XQueryColorCompliance PrependMagickMethod(XQueryColorCompliance) +#define XQueryPosition PrependMagickMethod(XQueryPosition) +#define XRefreshWindow PrependMagickMethod(XRefreshWindow) +#define XRemoteCommand PrependMagickMethod(XRemoteCommand) +#define XRenderImage PrependMagickMethod(XRenderImage) +#define XRetainWindowColors PrependMagickMethod(XRetainWindowColors) +#define XSetCursorState PrependMagickMethod(XSetCursorState) +#define XSetWindows PrependMagickMethod(XSetWindows) +#define XTextViewWidget PrependMagickMethod(XTextViewWidget) +#define XUserPreferences PrependMagickMethod(XUserPreferences) +#define XWarning PrependMagickMethod(XWarning) +#define XWindowByID PrependMagickMethod(XWindowByID) +#define XWindowByName PrependMagickMethod(XWindowByName) +#define XWindowByProperty PrependMagickMethod(XWindowByProperty) +#define ZeroKernelNans PrependMagickMethod(ZeroKernelNans) +#define ZLIBEncodeImage PrependMagickMethod(ZLIBEncodeImage) +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/mime.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/mime.h new file mode 100644 index 0000000000..39d01d9f1b --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/mime.h @@ -0,0 +1,48 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + The ImageMagick mime methods. +*/ +#ifndef MAGICKCORE_MIME_H +#define MAGICKCORE_MIME_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _MimeInfo + MimeInfo; + +extern MagickExport char + **GetMimeList(const char *,size_t *,ExceptionInfo *), + *MagickToMime(const char *); + +extern MagickExport const char + *GetMimeDescription(const MimeInfo *), + *GetMimeType(const MimeInfo *); + +extern MagickExport MagickBooleanType + ListMimeInfo(FILE *,ExceptionInfo *), + LoadMimeLists(const char *,ExceptionInfo *); + +extern MagickExport const MimeInfo + *GetMimeInfo(const char *,const unsigned char *,const size_t,ExceptionInfo *), + **GetMimeInfoList(const char *,size_t *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/module.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/module.h new file mode 100644 index 0000000000..fca26e8344 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/module.h @@ -0,0 +1,85 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore module methods. +*/ +#ifndef MAGICKCORE_MODULE_H +#define MAGICKCORE_MODULE_H + +#include "MagickCore/version.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#define MagickImageCoderSignature ((size_t) \ + (((MagickLibInterface) << 8) | MAGICKCORE_QUANTUM_DEPTH)) +#define MagickImageFilterSignature ((size_t) \ + (((MagickLibInterface) << 8) | MAGICKCORE_QUANTUM_DEPTH)) + +typedef enum +{ + MagickImageCoderModule, + MagickImageFilterModule +} MagickModuleType; + +typedef struct _ModuleInfo +{ + char + *path, + *tag; + + void + *handle, + (*unregister_module)(void); + + size_t + (*register_module)(void); + + time_t + timestamp; + + MagickBooleanType + stealth; + + size_t + signature; +} ModuleInfo; + +typedef size_t + ImageFilterHandler(Image **,const int,const char **,ExceptionInfo *); + +extern MagickExport char + **GetModuleList(const char *,const MagickModuleType,size_t *,ExceptionInfo *); + +extern MagickExport const ModuleInfo + **GetModuleInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + InvokeDynamicImageFilter(const char *,Image **,const int,const char **, + ExceptionInfo *), + ListModuleInfo(FILE *,ExceptionInfo *); + +extern MagickExport ModuleInfo + *GetModuleInfo(const char *,ExceptionInfo *); + +extern MagickExport void + DestroyModuleList(void); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/monitor.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/monitor.h new file mode 100644 index 0000000000..6fc59e5ca6 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/monitor.h @@ -0,0 +1,53 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore progress monitor methods. +*/ +#ifndef MAGICKCORE_MONITOR_H +#define MAGICKCORE_MONITOR_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef MagickBooleanType + (*MagickProgressMonitor)(const char *,const MagickOffsetType, + const MagickSizeType,void *); + +MagickExport MagickBooleanType + SetImageProgress(const Image *,const char *,const MagickOffsetType, + const MagickSizeType); + +MagickExport MagickProgressMonitor + SetImageProgressMonitor(Image *,const MagickProgressMonitor,void *), + SetImageInfoProgressMonitor(ImageInfo *,const MagickProgressMonitor,void *); + +static inline MagickBooleanType QuantumTick(const MagickOffsetType offset, + const MagickSizeType span) +{ + if (span <= 100) + return(MagickTrue); + if (offset == (MagickOffsetType) (span-1)) + return(MagickTrue); + if ((offset % (MagickOffsetType) (span/100)) == 0) + return(MagickTrue); + return(MagickFalse); +} + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/montage.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/montage.h new file mode 100644 index 0000000000..53c5b59458 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/montage.h @@ -0,0 +1,91 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore montage methods. +*/ +#ifndef MAGICKCORE_MONTAGE_H +#define MAGICKCORE_MONTAGE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedMode, + FrameMode, + UnframeMode, + ConcatenateMode +} MontageMode; + +typedef struct _MontageInfo +{ + char + *geometry, + *tile, + *title, + *frame, + *texture, + *font; + + double + pointsize; + + size_t + border_width; + + MagickBooleanType + shadow; + + PixelInfo + alpha_color, /* deprecated */ + background_color, + border_color, + fill, + stroke; + + GravityType + gravity; + + char + filename[MagickPathExtent]; + + MagickBooleanType + debug; + + size_t + signature; + + PixelInfo + matte_color; +} MontageInfo; + +extern MagickExport Image + *MontageImages(const Image *,const MontageInfo *,ExceptionInfo *), + *MontageImageList(const ImageInfo *,const MontageInfo *,const Image *, + ExceptionInfo *); + +extern MagickExport MontageInfo + *CloneMontageInfo(const ImageInfo *,const MontageInfo *), + *DestroyMontageInfo(MontageInfo *); + +extern MagickExport void + GetMontageInfo(const ImageInfo *,MontageInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/morphology.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/morphology.h new file mode 100644 index 0000000000..94908816d7 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/morphology.h @@ -0,0 +1,152 @@ +/* + Copyright @ 2010 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore morphology methods. +*/ +#ifndef MAGICKCORE_MORPHOLOGY_H +#define MAGICKCORE_MORPHOLOGY_H + +#include "MagickCore/geometry.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedKernel, /* equivalent to UnityKernel */ + UnityKernel, /* The no-op or 'original image' kernel */ + GaussianKernel, /* Convolution Kernels, Gaussian Based */ + DoGKernel, + LoGKernel, + BlurKernel, + CometKernel, + BinomialKernel, + LaplacianKernel, /* Convolution Kernels, by Name */ + SobelKernel, + FreiChenKernel, + RobertsKernel, + PrewittKernel, + CompassKernel, + KirschKernel, + DiamondKernel, /* Shape Kernels */ + SquareKernel, + RectangleKernel, + OctagonKernel, + DiskKernel, + PlusKernel, + CrossKernel, + RingKernel, + PeaksKernel, /* Hit And Miss Kernels */ + EdgesKernel, + CornersKernel, + DiagonalsKernel, + LineEndsKernel, + LineJunctionsKernel, + RidgesKernel, + ConvexHullKernel, + ThinSEKernel, + SkeletonKernel, + ChebyshevKernel, /* Distance Measuring Kernels */ + ManhattanKernel, + OctagonalKernel, + EuclideanKernel, + UserDefinedKernel /* User Specified Kernel Array */ +} KernelInfoType; + +typedef enum +{ + UndefinedMorphology, +/* Convolve / Correlate weighted sums */ + ConvolveMorphology, /* Weighted Sum with reflected kernel */ + CorrelateMorphology, /* Weighted Sum using a sliding window */ +/* Low-level Morphology methods */ + ErodeMorphology, /* Minimum Value in Neighbourhood */ + DilateMorphology, /* Maximum Value in Neighbourhood */ + ErodeIntensityMorphology, /* Pixel Pick using GreyScale Erode */ + DilateIntensityMorphology, /* Pixel Pick using GreyScale Dilate */ + IterativeDistanceMorphology, /* Add Kernel Value, take Minimum */ +/* Second-level Morphology methods */ + OpenMorphology, /* Dilate then Erode */ + CloseMorphology, /* Erode then Dilate */ + OpenIntensityMorphology, /* Pixel Pick using GreyScale Open */ + CloseIntensityMorphology, /* Pixel Pick using GreyScale Close */ + SmoothMorphology, /* Open then Close */ +/* Difference Morphology methods */ + EdgeInMorphology, /* Dilate difference from Original */ + EdgeOutMorphology, /* Erode difference from Original */ + EdgeMorphology, /* Dilate difference with Erode */ + TopHatMorphology, /* Close difference from Original */ + BottomHatMorphology, /* Open difference from Original */ +/* Recursive Morphology methods */ + HitAndMissMorphology, /* Foreground/Background pattern matching */ + ThinningMorphology, /* Remove matching pixels from image */ + ThickenMorphology, /* Add matching pixels from image */ +/* Directly Applied Morphology methods */ + DistanceMorphology, /* Add Kernel Value, take Minimum */ + VoronoiMorphology /* Distance matte channel copy nearest color */ +} MorphologyMethod; + +typedef struct _KernelInfo +{ + KernelInfoType + type; + + size_t + width, + height; + + ssize_t + x, + y; + + MagickRealType + *values; + + double + minimum, + maximum, + negative_range, + positive_range, + angle; + + struct _KernelInfo + *next; + + size_t + signature; +} KernelInfo; + +extern MagickExport KernelInfo + *AcquireKernelInfo(const char *,ExceptionInfo *), + *AcquireKernelBuiltIn(const KernelInfoType,const GeometryInfo *, + ExceptionInfo *), + *CloneKernelInfo(const KernelInfo *), + *DestroyKernelInfo(KernelInfo *); + +extern MagickExport Image + *MorphologyImage(const Image *,const MorphologyMethod,const ssize_t, + const KernelInfo *,ExceptionInfo *); + +extern MagickExport void + ScaleGeometryKernelInfo(KernelInfo *,const char *), + ScaleKernelInfo(KernelInfo *,const double,const GeometryFlags), + UnityAddKernelInfo(KernelInfo *,const double); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/nt-base.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/nt-base.h new file mode 100644 index 0000000000..f97daefb02 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/nt-base.h @@ -0,0 +1,105 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore Windows NT utility methods. +*/ +#ifndef MAGICKCORE_NT_BASE_H +#define MAGICKCORE_NT_BASE_H + +#include "MagickCore/exception.h" +#include "MagickCore/geometry.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if defined(MAGICKCORE_WINDOWS_SUPPORT) + +#define WIN32_LEAN_AND_MEAN +#define VC_EXTRALEAN +#if !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE 1 +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(_DEBUG) && !defined(__MINGW32__) +#include +#endif + +#define PROT_READ 0x01 +#define PROT_WRITE 0x02 +#define MAP_SHARED 0x01 +#define MAP_PRIVATE 0x02 +#define MAP_ANONYMOUS 0x20 +#define F_OK 0 +#define R_OK 4 +#define W_OK 2 +#define RW_OK 6 +#define _SC_PAGE_SIZE 1 +#define _SC_PHYS_PAGES 2 +#define _SC_OPEN_MAX 3 +#ifdef _WIN64 +# if !defined(SSIZE_MAX) +# define SSIZE_MAX LLONG_MAX +# endif +#else +# if !defined(SSIZE_MAX) +# define SSIZE_MAX LONG_MAX +# endif +#endif +#ifndef S_ISCHR +# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#endif + +#if defined(_MSC_VER) +# if !defined(MAGICKCORE_MSC_VER) +# if (_MSC_VER >= 1930) +# define MAGICKCORE_MSC_VER 2022 +# elif (_MSC_VER >= 1920) +# define MAGICKCORE_MSC_VER 2019 +# elif (_MSC_VER >= 1910) +# define MAGICKCORE_MSC_VER 2017 +# endif +# endif +#endif + +typedef struct _GhostInfo + GhostInfo_; + +extern MagickExport char + **NTArgvToUTF8(const int argc,wchar_t **); + +extern MagickExport const GhostInfo_ + *NTGhostscriptDLLVectors(void); + +extern MagickExport void + NTErrorHandler(const ExceptionType,const char *,const char *), + NTGhostscriptUnLoadDLL(void), + NTWarningHandler(const ExceptionType,const char *,const char *); + +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/opencl.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/opencl.h new file mode 100644 index 0000000000..16faa6ea3e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/opencl.h @@ -0,0 +1,78 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore OpenCL public methods. +*/ +#ifndef MAGICKCORE_OPENCL_H +#define MAGICKCORE_OPENCL_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedCLDeviceType, + CpuCLDeviceType, + GpuCLDeviceType +} MagickCLDeviceType; + +typedef struct _KernelProfileRecord +{ + char + *kernel_name; + + unsigned long + count, + max, + min, + total; +}* KernelProfileRecord; + +typedef struct _MagickCLDevice* MagickCLDevice; + +extern MagickExport const char + *GetOpenCLDeviceName(const MagickCLDevice), + *GetOpenCLDeviceVendorName(const MagickCLDevice), + *GetOpenCLDeviceVersion(const MagickCLDevice); + +extern MagickExport const KernelProfileRecord + *GetOpenCLKernelProfileRecords(const MagickCLDevice,size_t *); + +extern MagickExport double + GetOpenCLDeviceBenchmarkScore(const MagickCLDevice); + +extern MagickExport MagickCLDevice + *GetOpenCLDevices(size_t *,ExceptionInfo *); + +extern MagickExport MagickCLDeviceType + GetOpenCLDeviceType(const MagickCLDevice); + +extern MagickExport MagickBooleanType + GetOpenCLDeviceEnabled(const MagickCLDevice), + GetOpenCLEnabled(void), + SetOpenCLEnabled(const MagickBooleanType); + +extern MagickExport void + SetOpenCLDeviceEnabled(MagickCLDevice, + const MagickBooleanType), + SetOpenCLKernelProfileEnabled(MagickCLDevice, + const MagickBooleanType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/option.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/option.h new file mode 100644 index 0000000000..755da0d691 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/option.h @@ -0,0 +1,218 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore option methods. +*/ +#ifndef MAGICKCORE_OPTION_H +#define MAGICKCORE_OPTION_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + MagickUndefinedOptions = -1, + MagickAlignOptions = 0, + MagickAlphaChannelOptions, + MagickBooleanOptions, + MagickCacheOptions, + MagickChannelOptions, + MagickClassOptions, + MagickClipPathOptions, + MagickCoderOptions, + MagickColorOptions, + MagickColorspaceOptions, + MagickCommandOptions, + MagickComplexOptions, + MagickComplianceOptions, + MagickComposeOptions, + MagickCompressOptions, + MagickConfigureOptions, + MagickDataTypeOptions, + MagickDebugOptions, + MagickDecorateOptions, + MagickDelegateOptions, + MagickDirectionOptions, + MagickDisposeOptions, + MagickDistortOptions, + MagickDitherOptions, + MagickEndianOptions, + MagickEvaluateOptions, + MagickFillRuleOptions, + MagickFilterOptions, + MagickFontOptions, + MagickFontsOptions, + MagickFormatOptions, + MagickFunctionOptions, + MagickGradientOptions, + MagickGravityOptions, + MagickIntensityOptions, + MagickIntentOptions, + MagickInterlaceOptions, + MagickInterpolateOptions, + MagickKernelOptions, + MagickLayerOptions, + MagickLineCapOptions, + MagickLineJoinOptions, + MagickListOptions, + MagickLocaleOptions, + MagickLogEventOptions, + MagickLogOptions, + MagickMagicOptions, + MagickMethodOptions, + MagickMetricOptions, + MagickMimeOptions, + MagickModeOptions, + MagickModuleOptions, + MagickMorphologyOptions, + MagickNoiseOptions, + MagickOrientationOptions, + MagickPixelChannelOptions, + MagickPixelIntensityOptions, + MagickPixelMaskOptions, + MagickPixelTraitOptions, + MagickPolicyOptions, + MagickPolicyDomainOptions, + MagickPolicyRightsOptions, + MagickPreviewOptions, + MagickPrimitiveOptions, + MagickQuantumFormatOptions, + MagickResolutionOptions, + MagickResourceOptions, + MagickSparseColorOptions, + MagickStatisticOptions, + MagickStorageOptions, + MagickStretchOptions, + MagickStyleOptions, + MagickThresholdOptions, + MagickTypeOptions, + MagickValidateOptions, + MagickVirtualPixelOptions, + MagickWeightOptions, + MagickAutoThresholdOptions, + MagickToolOptions, + MagickCLIOptions, + MagickIlluminantOptions, + MagickWordBreakOptions, + MagickPagesizeOptions +} CommandOption; + +typedef enum +{ + UndefinedValidate, + NoValidate = 0x00000, + ColorspaceValidate = 0x00001, + CompareValidate = 0x00002, + CompositeValidate = 0x00004, + ConvertValidate = 0x00008, + FormatsDiskValidate = 0x00010, + FormatsMapValidate = 0x00020, + FormatsMemoryValidate = 0x00040, + IdentifyValidate = 0x00080, + ImportExportValidate = 0x00100, + MontageValidate = 0x00200, + StreamValidate = 0x00400, + MagickValidate = 0x00800, + AllValidate = 0x7fffffff +} ValidateType; + +/* + Flags to describe classes of image processing options. + These are used to determine how a option should be processed, and + avoid attempting to process all options in every way possible. +*/ +typedef enum +{ + UndefinedOptionFlag = 0x0000, /* option flag is not in use */ + + ImageInfoOptionFlag = 0x0001, /* Setting stored in ImageInfo */ + DrawInfoOptionFlag = 0x0002, /* Setting stored in DrawInfo */ + QuantizeInfoOptionFlag = 0x0004, /* Setting stored in QuantizeInfo */ + GlobalOptionFlag = 0x0008, /* Global Setting or Control */ + SettingOptionFlags = 0x000F, /* mask any setting option */ + + NoImageOperatorFlag = 0x0010, /* Images not required operator */ + SimpleOperatorFlag = 0x0020, /* Simple Image processing operator */ + ListOperatorFlag = 0x0040, /* Multi-Image processing operator */ + GenesisOptionFlag = 0x0080, /* MagickCommandGenesis() Only Option */ + + SpecialOptionFlag = 0x0100, /* Operator with Special Requirements */ + /* EG: for specific CLI commands */ + + AlwaysInterpretArgsFlag = 0x0400, /* Always Interpret escapes in Args */ + /* CF: "convert" compatibility mode */ + NeverInterpretArgsFlag = 0x0800, /* Never Interpret escapes in Args */ + /* EG: filename, or delayed escapes */ + + NonMagickOptionFlag = 0x1000, /* Option not used by Magick Command */ + FireOptionFlag = 0x2000, /* Convert operation seq firing point */ + DeprecateOptionFlag = 0x4000, /* Deprecate option (no code) */ + ReplacedOptionFlag = 0x8800 /* Replaced Option (but still works) */ + +} CommandOptionFlags; + +typedef struct _OptionInfo +{ + const char + *mnemonic; + + ssize_t + type, + flags; + + MagickBooleanType + stealth; +} OptionInfo; + + +extern MagickExport char + **GetCommandOptions(const CommandOption), + *GetNextImageOption(const ImageInfo *), + *RemoveImageOption(ImageInfo *,const char *); + +extern MagickExport const char + *CommandOptionToMnemonic(const CommandOption,const ssize_t), + *GetImageOption(const ImageInfo *,const char *); + +extern MagickExport MagickBooleanType + CloneImageOptions(ImageInfo *,const ImageInfo *), + DefineImageOption(ImageInfo *,const char *), + DeleteImageOption(ImageInfo *,const char *), + IsCommandOption(const char *), + IsOptionMember(const char *,const char *), + ListCommandOptions(FILE *,const CommandOption,ExceptionInfo *), + SetImageOption(ImageInfo *,const char *,const char *); + +extern MagickExport ssize_t + GetCommandOptionFlags(const CommandOption,const MagickBooleanType, + const char *), + ParseChannelOption(const char *), + ParsePixelChannelOption(const char *), + ParseCommandOption(const CommandOption,const MagickBooleanType,const char *); + +extern MagickExport void + DestroyImageOptions(ImageInfo *), + ResetImageOptions(const ImageInfo *), + ResetImageOptionIterator(const ImageInfo *); + +extern MagickExport const OptionInfo + *GetCommandOptionInfo(const char *value); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/paint.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/paint.h new file mode 100644 index 0000000000..624fcf02e6 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/paint.h @@ -0,0 +1,47 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image paint methods. +*/ +#ifndef MAGICKCORE_PAINT_H +#define MAGICKCORE_PAINT_H + +#include "MagickCore/color.h" +#include "MagickCore/draw.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport Image + *OilPaintImage(const Image *,const double,const double,ExceptionInfo *); + +extern MagickExport MagickBooleanType + FloodfillPaintImage(Image *,const DrawInfo *,const PixelInfo *,const ssize_t, + const ssize_t,const MagickBooleanType,ExceptionInfo *), + GradientImage(Image *,const GradientType,const SpreadMethod,const StopInfo *, + const size_t,ExceptionInfo *), + OpaquePaintImage(Image *,const PixelInfo *,const PixelInfo *, + const MagickBooleanType,ExceptionInfo *), + TransparentPaintImage(Image *,const PixelInfo *, + const Quantum,const MagickBooleanType,ExceptionInfo *), + TransparentPaintImageChroma(Image *,const PixelInfo *, + const PixelInfo *,const Quantum,const MagickBooleanType,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/pixel-accessor.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/pixel-accessor.h new file mode 100644 index 0000000000..f4f6ced5f0 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/pixel-accessor.h @@ -0,0 +1,968 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore pixel accessor methods. +*/ +#ifndef MAGICKCORE_PIXEL_ACCESSOR_H +#define MAGICKCORE_PIXEL_ACCESSOR_H + +#include "MagickCore/cache.h" +#include "MagickCore/cache-view.h" +#include "MagickCore/color.h" +#include "MagickCore/colorspace.h" +#include "MagickCore/gem.h" +#include "MagickCore/image.h" +#include "MagickCore/memory_.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#undef index + +static inline Quantum ClampPixel(const MagickRealType pixel) +{ + if (pixel < 0.0) + return((Quantum) 0); + if (pixel >= (MagickRealType) QuantumRange) + return((Quantum) QuantumRange); +#if !defined(MAGICKCORE_HDRI_SUPPORT) + return((Quantum) (pixel+0.5f)); +#else + return((Quantum) pixel); +#endif +} + +static inline Quantum GetPixela(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[aPixelChannel].offset]); +} + +static inline Quantum GetPixelAlpha(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + if (image->channel_map[AlphaPixelChannel].traits == UndefinedPixelTrait) + return(OpaqueAlpha); + return(pixel[image->channel_map[AlphaPixelChannel].offset]); +} + +static inline PixelTrait GetPixelAlphaTraits(const Image *magick_restrict image) +{ + return(image->channel_map[AlphaPixelChannel].traits); +} + +static inline Quantum GetPixelb(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[bPixelChannel].offset]); +} + +static inline Quantum GetPixelBlack(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + if (image->channel_map[BlackPixelChannel].traits == UndefinedPixelTrait) + return((Quantum) 0); + return(pixel[image->channel_map[BlackPixelChannel].offset]); +} + +static inline PixelTrait GetPixelBlackTraits(const Image *magick_restrict image) +{ + return(image->channel_map[BlackPixelChannel].traits); +} + +static inline Quantum GetPixelBlue(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[BluePixelChannel].offset]); +} + +static inline PixelTrait GetPixelBlueTraits(const Image *magick_restrict image) +{ + return(image->channel_map[BluePixelChannel].traits); +} + +static inline Quantum GetPixelCb(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[CbPixelChannel].offset]); +} + +static inline PixelTrait GetPixelCbTraits(const Image *magick_restrict image) +{ + return(image->channel_map[CbPixelChannel].traits); +} + +static inline Quantum GetPixelChannel(const Image *magick_restrict image, + const PixelChannel channel,const Quantum *magick_restrict pixel) +{ + if ((size_t) channel >= MaxPixelChannels) + return((Quantum) 0); + if (image->channel_map[channel].traits == UndefinedPixelTrait) + return((Quantum) 0); + return(pixel[image->channel_map[channel].offset]); +} + +static inline PixelChannel GetPixelChannelChannel( + const Image *magick_restrict image,const ssize_t offset) +{ + if ((offset < 0) || (offset >= MaxPixelChannels)) + return(UndefinedPixelChannel); + return(image->channel_map[offset].channel); +} + +static inline ssize_t GetPixelChannelOffset(const Image *magick_restrict image, + const PixelChannel channel) +{ + return(image->channel_map[channel].offset); +} + +static inline PixelTrait GetPixelChannelTraits( + const Image *magick_restrict image,const PixelChannel channel) +{ + if ((size_t) channel >= MaxPixelChannels) + return(UndefinedPixelTrait); + return(image->channel_map[channel].traits); +} + +static inline size_t GetPixelChannels(const Image *magick_restrict image) +{ + return(image->number_channels); +} + +static inline Quantum GetPixelCompositeMask( + const Image *magick_restrict image,const Quantum *magick_restrict pixel) +{ + if (image->channel_map[CompositeMaskPixelChannel].traits == UndefinedPixelTrait) + return((Quantum) QuantumRange); + return(pixel[image->channel_map[CompositeMaskPixelChannel].offset]); +} + +static inline PixelTrait GetPixelCompositeMaskTraits( + const Image *magick_restrict image) +{ + return(image->channel_map[CompositeMaskPixelChannel].traits); +} + +static inline Quantum GetPixelCr(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[CrPixelChannel].offset]); +} + +static inline PixelTrait GetPixelCrTraits(const Image *magick_restrict image) +{ + return(image->channel_map[CrPixelChannel].traits); +} + +static inline Quantum GetPixelCyan(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[CyanPixelChannel].offset]); +} + +static inline PixelTrait GetPixelCyanTraits(const Image *magick_restrict image) +{ + return(image->channel_map[CyanPixelChannel].traits); +} + +static inline Quantum GetPixelGray(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[GrayPixelChannel].offset]); +} + +static inline PixelTrait GetPixelGrayTraits(const Image *magick_restrict image) +{ + return(image->channel_map[GrayPixelChannel].traits); +} + +static inline Quantum GetPixelGreen(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[GreenPixelChannel].offset]); +} + +static inline PixelTrait GetPixelGreenTraits(const Image *magick_restrict image) +{ + return(image->channel_map[GreenPixelChannel].traits); +} + +static inline Quantum GetPixelIndex(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + if (image->channel_map[IndexPixelChannel].traits == UndefinedPixelTrait) + return((Quantum) 0); + return(pixel[image->channel_map[IndexPixelChannel].offset]); +} + +static inline PixelTrait GetPixelIndexTraits(const Image *magick_restrict image) +{ + return(image->channel_map[IndexPixelChannel].traits); +} + +static inline MagickRealType GetPixelInfoChannel( + const PixelInfo *magick_restrict pixel_info,const PixelChannel channel) +{ + switch (channel) + { + case RedPixelChannel: return(pixel_info->red); + case GreenPixelChannel: return(pixel_info->green); + case BluePixelChannel: return(pixel_info->blue); + case BlackPixelChannel: + { + if (pixel_info->colorspace != CMYKColorspace) + return(0.0); + return(pixel_info->black); + } + case AlphaPixelChannel: + { + if (pixel_info->alpha_trait == UndefinedPixelTrait) + return(OpaqueAlpha); + return(pixel_info->alpha); + } + case IndexPixelChannel: return(pixel_info->index); + default: break; + } + return((MagickRealType) 0.0); +} + +static inline double PerceptibleReciprocal(const double x) +{ + double + sign; + + /* + Return 1/x where x is perceptible (not unlimited or infinitesimal). + */ + sign=x < 0.0 ? -1.0 : 1.0; + if ((sign*x) >= MagickEpsilon) + return(1.0/x); + return(sign/MagickEpsilon); +} + +static inline MagickRealType GetPixelInfoLuma( + const PixelInfo *magick_restrict pixel) +{ + MagickRealType + intensity; + + if (pixel->colorspace == sRGBColorspace) + { + intensity=(MagickRealType) (0.212656*pixel->red+0.715158*pixel->green+ + 0.072186*pixel->blue); + return(intensity); + } + intensity=(MagickRealType) (0.212656*EncodePixelGamma(pixel->red)+ + 0.715158*EncodePixelGamma(pixel->green)+ + 0.072186*EncodePixelGamma(pixel->blue)); + return(intensity); +} + +static inline MagickRealType GetPixelInfoLuminance( + const PixelInfo *magick_restrict pixel) +{ + MagickRealType + intensity; + + if (pixel->colorspace != sRGBColorspace) + { + intensity=(MagickRealType) (0.212656*pixel->red+0.715158*pixel->green+ + 0.072186*pixel->blue); + return(intensity); + } + intensity=(MagickRealType) (0.212656*DecodePixelGamma(pixel->red)+ + 0.715158*DecodePixelGamma(pixel->green)+ + 0.072186*DecodePixelGamma(pixel->blue)); + return(intensity); +} + +static inline Quantum GetPixelL(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[LPixelChannel].offset]); +} + +static inline ssize_t GetPixelLabel(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return((ssize_t) pixel[image->channel_map[LabelPixelChannel].offset]); +} + +static inline MagickRealType GetPixelLuma( + const Image *magick_restrict image,const Quantum *magick_restrict pixel) +{ + MagickRealType + intensity; + + intensity= + 0.212656*(MagickRealType) pixel[image->channel_map[RedPixelChannel].offset]+ + 0.715158*(MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]+ + 0.072186*(MagickRealType) pixel[image->channel_map[BluePixelChannel].offset]; + return(intensity); +} + +static inline MagickRealType GetPixelLuminance( + const Image *magick_restrict image,const Quantum *magick_restrict pixel) +{ + MagickRealType + intensity; + + if (image->colorspace != sRGBColorspace) + { + intensity= + 0.212656*(MagickRealType) pixel[image->channel_map[RedPixelChannel].offset]+ + 0.715158*(MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]+ + 0.072186*(MagickRealType) pixel[image->channel_map[BluePixelChannel].offset]; + return(intensity); + } + intensity=(MagickRealType) (0.212656*DecodePixelGamma((MagickRealType) + pixel[image->channel_map[RedPixelChannel].offset])+0.715158* + DecodePixelGamma((MagickRealType) + pixel[image->channel_map[GreenPixelChannel].offset])+0.072186* + DecodePixelGamma((MagickRealType) + pixel[image->channel_map[BluePixelChannel].offset])); + return(intensity); +} + +static inline Quantum GetPixelMagenta(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[MagentaPixelChannel].offset]); +} + +static inline PixelTrait GetPixelMagentaTraits( + const Image *magick_restrict image) +{ + return(image->channel_map[MagentaPixelChannel].traits); +} + +static inline Quantum GetPixelMeta(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + if (image->channel_map[MetaPixelChannels].traits == UndefinedPixelTrait) + return(OpaqueAlpha); + return(pixel[image->channel_map[MetaPixelChannels].offset]); +} + +static inline PixelTrait GetPixelMetaTraits(const Image *magick_restrict image) +{ + return(image->channel_map[MetaPixelChannels].traits); +} + +static inline Quantum GetPixelReadMask(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + if (image->channel_map[ReadMaskPixelChannel].traits == UndefinedPixelTrait) + return((Quantum) QuantumRange); + return(pixel[image->channel_map[ReadMaskPixelChannel].offset]); +} + +static inline void GetPixelInfoRGBA(const Quantum red,const Quantum green, + const Quantum blue,const Quantum alpha,PixelInfo *magick_restrict pixel) +{ + GetPixelInfo((Image *) NULL,pixel); + pixel->red=red; + pixel->green=green; + pixel->blue=blue; + pixel->alpha=alpha; +} + +static inline Quantum GetPixelWriteMask( + const Image *magick_restrict image,const Quantum *magick_restrict pixel) +{ + if (image->channel_map[WriteMaskPixelChannel].traits == UndefinedPixelTrait) + return((Quantum) QuantumRange); + return(pixel[image->channel_map[WriteMaskPixelChannel].offset]); +} + +static inline PixelTrait GetPixelReadMaskTraits( + const Image *magick_restrict image) +{ + return(image->channel_map[ReadMaskPixelChannel].traits); +} + +static inline size_t GetPixelMetaChannels(const Image *magick_restrict image) +{ + return(image->number_meta_channels); +} + +static inline size_t GetPixelMetacontentExtent( + const Image *magick_restrict image) +{ + return(image->metacontent_extent); +} + +static inline Quantum GetPixelOpacity(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + if (image->channel_map[AlphaPixelChannel].traits != BlendPixelTrait) + return(QuantumRange-OpaqueAlpha); + return(QuantumRange-pixel[image->channel_map[AlphaPixelChannel].offset]); +} + +static inline Quantum GetPixelRed(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[RedPixelChannel].offset]); +} + +static inline PixelTrait GetPixelRedTraits(const Image *magick_restrict image) +{ + return(image->channel_map[RedPixelChannel].traits); +} + +static inline void GetPixelInfoPixel(const Image *magick_restrict image, + const Quantum *magick_restrict pixel,PixelInfo *magick_restrict pixel_info) +{ + (void) ResetMagickMemory(pixel_info,0,sizeof(*pixel_info)); + pixel_info->storage_class=DirectClass; + pixel_info->colorspace=sRGBColorspace; + pixel_info->depth=MAGICKCORE_QUANTUM_DEPTH; + pixel_info->alpha_trait=UndefinedPixelTrait; + pixel_info->alpha=(MagickRealType) OpaqueAlpha; + if (image != (Image *) NULL) + { + pixel_info->storage_class=image->storage_class; + pixel_info->colorspace=image->colorspace; + pixel_info->fuzz=image->fuzz; + pixel_info->depth=image->depth; + pixel_info->alpha_trait=image->alpha_trait; + if (pixel != (Quantum *) NULL) + { + pixel_info->red=(MagickRealType) + pixel[image->channel_map[RedPixelChannel].offset]; + pixel_info->green=(MagickRealType) + pixel[image->channel_map[GreenPixelChannel].offset]; + pixel_info->blue=(MagickRealType) + pixel[image->channel_map[BluePixelChannel].offset]; + if (image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait) + pixel_info->black=(MagickRealType) + pixel[image->channel_map[BlackPixelChannel].offset]; + if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait) + pixel_info->alpha=(MagickRealType) + pixel[image->channel_map[AlphaPixelChannel].offset]; + if (image->channel_map[IndexPixelChannel].traits != UndefinedPixelTrait) + pixel_info->index=(MagickRealType) + pixel[image->channel_map[IndexPixelChannel].offset]; + } + } +} + +static inline PixelTrait GetPixelTraits(const Image *magick_restrict image, + const PixelChannel channel) +{ + if ((size_t) channel >= MaxPixelChannels) + return(UndefinedPixelTrait); + return(image->channel_map[channel].traits); +} + +static inline PixelTrait GetPixelWriteMaskTraits( + const Image *magick_restrict image) +{ + return(image->channel_map[WriteMaskPixelChannel].traits); +} + +static inline Quantum GetPixelY(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[YPixelChannel].offset]); +} + +static inline PixelTrait GetPixelYTraits(const Image *magick_restrict image) +{ + return(image->channel_map[YPixelChannel].traits); +} + +static inline Quantum GetPixelYellow(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + return(pixel[image->channel_map[YellowPixelChannel].offset]); +} + +static inline PixelTrait GetPixelYellowTraits( + const Image *magick_restrict image) +{ + return(image->channel_map[YellowPixelChannel].traits); +} + +static inline MagickRealType AbsolutePixelValue(const MagickRealType x) +{ + return(x < 0.0 ? -x : x); +} + +static inline MagickBooleanType IsPixelAtDepth(const Quantum pixel, + const QuantumAny range) +{ + Quantum + quantum; + + if (range == 0) + return(MagickTrue); +#if !defined(MAGICKCORE_HDRI_SUPPORT) + quantum=(Quantum) (((double) QuantumRange*((QuantumAny) (((double) range* + pixel)/(double) QuantumRange+0.5)))/(double) range+0.5); +#else + quantum=(Quantum) (((double) QuantumRange*((QuantumAny) (((double) range* + (double) pixel)/(double) QuantumRange+0.5)))/(double) range); +#endif + return(pixel == quantum ? MagickTrue : MagickFalse); +} + +static inline MagickBooleanType IsPixelEquivalent( + const Image *magick_restrict image,const Quantum *magick_restrict p, + const PixelInfo *magick_restrict q) +{ + MagickRealType + alpha, + beta, + color; + + color=(MagickRealType) p[image->channel_map[AlphaPixelChannel].offset]; + alpha=image->alpha_trait == UndefinedPixelTrait ? (MagickRealType) + OpaqueAlpha : color; + beta=q->alpha_trait == UndefinedPixelTrait ? (MagickRealType) OpaqueAlpha : + q->alpha; + if (AbsolutePixelValue(alpha-beta) >= MagickEpsilon) + return(MagickFalse); + if ((AbsolutePixelValue(alpha-(MagickRealType) TransparentAlpha) < MagickEpsilon) || + (AbsolutePixelValue(beta-(MagickRealType) TransparentAlpha) < MagickEpsilon)) + return(MagickTrue); /* no color component if pixel is transparent */ + color=(MagickRealType) p[image->channel_map[RedPixelChannel].offset]; + if (AbsolutePixelValue(color-q->red) >= MagickEpsilon) + return(MagickFalse); + color=(MagickRealType) p[image->channel_map[GreenPixelChannel].offset]; + if (AbsolutePixelValue(color-q->green) >= MagickEpsilon) + return(MagickFalse); + color=(MagickRealType) p[image->channel_map[BluePixelChannel].offset]; + if (AbsolutePixelValue(color-q->blue) >= MagickEpsilon) + return(MagickFalse); + if (image->colorspace == CMYKColorspace) + { + color=(MagickRealType) p[image->channel_map[BlackPixelChannel].offset]; + if (AbsolutePixelValue(color-q->black) >= MagickEpsilon) + return(MagickFalse); + } + return(MagickTrue); +} + +static inline MagickBooleanType IsPixelGray(const Image *magick_restrict image, + const Quantum *magick_restrict pixel) +{ + MagickRealType + green_blue, + red_green; + + red_green= + (MagickRealType) pixel[image->channel_map[RedPixelChannel].offset]- + (MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]; + green_blue= + (MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]- + (MagickRealType) pixel[image->channel_map[BluePixelChannel].offset]; + if ((AbsolutePixelValue(red_green) < MagickEpsilon) && + (AbsolutePixelValue(green_blue) < MagickEpsilon)) + return(MagickTrue); + return(MagickFalse); +} + +static inline MagickBooleanType IsPixelInfoEquivalent( + const PixelInfo *magick_restrict p,const PixelInfo *magick_restrict q) +{ + MagickRealType + alpha, + beta; + + alpha=p->alpha_trait == UndefinedPixelTrait ? (MagickRealType) OpaqueAlpha : + p->alpha; + beta=q->alpha_trait == UndefinedPixelTrait ? (MagickRealType) OpaqueAlpha : + q->alpha; + if (AbsolutePixelValue(alpha-beta) >= MagickEpsilon) + return(MagickFalse); + if ((AbsolutePixelValue(alpha-(MagickRealType) TransparentAlpha) < MagickEpsilon) || + (AbsolutePixelValue(beta-(MagickRealType) TransparentAlpha) < MagickEpsilon)) + return(MagickTrue); /* no color component if pixel is transparent */ + if (AbsolutePixelValue(p->red-q->red) >= MagickEpsilon) + return(MagickFalse); + if (AbsolutePixelValue(p->green-q->green) >= MagickEpsilon) + return(MagickFalse); + if (AbsolutePixelValue(p->blue-q->blue) >= MagickEpsilon) + return(MagickFalse); + if (p->colorspace == CMYKColorspace) + { + if (AbsolutePixelValue(p->black-q->black) >= MagickEpsilon) + return(MagickFalse); + } + return(MagickTrue); +} + +static inline MagickBooleanType IsPixelMonochrome( + const Image *magick_restrict image,const Quantum *magick_restrict pixel) +{ + MagickRealType + green_blue, + red, + red_green; + + red=(MagickRealType) pixel[image->channel_map[RedPixelChannel].offset]; + if ((AbsolutePixelValue(red) >= MagickEpsilon) && + (AbsolutePixelValue(red-(MagickRealType) QuantumRange) >= MagickEpsilon)) + return(MagickFalse); + red_green= + (MagickRealType) pixel[image->channel_map[RedPixelChannel].offset]- + (MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]; + green_blue= + (MagickRealType) pixel[image->channel_map[GreenPixelChannel].offset]- + (MagickRealType) pixel[image->channel_map[BluePixelChannel].offset]; + if ((AbsolutePixelValue(red_green) < MagickEpsilon) && + (AbsolutePixelValue(green_blue) < MagickEpsilon)) + return(MagickTrue); + return(MagickFalse); +} + +static inline MagickBooleanType IsPixelInfoGray( + const PixelInfo *magick_restrict pixel) +{ + if ((AbsolutePixelValue(pixel->red-pixel->green) < MagickEpsilon) && + (AbsolutePixelValue(pixel->green-pixel->blue) < MagickEpsilon)) + return(MagickTrue); + return(MagickFalse); +} + +static inline MagickBooleanType IsPixelInfoMonochrome( + const PixelInfo *magick_restrict pixel_info) +{ + MagickRealType + green_blue, + red_green; + + if ((AbsolutePixelValue(pixel_info->red) >= MagickEpsilon) || + (AbsolutePixelValue(pixel_info->red-(MagickRealType) QuantumRange) >= MagickEpsilon)) + return(MagickFalse); + red_green=pixel_info->red-pixel_info->green; + green_blue=pixel_info->green-pixel_info->blue; + if ((AbsolutePixelValue(red_green) < MagickEpsilon) && + (AbsolutePixelValue(green_blue) < MagickEpsilon)) + return(MagickTrue); + return(MagickFalse); +} + +static inline void SetPixela(const Image *magick_restrict image, + const Quantum a,Quantum *magick_restrict pixel) +{ + if (image->channel_map[aPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[aPixelChannel].offset]=a; +} + +static inline void SetPixelAlpha(const Image *magick_restrict image, + const Quantum alpha,Quantum *magick_restrict pixel) +{ + if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[AlphaPixelChannel].offset]=alpha; +} + +static inline void SetPixelAlphaTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[AlphaPixelChannel].traits=traits; +} + +static inline void SetPixelb(const Image *magick_restrict image, + const Quantum b,Quantum *magick_restrict pixel) +{ + if (image->channel_map[bPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[bPixelChannel].offset]=b; +} + +static inline void SetPixelBackgroundColor(const Image *magick_restrict image, + Quantum *magick_restrict pixel) +{ + ssize_t + i; + + for (i=0; i < (ssize_t) GetPixelChannels(image); i++) + pixel[i]=(Quantum) 0; + pixel[image->channel_map[RedPixelChannel].offset]= + ClampToQuantum(image->background_color.red); + pixel[image->channel_map[GreenPixelChannel].offset]= + ClampToQuantum(image->background_color.green); + pixel[image->channel_map[BluePixelChannel].offset]= + ClampToQuantum(image->background_color.blue); + if (image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[BlackPixelChannel].offset]= + ClampToQuantum(image->background_color.black); + if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[AlphaPixelChannel].offset]= + image->background_color.alpha_trait == UndefinedPixelTrait ? OpaqueAlpha : + ClampToQuantum(image->background_color.alpha); +} + +static inline void SetPixelBackgoundColor(const Image *magick_restrict image, + Quantum *magick_restrict pixel) magick_attribute((deprecated)); + +static inline void SetPixelBackgoundColor(const Image *magick_restrict image, + Quantum *magick_restrict pixel) +{ + SetPixelBackgroundColor(image,pixel); +} + +static inline void SetPixelBlack(const Image *magick_restrict image, + const Quantum black,Quantum *magick_restrict pixel) +{ + if (image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[BlackPixelChannel].offset]=black; +} + +static inline void SetPixelBlackTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[BlackPixelChannel].traits=traits; +} + +static inline void SetPixelBlue(const Image *magick_restrict image, + const Quantum blue,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[BluePixelChannel].offset]=blue; +} + +static inline void SetPixelBlueTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[BluePixelChannel].traits=traits; +} + +static inline void SetPixelCb(const Image *magick_restrict image, + const Quantum cb,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[CbPixelChannel].offset]=cb; +} + +static inline void SetPixelCbTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[CbPixelChannel].traits=traits; +} + +static inline void SetPixelChannel(const Image *magick_restrict image, + const PixelChannel channel,const Quantum quantum, + Quantum *magick_restrict pixel) +{ + if ((size_t) channel >= MaxPixelChannels) + return; + if (image->channel_map[channel].traits != UndefinedPixelTrait) + pixel[image->channel_map[channel].offset]=quantum; +} + +static inline void SetPixelChannelAttributes( + const Image *magick_restrict image,const PixelChannel channel, + const PixelTrait traits,const ssize_t offset) +{ + if ((offset < 0) || (offset >= MaxPixelChannels)) + return; + if ((size_t) channel >= MaxPixelChannels) + return; + image->channel_map[offset].channel=channel; + image->channel_map[channel].offset=offset; + image->channel_map[channel].traits=traits; +} + +static inline void SetPixelChannelChannel(const Image *magick_restrict image, + const PixelChannel channel,const ssize_t offset) +{ + if ((offset < 0) || (offset >= MaxPixelChannels)) + return; + if ((size_t) channel >= MaxPixelChannels) + return; + image->channel_map[offset].channel=channel; + image->channel_map[channel].offset=offset; +} + +static inline void SetPixelChannels(Image *image,const size_t number_channels) +{ + image->number_channels=number_channels; +} + +static inline void SetPixelChannelTraits(Image *image, + const PixelChannel channel,const PixelTrait traits) +{ + if ((size_t) channel >= MaxPixelChannels) + return; + image->channel_map[channel].traits=traits; +} + +static inline void SetPixelCompositeMask(const Image *magick_restrict image, + const Quantum mask,Quantum *magick_restrict pixel) +{ + if (image->channel_map[CompositeMaskPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[CompositeMaskPixelChannel].offset]=mask; +} + +static inline void SetPixelCr(const Image *magick_restrict image, + const Quantum cr,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[CrPixelChannel].offset]=cr; +} + +static inline void SetPixelCrTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[CrPixelChannel].traits=traits; +} + +static inline void SetPixelCyan(const Image *magick_restrict image, + const Quantum cyan,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[CyanPixelChannel].offset]=cyan; +} + +static inline void SetPixelGray(const Image *magick_restrict image, + const Quantum gray,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[GrayPixelChannel].offset]=gray; +} + +static inline void SetPixelGrayTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[GrayPixelChannel].traits=traits; +} + +static inline void SetPixelGreen(const Image *magick_restrict image, + const Quantum green,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[GreenPixelChannel].offset]=green; +} + +static inline void SetPixelGreenTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[GreenPixelChannel].traits=traits; +} + +static inline void SetPixelIndex(const Image *magick_restrict image, + const Quantum index,Quantum *magick_restrict pixel) +{ + if (image->channel_map[IndexPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[IndexPixelChannel].offset]=index; +} + +static inline void SetPixelIndexTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[IndexPixelChannel].traits=traits; +} + +static inline void SetPixelViaPixelInfo(const Image *magick_restrict image, + const PixelInfo *magick_restrict pixel_info,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[RedPixelChannel].offset]= + ClampToQuantum(pixel_info->red); + pixel[image->channel_map[GreenPixelChannel].offset]= + ClampToQuantum(pixel_info->green); + pixel[image->channel_map[BluePixelChannel].offset]= + ClampToQuantum(pixel_info->blue); + if (image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[BlackPixelChannel].offset]= + ClampToQuantum(pixel_info->black); + if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[AlphaPixelChannel].offset]= + pixel_info->alpha_trait == UndefinedPixelTrait ? OpaqueAlpha : + ClampToQuantum(pixel_info->alpha); +} + +static inline void SetPixelL(const Image *magick_restrict image,const Quantum L, + Quantum *magick_restrict pixel) +{ + if (image->channel_map[LPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[LPixelChannel].offset]=L; +} + +static inline void SetPixelMagenta(const Image *magick_restrict image, + const Quantum magenta,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[MagentaPixelChannel].offset]=magenta; +} + +static inline void SetPixelMagentaTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[MagentaPixelChannel].traits=traits; +} + +static inline void SetPixelMeta(const Image *magick_restrict image, + const Quantum red,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[MetaPixelChannels].offset]=red; +} + +static inline void SetPixelMetaTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[MetaPixelChannels].traits=traits; +} + +static inline void SetPixelReadMask(const Image *magick_restrict image, + const Quantum mask,Quantum *magick_restrict pixel) +{ + if (image->channel_map[ReadMaskPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[ReadMaskPixelChannel].offset]=mask; +} + +static inline void SetPixelMetacontentExtent(Image *image,const size_t extent) +{ + image->metacontent_extent=extent; +} + +static inline void SetPixelOpacity(const Image *magick_restrict image, + const Quantum alpha,Quantum *magick_restrict pixel) +{ + if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[AlphaPixelChannel].offset]=QuantumRange-alpha; +} + +static inline void SetPixelRed(const Image *magick_restrict image, + const Quantum red,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[RedPixelChannel].offset]=red; +} + +static inline void SetPixelRedTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[RedPixelChannel].traits=traits; +} + +static inline void SetPixelWriteMask(const Image *magick_restrict image, + const Quantum mask,Quantum *magick_restrict pixel) +{ + if (image->channel_map[WriteMaskPixelChannel].traits != UndefinedPixelTrait) + pixel[image->channel_map[WriteMaskPixelChannel].offset]=mask; +} + +static inline void SetPixelYellow(const Image *magick_restrict image, + const Quantum yellow,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[YellowPixelChannel].offset]=yellow; +} + +static inline void SetPixelYellowTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[YellowPixelChannel].traits=traits; +} + +static inline void SetPixelY(const Image *magick_restrict image, + const Quantum y,Quantum *magick_restrict pixel) +{ + pixel[image->channel_map[YPixelChannel].offset]=y; +} + +static inline void SetPixelYTraits(Image *image,const PixelTrait traits) +{ + image->channel_map[YPixelChannel].traits=traits; +} + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/pixel.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/pixel.h new file mode 100644 index 0000000000..446029fff6 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/pixel.h @@ -0,0 +1,276 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image pixel methods. +*/ +#ifndef MAGICKCORE_PIXEL_H +#define MAGICKCORE_PIXEL_H + +#include "MagickCore/colorspace.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#define MaxPixelChannels 64 +#undef index + +/* + Pixel enum declarations. +*/ +#if defined(MAGICKCORE_64BIT_CHANNEL_MASK_SUPPORT) +typedef enum : MagickOffsetType +#else +typedef enum +#endif +{ + UndefinedChannel = 0x0000, + RedChannel = 0x0001, + GrayChannel = 0x0001, + CyanChannel = 0x0001, + LChannel = 0x0001, + GreenChannel = 0x0002, + MagentaChannel = 0x0002, + aChannel = 0x0002, + BlueChannel = 0x0004, + bChannel = 0x0002, + YellowChannel = 0x0004, + BlackChannel = 0x0008, + AlphaChannel = 0x0010, + OpacityChannel = 0x0010, + IndexChannel = 0x0020, /* Color Index Table? */ + ReadMaskChannel = 0x0040, /* Pixel is Not Readable? */ + WriteMaskChannel = 0x0080, /* Pixel is Write Protected? */ + MetaChannel = 0x0100, /* not used */ + CompositeMaskChannel = 0x0200, /* SVG mask */ + CompositeChannels = 0x001F, +#if defined(MAGICKCORE_64BIT_CHANNEL_MASK_SUPPORT) + AllChannels = MagickLLConstant(0x7FFFFFFFFFFFFFFF), +#else + AllChannels = 0X7FFFFFF, +#endif + /* + Special purpose channel types. + FUTURE: are these needed any more - they are more like hacks + SyncChannels for example is NOT a real channel but a 'flag' + It really says -- "User has not defined channels" + Though it does have extra meaning in the "-auto-level" operator + */ + TrueAlphaChannel = 0x0100, /* extract actual alpha channel from opacity */ + RGBChannels = 0x0200, /* set alpha from grayscale mask in RGB */ + GrayChannels = 0x0400, + SyncChannels = 0x20000, /* channels modified as a single unit */ + DefaultChannels = AllChannels +} ChannelType; /* must correspond to PixelChannel */ + +typedef enum +{ + UndefinedPixelChannel = 0, + RedPixelChannel = 0, + CyanPixelChannel = 0, + GrayPixelChannel = 0, + LPixelChannel = 0, + LabelPixelChannel = 0, + YPixelChannel = 0, + aPixelChannel = 1, + GreenPixelChannel = 1, + MagentaPixelChannel = 1, + CbPixelChannel = 1, + bPixelChannel = 2, + BluePixelChannel = 2, + YellowPixelChannel = 2, + CrPixelChannel = 2, + BlackPixelChannel = 3, + AlphaPixelChannel = 4, + IndexPixelChannel = 5, + ReadMaskPixelChannel = 6, + WriteMaskPixelChannel = 7, + MetaPixelChannel = 8, /* deprecated */ + CompositeMaskPixelChannel = 9, + MetaPixelChannels = 10, + IntensityPixelChannel = MaxPixelChannels, /* ???? */ + CompositePixelChannel = MaxPixelChannels, /* ???? */ + SyncPixelChannel = MaxPixelChannels+1 /* not a real channel */ +} PixelChannel; /* must correspond to ChannelType */ + +typedef enum +{ + UndefinedPixelIntensityMethod = 0, + AveragePixelIntensityMethod, + BrightnessPixelIntensityMethod, + LightnessPixelIntensityMethod, + MSPixelIntensityMethod, + Rec601LumaPixelIntensityMethod, + Rec601LuminancePixelIntensityMethod, + Rec709LumaPixelIntensityMethod, + Rec709LuminancePixelIntensityMethod, + RMSPixelIntensityMethod +} PixelIntensityMethod; + +typedef enum +{ + UndefinedInterpolatePixel, + AverageInterpolatePixel, /* Average 4 nearest neighbours */ + Average9InterpolatePixel, /* Average 9 nearest neighbours */ + Average16InterpolatePixel, /* Average 16 nearest neighbours */ + BackgroundInterpolatePixel, /* Just return background color */ + BilinearInterpolatePixel, /* Triangular filter interpolation */ + BlendInterpolatePixel, /* blend of nearest 1, 2 or 4 pixels */ + CatromInterpolatePixel, /* Catmull-Rom interpolation */ + IntegerInterpolatePixel, /* Integer (floor) interpolation */ + MeshInterpolatePixel, /* Triangular Mesh interpolation */ + NearestInterpolatePixel, /* Nearest Neighbour Only */ + SplineInterpolatePixel /* Cubic Spline (blurred) interpolation */ +} PixelInterpolateMethod; + +typedef enum +{ + UndefinedPixelMask = 0x000000, + ReadPixelMask = 0x000001, + WritePixelMask = 0x000002, + CompositePixelMask = 0x000004 +} PixelMask; + +typedef enum +{ + UndefinedPixelTrait = 0x000000, + CopyPixelTrait = 0x000001, + UpdatePixelTrait = 0x000002, + BlendPixelTrait = 0x000004 +} PixelTrait; + +typedef enum +{ + UndefinedPixel, + CharPixel, + DoublePixel, + FloatPixel, + LongPixel, + LongLongPixel, + QuantumPixel, + ShortPixel +} StorageType; + +/* + Pixel typedef declarations. +*/ +typedef struct _PixelChannelMap +{ + PixelChannel + channel; + + PixelTrait + traits; + + ssize_t + offset; +} PixelChannelMap; + +typedef struct _PixelInfo +{ + ClassType + storage_class; + + ColorspaceType + colorspace; + + PixelTrait + alpha_trait; + + double + fuzz; + + size_t + depth; + + MagickSizeType + count; + + MagickRealType + red, + green, + blue, + black, + alpha, + index; +} PixelInfo; + +typedef struct _PixelPacket +{ + unsigned int + red, + green, + blue, + alpha, + black; +} PixelPacket; + +typedef struct _CacheView + CacheView_; + +/* + Pixel method declarations. +*/ +extern MagickExport ChannelType + SetPixelChannelMask(Image *,const ChannelType); + +extern MagickExport MagickBooleanType + ExportImagePixels(const Image *,const ssize_t,const ssize_t,const size_t, + const size_t,const char *,const StorageType,void *,ExceptionInfo *), + ImportImagePixels(Image *,const ssize_t,const ssize_t,const size_t, + const size_t,const char *,const StorageType,const void *,ExceptionInfo *), + InterpolatePixelChannel(const Image *magick_restrict,const CacheView_ *, + const PixelChannel,const PixelInterpolateMethod,const double,const double, + double *,ExceptionInfo *), + InterpolatePixelChannels(const Image *magick_restrict,const CacheView_ *, + const Image * magick_restrict,const PixelInterpolateMethod,const double, + const double,Quantum *,ExceptionInfo *), + InterpolatePixelInfo(const Image *,const CacheView_ *, + const PixelInterpolateMethod,const double,const double,PixelInfo *, + ExceptionInfo *), + IsFuzzyEquivalencePixel(const Image *,const Quantum *,const Image *, + const Quantum *) magick_attribute((__pure__)), + IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *) + magick_attribute((__pure__)), + SetPixelMetaChannels(Image *,const size_t,ExceptionInfo *), + SortImagePixels(Image *,ExceptionInfo *); + +extern MagickExport MagickRealType + GetPixelInfoIntensity(const Image *magick_restrict, + const PixelInfo *magick_restrict) magick_hot_spot, + GetPixelIntensity(const Image *magick_restrict, + const Quantum *magick_restrict) magick_hot_spot; + +extern MagickExport PixelChannelMap + *AcquirePixelChannelMap(void), + *ClonePixelChannelMap(PixelChannelMap *), + *DestroyPixelChannelMap(PixelChannelMap *); + +extern MagickExport PixelInfo + *ClonePixelInfo(const PixelInfo *); + +extern MagickExport MagickRealType + DecodePixelGamma(const MagickRealType) magick_hot_spot, + EncodePixelGamma(const MagickRealType) magick_hot_spot; + +extern MagickExport void + ConformPixelInfo(Image *,const PixelInfo *,PixelInfo *,ExceptionInfo *), + GetPixelInfo(const Image *,PixelInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/policy.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/policy.h new file mode 100644 index 0000000000..fb0578d545 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/policy.h @@ -0,0 +1,72 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore security policy methods. +*/ +#ifndef MAGICKCORE_POLICY_H +#define MAGICKCORE_POLICY_H + +#include "MagickCore/pixel.h" +#include "MagickCore/exception.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedPolicyDomain, + CoderPolicyDomain, + DelegatePolicyDomain, + FilterPolicyDomain, + PathPolicyDomain, + ResourcePolicyDomain, + SystemPolicyDomain, + CachePolicyDomain, + ModulePolicyDomain +} PolicyDomain; + +typedef enum +{ + UndefinedPolicyRights = 0x00, + NoPolicyRights = 0x00, + ReadPolicyRights = 0x01, + WritePolicyRights = 0x02, + ExecutePolicyRights = 0x04, + AllPolicyRights = 0xff +} PolicyRights; + +typedef struct _PolicyInfo + PolicyInfo; + +extern MagickExport char + *GetPolicyValue(const char *), + **GetPolicyList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport const PolicyInfo + **GetPolicyInfoList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + IsRightsAuthorized(const PolicyDomain,const PolicyRights,const char *), + ListPolicyInfo(FILE *,ExceptionInfo *), + SetMagickSecurityPolicy(const char *,ExceptionInfo *), + SetMagickSecurityPolicyValue(const PolicyDomain,const char *,const char *, + ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/prepress.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/prepress.h new file mode 100644 index 0000000000..f64a19fd19 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/prepress.h @@ -0,0 +1,32 @@ +/* + Copyright @ 2001 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore prepress methods. +*/ +#ifndef MAGICKCORE_PREPRESS_H +#define MAGICKCORE_PREPRESS_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport double + GetImageTotalInkDensity(Image *image,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/profile.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/profile.h new file mode 100644 index 0000000000..9d7e61a34a --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/profile.h @@ -0,0 +1,61 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image profile methods. +*/ +#ifndef MAGICKCORE_PROFILE_H +#define MAGICKCORE_PROFILE_H + +#include "MagickCore/string_.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _ProfileInfo + ProfileInfo; + +typedef enum +{ + UndefinedIntent, + SaturationIntent, + PerceptualIntent, + AbsoluteIntent, + RelativeIntent +} RenderingIntent; + +extern MagickExport char + *GetNextImageProfile(const Image *); + +extern MagickExport const StringInfo + *GetImageProfile(const Image *,const char *); + +extern MagickExport MagickBooleanType + CloneImageProfiles(Image *,const Image *), + DeleteImageProfile(Image *,const char *), + ProfileImage(Image *,const char *,const void *,const size_t,ExceptionInfo *), + SetImageProfile(Image *,const char *,const StringInfo *,ExceptionInfo *); + +extern MagickExport StringInfo + *RemoveImageProfile(Image *,const char *); + +extern MagickExport void + DestroyImageProfiles(Image *), + ResetImageProfileIterator(const Image *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/property.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/property.h new file mode 100644 index 0000000000..a4c6caf313 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/property.h @@ -0,0 +1,51 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore property methods. +*/ +#ifndef MAGICKCORE_PROPERTY_H +#define MAGICKCORE_PROPERTY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport char + *InterpretImageProperties(ImageInfo *,Image *,const char *, + ExceptionInfo *), + *RemoveImageProperty(Image *,const char *); + +extern MagickExport const char + *GetNextImageProperty(const Image *), + *GetImageProperty(const Image *,const char *,ExceptionInfo *), + *GetMagickProperty(ImageInfo *,Image *,const char *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + CloneImageProperties(Image *,const Image *), + DefineImageProperty(Image *,const char *,ExceptionInfo *), + DeleteImageProperty(Image *,const char *), + FormatImageProperty(Image *,const char *,const char *,...) + magick_attribute((__format__ (__printf__,3,4))), + SetImageProperty(Image *,const char *,const char *,ExceptionInfo *); + +extern MagickExport void + DestroyImageProperties(Image *), + ResetImagePropertyIterator(const Image *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/quantize.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/quantize.h new file mode 100644 index 0000000000..54d113ec14 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/quantize.h @@ -0,0 +1,79 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image quantization methods. +*/ +#ifndef MAGICKCORE_QUANTIZE_H +#define MAGICKCORE_QUANTIZE_H + +#include "MagickCore/colorspace.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedDitherMethod, + NoDitherMethod, + RiemersmaDitherMethod, + FloydSteinbergDitherMethod +} DitherMethod; + +typedef struct _QuantizeInfo +{ + size_t + number_colors; /* desired maximum number of colors */ + + size_t + tree_depth; + + ColorspaceType + colorspace; + + DitherMethod + dither_method; + + MagickBooleanType + measure_error; + + size_t + signature; +} QuantizeInfo; + + +extern MagickExport MagickBooleanType + CompressImageColormap(Image *,ExceptionInfo *), + GetImageQuantizeError(Image *,ExceptionInfo *), + KmeansImage(Image *,const size_t,const size_t,const double,ExceptionInfo *), + PosterizeImage(Image *,const size_t,const DitherMethod,ExceptionInfo *), + QuantizeImage(const QuantizeInfo *,Image *,ExceptionInfo *), + QuantizeImages(const QuantizeInfo *,Image *,ExceptionInfo *), + RemapImage(const QuantizeInfo *,Image *,const Image *,ExceptionInfo *), + RemapImages(const QuantizeInfo *,Image *,const Image *,ExceptionInfo *); + +extern MagickExport QuantizeInfo + *AcquireQuantizeInfo(const ImageInfo *), + *CloneQuantizeInfo(const QuantizeInfo *), + *DestroyQuantizeInfo(QuantizeInfo *); + +extern MagickExport void + GetQuantizeInfo(QuantizeInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/quantum.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/quantum.h new file mode 100644 index 0000000000..10505d1f7c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/quantum.h @@ -0,0 +1,196 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore quantum inline methods. +*/ +#ifndef MAGICKCORE_QUANTUM_H +#define MAGICKCORE_QUANTUM_H + +#include +#include "MagickCore/image.h" +#include "MagickCore/semaphore.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedEndian, + LSBEndian, + MSBEndian +} EndianType; + +typedef enum +{ + UndefinedQuantumAlpha, + AssociatedQuantumAlpha, + DisassociatedQuantumAlpha +} QuantumAlphaType; + +typedef enum +{ + UndefinedQuantumFormat, + FloatingPointQuantumFormat, + SignedQuantumFormat, + UnsignedQuantumFormat +} QuantumFormatType; + +typedef enum +{ + UndefinedQuantum, + AlphaQuantum, + BGRAQuantum, + BGROQuantum, + BGRQuantum, + BlackQuantum, + BlueQuantum, + CbYCrAQuantum, + CbYCrQuantum, + CbYCrYQuantum, + CMYKAQuantum, + CMYKOQuantum, + CMYKQuantum, + CyanQuantum, + GrayAlphaQuantum, + GrayQuantum, + GreenQuantum, + IndexAlphaQuantum, + IndexQuantum, + MagentaQuantum, + OpacityQuantum, + RedQuantum, + RGBAQuantum, + RGBOQuantum, + RGBPadQuantum, + RGBQuantum, + YellowQuantum, + MultispectralQuantum +} QuantumType; + +typedef struct _QuantumInfo + QuantumInfo; + +static inline Quantum ClampToQuantum(const MagickRealType quantum) +{ +#if defined(MAGICKCORE_HDRI_SUPPORT) + return((Quantum) quantum); +#else + if ((IsNaN(quantum) != 0) || (quantum <= 0.0)) + return((Quantum) 0); + if (quantum >= (MagickRealType) QuantumRange) + return(QuantumRange); + return((Quantum) (quantum+0.5)); +#endif +} + +#if (MAGICKCORE_QUANTUM_DEPTH == 8) +static inline unsigned char ScaleQuantumToChar(const Quantum quantum) +{ +#if !defined(MAGICKCORE_HDRI_SUPPORT) + return((unsigned char) quantum); +#else + if ((IsNaN(quantum) != 0) || (quantum <= 0.0)) + return(0); + if (quantum >= 255.0) + return(255); + return((unsigned char) (quantum+0.5)); +#endif +} +#elif (MAGICKCORE_QUANTUM_DEPTH == 16) +static inline unsigned char ScaleQuantumToChar(const Quantum quantum) +{ +#if !defined(MAGICKCORE_HDRI_SUPPORT) + return((unsigned char) (((quantum+128UL)-((quantum+128UL) >> 8)) >> 8)); +#else + if ((IsNaN(quantum) != 0) || (quantum <= 0.0f)) + return(0); + if ((quantum/257.0f) >= 255.0f) + return(255); + return((unsigned char) (quantum/257.0f+0.5f)); +#endif +} +#elif (MAGICKCORE_QUANTUM_DEPTH == 32) +static inline unsigned char ScaleQuantumToChar(const Quantum quantum) +{ +#if !defined(MAGICKCORE_HDRI_SUPPORT) + return((unsigned char) ((quantum+MagickULLConstant(8421504))/ + MagickULLConstant(16843009))); +#else + if ((IsNaN(quantum) != 0) || (quantum <= 0.0)) + return(0); + if ((quantum/16843009.0) >= 255.0) + return(255); + return((unsigned char) (quantum/16843009.0+0.5)); +#endif +} +#elif (MAGICKCORE_QUANTUM_DEPTH == 64) +static inline unsigned char ScaleQuantumToChar(const Quantum quantum) +{ +#if !defined(MAGICKCORE_HDRI_SUPPORT) + return((unsigned char) (quantum/72340172838076673.0+0.5)); +#else + if ((IsNaN(quantum) != 0) || (quantum <= 0.0)) + return(0); + if ((quantum/72340172838076673.0) >= 255.0) + return(255); + return((unsigned char) (quantum/72340172838076673.0+0.5)); +#endif +} +#endif + +extern MagickExport EndianType + GetQuantumEndian(const QuantumInfo *); + +extern MagickExport MagickBooleanType + SetQuantumDepth(const Image *,QuantumInfo *,const size_t), + SetQuantumEndian(const Image *,QuantumInfo *,const EndianType), + SetQuantumFormat(const Image *,QuantumInfo *,const QuantumFormatType), + SetQuantumPad(const Image *,QuantumInfo *,const size_t); + +extern MagickExport QuantumFormatType + GetQuantumFormat(const QuantumInfo *); + +extern MagickExport QuantumInfo + *AcquireQuantumInfo(const ImageInfo *,Image *), + *DestroyQuantumInfo(QuantumInfo *); + +extern MagickExport QuantumType + GetQuantumType(Image *,ExceptionInfo *); + +extern MagickExport size_t + ExportQuantumPixels(const Image *,CacheView *,QuantumInfo *,const QuantumType, + unsigned char *magick_restrict,ExceptionInfo *), + GetQuantumExtent(const Image *,const QuantumInfo *,const QuantumType), + ImportQuantumPixels(const Image *,CacheView *,QuantumInfo *,const QuantumType, + const unsigned char *magick_restrict,ExceptionInfo *); + +extern MagickExport unsigned char + *GetQuantumPixels(const QuantumInfo *); + +extern MagickExport void + GetQuantumInfo(const ImageInfo *,QuantumInfo *), + SetQuantumAlphaType(QuantumInfo *,const QuantumAlphaType), + SetQuantumImageType(Image *,const QuantumType), + SetQuantumMinIsWhite(QuantumInfo *,const MagickBooleanType), + SetQuantumPack(QuantumInfo *,const MagickBooleanType), + SetQuantumQuantum(QuantumInfo *,const size_t), + SetQuantumScale(QuantumInfo *,const double); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/random_.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/random_.h new file mode 100644 index 0000000000..7947f1380d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/random_.h @@ -0,0 +1,59 @@ +/* + Copyright @ 2001 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore random methods. +*/ +#ifndef MAGICKCORE_RANDOM__H +#define MAGICKCORE_RANDOM__H + +#include "MagickCore/string_.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + Typedef declarations. +*/ +typedef struct _RandomInfo + RandomInfo; + +/* + Method declarations. +*/ +extern MagickExport double + GetRandomValue(RandomInfo *), + GetPseudoRandomValue(RandomInfo *magick_restrict); + +extern MagickExport RandomInfo + *AcquireRandomInfo(void), + *DestroyRandomInfo(RandomInfo *); + +extern MagickExport StringInfo + *GetRandomKey(RandomInfo *,const size_t); + +extern MagickExport unsigned long + GetRandomSecretKey(const RandomInfo *); + +extern MagickExport void + SetRandomKey(RandomInfo *,const size_t,unsigned char *), + SetRandomSecretKey(const unsigned long), + SetRandomTrueRandom(const MagickBooleanType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/registry.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/registry.h new file mode 100644 index 0000000000..b0c92af926 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/registry.h @@ -0,0 +1,51 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore registry methods. +*/ +#ifndef MAGICKCORE_REGISTRY_H +#define MAGICKCORE_REGISTRY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedRegistryType, + ImageRegistryType, + ImageInfoRegistryType, + StringRegistryType +} RegistryType; + +extern MagickExport char + *GetNextImageRegistry(void); + +extern MagickExport MagickBooleanType + DefineImageRegistry(const RegistryType,const char *,ExceptionInfo *), + DeleteImageRegistry(const char *), + SetImageRegistry(const RegistryType,const char *,const void *, + ExceptionInfo *); + +extern MagickExport void + *GetImageRegistry(const RegistryType,const char *,ExceptionInfo *), + *RemoveImageRegistry(const char *), + ResetImageRegistryIterator(void); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resample.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resample.h new file mode 100644 index 0000000000..60c959ed5d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resample.h @@ -0,0 +1,104 @@ +/* + Copyright @ 2007 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore graphic resample methods. +*/ +#ifndef MAGICKCORE_RESAMPLE_H +#define MAGICKCORE_RESAMPLE_H + +#include "MagickCore/cache-view.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + WARNING: The order of this table must also match the order of a table + located in AcquireResizeFilter() in "resize.c" otherwise the users filter + will not match the actual filter that is setup. +*/ +typedef enum +{ + UndefinedFilter, + PointFilter, + BoxFilter, + TriangleFilter, + HermiteFilter, + HannFilter, + HammingFilter, + BlackmanFilter, + GaussianFilter, + QuadraticFilter, + CubicFilter, + CatromFilter, + MitchellFilter, + JincFilter, + SincFilter, + SincFastFilter, + KaiserFilter, + WelchFilter, + ParzenFilter, + BohmanFilter, + BartlettFilter, + LagrangeFilter, + LanczosFilter, + LanczosSharpFilter, + Lanczos2Filter, + Lanczos2SharpFilter, + RobidouxFilter, + RobidouxSharpFilter, + CosineFilter, + SplineFilter, + LanczosRadiusFilter, + CubicSplineFilter, + SentinelFilter /* a count of all the filters, not a real filter */ +} FilterType; + +/* + Backward compatibility for the more correctly named Jinc Filter. Original + source of this filter is from "zoom" but it refers to a reference by Pratt, + who does not actually name the filter. + + also miss-spellings of common filters +*/ +#define BesselFilter JincFilter +#define WelshFilter WelchFilter +#define HanningFilter HannFilter + +typedef struct _ResampleFilter + ResampleFilter; + +extern MagickExport MagickBooleanType + ResamplePixelColor(ResampleFilter *,const double,const double, + PixelInfo *,ExceptionInfo *), + SetResampleFilterInterpolateMethod(ResampleFilter *, + const PixelInterpolateMethod), + SetResampleFilterVirtualPixelMethod(ResampleFilter *, + const VirtualPixelMethod); + +extern MagickExport ResampleFilter + *AcquireResampleFilter(const Image *,ExceptionInfo *), + *DestroyResampleFilter(ResampleFilter *); + +extern MagickExport void + ScaleResampleFilter(ResampleFilter *,const double,const double,const double, + const double), + SetResampleFilter(ResampleFilter *,const FilterType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resize.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resize.h new file mode 100644 index 0000000000..0f9f932889 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resize.h @@ -0,0 +1,48 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image resize methods. +*/ +#ifndef MAGICKCORE_RESIZE_H +#define MAGICKCORE_RESIZE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _ResizeFilter + ResizeFilter; + +extern MagickExport Image + *AdaptiveResizeImage(const Image *,const size_t,const size_t,ExceptionInfo *), + *InterpolativeResizeImage(const Image *,const size_t,const size_t, + const PixelInterpolateMethod,ExceptionInfo *), + *LiquidRescaleImage(const Image *,const size_t,const size_t,const double, + const double,ExceptionInfo *), + *MagnifyImage(const Image *,ExceptionInfo *), + *MinifyImage(const Image *,ExceptionInfo *), + *ResampleImage(const Image *,const double,const double,const FilterType, + ExceptionInfo *), + *ResizeImage(const Image *,const size_t,const size_t,const FilterType, + ExceptionInfo *), + *SampleImage(const Image *,const size_t,const size_t,ExceptionInfo *), + *ScaleImage(const Image *,const size_t,const size_t,ExceptionInfo *), + *ThumbnailImage(const Image *,const size_t,const size_t,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resource_.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resource_.h new file mode 100644 index 0000000000..bb058ed7dd --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/resource_.h @@ -0,0 +1,64 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore resource methods. +*/ +#ifndef MAGICKCORE_RESOURCE_H +#define MAGICKCORE_RESOURCE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedResource, + AreaResource, + DiskResource, + FileResource, + HeightResource, + MapResource, + MemoryResource, + ThreadResource, + ThrottleResource, + TimeResource, + WidthResource, + ListLengthResource +} ResourceType; + +#define MagickResourceInfinity (MagickULLConstant(~0) >> 1) + +extern MagickExport int + AcquireUniqueFileResource(char *); + +extern MagickExport MagickBooleanType + AcquireMagickResource(const ResourceType,const MagickSizeType), + GetPathTemplate(char *), + ListMagickResourceInfo(FILE *,ExceptionInfo *), + RelinquishUniqueFileResource(const char *), + SetMagickResourceLimit(const ResourceType,const MagickSizeType); + +extern MagickExport MagickSizeType + GetMagickResource(const ResourceType), + GetMagickResourceLimit(const ResourceType); + +extern MagickExport void + RelinquishMagickResource(const ResourceType,const MagickSizeType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/segment.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/segment.h new file mode 100644 index 0000000000..ecaff9f912 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/segment.h @@ -0,0 +1,35 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image segment methods. +*/ +#ifndef MAGICKCORE_SEGMENT_H +#define MAGICKCORE_SEGMENT_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + GetImageDynamicThreshold(const Image *,const double,const double, + PixelInfo *,ExceptionInfo *), + SegmentImage(Image *,const ColorspaceType,const MagickBooleanType, + const double,const double,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/semaphore.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/semaphore.h new file mode 100644 index 0000000000..737632910a --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/semaphore.h @@ -0,0 +1,41 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore methods to lock and unlock semaphores. +*/ +#ifndef MAGICKCORE_SEMAPHORE_H +#define MAGICKCORE_SEMAPHORE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct SemaphoreInfo + SemaphoreInfo; + +extern MagickExport SemaphoreInfo + *AcquireSemaphoreInfo(void); + +extern MagickExport void + ActivateSemaphoreInfo(SemaphoreInfo **), + LockSemaphoreInfo(SemaphoreInfo *), + RelinquishSemaphoreInfo(SemaphoreInfo **), + UnlockSemaphoreInfo(SemaphoreInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/shear.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/shear.h new file mode 100644 index 0000000000..7dbea24d9c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/shear.h @@ -0,0 +1,35 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image stream methods. +*/ +#ifndef MAGICKCORE_SHEAR_H +#define MAGICKCORE_SHEAR_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport Image + *DeskewImage(const Image *,const double,ExceptionInfo *), + *IntegralRotateImage(const Image *,size_t,ExceptionInfo *), + *ShearImage(const Image *,const double,const double,ExceptionInfo *), + *ShearRotateImage(const Image *,const double,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/signature.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/signature.h new file mode 100644 index 0000000000..5209f5d305 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/signature.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore digital signature methods. +*/ +#ifndef MAGICKCORE_SIGNATURE_H +#define MAGICKCORE_SIGNATURE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + SignatureImage(Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/splay-tree.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/splay-tree.h new file mode 100644 index 0000000000..f3bb63cec8 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/splay-tree.h @@ -0,0 +1,62 @@ +/* + Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore splay-tree methods. +*/ +#ifndef MAGICKCORE_SPLAY_H +#define MAGICKCORE_SPLAY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _SplayTreeInfo + SplayTreeInfo; + +extern MagickExport MagickBooleanType + AddValueToSplayTree(SplayTreeInfo *,const void *,const void *), + DeleteNodeByValueFromSplayTree(SplayTreeInfo *,const void *), + DeleteNodeFromSplayTree(SplayTreeInfo *,const void *); + +extern MagickExport const void + *GetNextKeyInSplayTree(SplayTreeInfo *), + *GetNextValueInSplayTree(SplayTreeInfo *), + *GetRootValueFromSplayTree(SplayTreeInfo *), + *GetValueFromSplayTree(SplayTreeInfo *,const void *); + +extern MagickExport int + CompareSplayTreeString(const void *,const void *), + CompareSplayTreeStringInfo(const void *,const void *); + +extern MagickExport SplayTreeInfo + *CloneSplayTree(SplayTreeInfo *,void *(*)(void *),void *(*)(void *)), + *DestroySplayTree(SplayTreeInfo *), + *NewSplayTree(int (*)(const void *,const void *),void *(*)(void *), + void *(*)(void *)); + +extern MagickExport size_t + GetNumberOfNodesInSplayTree(const SplayTreeInfo *); + +extern MagickExport void + *RemoveNodeByValueFromSplayTree(SplayTreeInfo *,const void *), + *RemoveNodeFromSplayTree(SplayTreeInfo *,const void *), + ResetSplayTree(SplayTreeInfo *), + ResetSplayTreeIterator(SplayTreeInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/static.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/static.h new file mode 100644 index 0000000000..dad8945f99 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/static.h @@ -0,0 +1,321 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore static coder registration methods. +*/ +#ifndef MAGICKCORE_STATIC_H +#define MAGICKCORE_STATIC_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport MagickBooleanType + InvokeStaticImageFilter(const char *,Image **,const int,const char **, + ExceptionInfo *), + RegisterStaticModule(const char *,ExceptionInfo *exception), + UnregisterStaticModule(const char *); + +extern MagickExport void + RegisterStaticModules(void), + UnregisterStaticModules(void); + +extern ModuleExport size_t + RegisterAAIImage(void), + RegisterARTImage(void), + RegisterASHLARImage(void), + RegisterAVSImage(void), + RegisterBAYERImage(void), + RegisterBGRImage(void), + RegisterBMPImage(void), + RegisterBRAILLEImage(void), + RegisterCALSImage(void), + RegisterCAPTIONImage(void), + RegisterCINImage(void), + RegisterCIPImage(void), + RegisterCLIPImage(void), + RegisterCLIPBOARDImage(void), + RegisterCMYKImage(void), + RegisterCUBEImage(void), + RegisterCUTImage(void), + RegisterDCMImage(void), + RegisterDDSImage(void), + RegisterDEBUGImage(void), + RegisterDIBImage(void), + RegisterDJVUImage(void), + RegisterDNGImage(void), + RegisterDPSImage(void), + RegisterDPXImage(void), + RegisterEMFImage(void), + RegisterEPTImage(void), + RegisterEXRImage(void), + RegisterFARBFELDImage(void), + RegisterFAXImage(void), + RegisterFITSImage(void), + RegisterFL32Image(void), + RegisterFLIFImage(void), + RegisterFPXImage(void), + RegisterFTXTImage(void), + RegisterGIFImage(void), + RegisterGRADIENTImage(void), + RegisterGRAYImage(void), + RegisterHALDImage(void), + RegisterHDRImage(void), + RegisterHEICImage(void), + RegisterHISTOGRAMImage(void), + RegisterHRZImage(void), + RegisterHTMLImage(void), + RegisterICONImage(void), + RegisterINFOImage(void), + RegisterINLINEImage(void), + RegisterIPLImage(void), + RegisterJBIGImage(void), + RegisterJNXImage(void), + RegisterJPEGImage(void), + RegisterJSONImage(void), + RegisterJP2Image(void), + RegisterJXLImage(void), + RegisterLABELImage(void), + RegisterMACImage(void), + RegisterMAGICKImage(void), + RegisterMAPImage(void), + RegisterMASKImage(void), + RegisterMATImage(void), + RegisterMATTEImage(void), + RegisterMETAImage(void), + RegisterMIFFImage(void), + RegisterMONOImage(void), + RegisterMPCImage(void), + RegisterMPRImage(void), + RegisterMSLImage(void), + RegisterMTVImage(void), + RegisterMVGImage(void), + RegisterNULLImage(void), + RegisterORAImage(void), + RegisterOTBImage(void), + RegisterPALMImage(void), + RegisterPANGOImage(void), + RegisterPATTERNImage(void), + RegisterPCDImage(void), + RegisterPCLImage(void), + RegisterPCXImage(void), + RegisterPDBImage(void), + RegisterPDFImage(void), + RegisterPESImage(void), + RegisterPGXImage(void), + RegisterPICTImage(void), + RegisterPIXImage(void), + RegisterPLASMAImage(void), + RegisterPNGImage(void), + RegisterPNMImage(void), + RegisterPSImage(void), + RegisterPS2Image(void), + RegisterPS3Image(void), + RegisterPSDImage(void), + RegisterPWPImage(void), + RegisterQOIImage(void), + RegisterRAWImage(void), + RegisterRGBImage(void), + RegisterRGFImage(void), + RegisterRLAImage(void), + RegisterRLEImage(void), + RegisterSCRImage(void), + RegisterSCREENSHOTImage(void), + RegisterSCTImage(void), + RegisterSFWImage(void), + RegisterSGIImage(void), + RegisterSIXELImage(void), + RegisterSTEGANOImage(void), + RegisterSTRIMGImage(void), + RegisterSUNImage(void), + RegisterSVGImage(void), + RegisterTGAImage(void), + RegisterTHUMBNAILImage(void), + RegisterTIFFImage(void), + RegisterTILEImage(void), + RegisterTIMImage(void), + RegisterTIM2Image(void), + RegisterTTFImage(void), + RegisterTXTImage(void), + RegisterUHDRImage(void), + RegisterUILImage(void), + RegisterURLImage(void), + RegisterUYVYImage(void), + RegisterVICARImage(void), + RegisterVIDImage(void), + RegisterVIDEOImage(void), + RegisterVIFFImage(void), + RegisterVIPSImage(void), + RegisterWBMPImage(void), + RegisterWEBPImage(void), + RegisterWMFImage(void), + RegisterWPGImage(void), + RegisterXImage(void), + RegisterXBMImage(void), + RegisterXCImage(void), + RegisterXCFImage(void), + RegisterXPMImage(void), + RegisterXPSImage(void), + RegisterXWDImage(void), + RegisterYAMLImage(void), + RegisterYCBCRImage(void), + RegisterYUVImage(void); + +extern ModuleExport void + UnregisterAAIImage(void), + UnregisterARTImage(void), + UnregisterASHLARImage(void), + UnregisterAVSImage(void), + UnregisterBAYERImage(void), + UnregisterBGRImage(void), + UnregisterBMPImage(void), + UnregisterBRAILLEImage(void), + UnregisterCALSImage(void), + UnregisterCAPTIONImage(void), + UnregisterCINImage(void), + UnregisterCIPImage(void), + UnregisterCLIPImage(void), + UnregisterCLIPBOARDImage(void), + UnregisterCMYKImage(void), + UnregisterCUBEImage(void), + UnregisterCUTImage(void), + UnregisterDCMImage(void), + UnregisterDDSImage(void), + UnregisterDEBUGImage(void), + UnregisterDIBImage(void), + UnregisterDJVUImage(void), + UnregisterDNGImage(void), + UnregisterDPSImage(void), + UnregisterDPXImage(void), + UnregisterEMFImage(void), + UnregisterEPTImage(void), + UnregisterEXRImage(void), + UnregisterFARBFELDImage(void), + UnregisterFAXImage(void), + UnregisterFITSImage(void), + UnregisterFL32Image(void), + UnregisterFLIFImage(void), + UnregisterFPXImage(void), + UnregisterFTXTImage(void), + UnregisterGIFImage(void), + UnregisterGRADIENTImage(void), + UnregisterGRAYImage(void), + UnregisterHALDImage(void), + UnregisterHDRImage(void), + UnregisterHEICImage(void), + UnregisterHISTOGRAMImage(void), + UnregisterHRZImage(void), + UnregisterHTMLImage(void), + UnregisterICONImage(void), + UnregisterINFOImage(void), + UnregisterINLINEImage(void), + UnregisterIPLImage(void), + UnregisterJBIGImage(void), + UnregisterJNXImage(void), + UnregisterJPEGImage(void), + UnregisterJP2Image(void), + UnregisterJSONImage(void), + UnregisterJXLImage(void), + UnregisterLABELImage(void), + UnregisterMACImage(void), + UnregisterMAGICKImage(void), + UnregisterMAPImage(void), + UnregisterMASKImage(void), + UnregisterMATImage(void), + UnregisterMATTEImage(void), + UnregisterMETAImage(void), + UnregisterMIFFImage(void), + UnregisterMONOImage(void), + UnregisterMPCImage(void), + UnregisterMPRImage(void), + UnregisterMSLImage(void), + UnregisterMTVImage(void), + UnregisterMVGImage(void), + UnregisterNULLImage(void), + UnregisterORAImage(void), + UnregisterOTBImage(void), + UnregisterPALMImage(void), + UnregisterPANGOImage(void), + UnregisterPATTERNImage(void), + UnregisterPCDImage(void), + UnregisterPCLImage(void), + UnregisterPCXImage(void), + UnregisterPDBImage(void), + UnregisterPDFImage(void), + UnregisterPESImage(void), + UnregisterPGXImage(void), + UnregisterPICTImage(void), + UnregisterPIXImage(void), + UnregisterPLASMAImage(void), + UnregisterPNGImage(void), + UnregisterPNMImage(void), + UnregisterPSImage(void), + UnregisterPS2Image(void), + UnregisterPS3Image(void), + UnregisterPSDImage(void), + UnregisterPWPImage(void), + UnregisterQOIImage(void), + UnregisterRAWImage(void), + UnregisterRGBImage(void), + UnregisterRGFImage(void), + UnregisterRLAImage(void), + UnregisterRLEImage(void), + UnregisterSCRImage(void), + UnregisterSCREENSHOTImage(void), + UnregisterSCTImage(void), + UnregisterSFWImage(void), + UnregisterSGIImage(void), + UnregisterSIXELImage(void), + UnregisterSTEGANOImage(void), + UnregisterSTRIMGImage(void), + UnregisterSUNImage(void), + UnregisterSVGImage(void), + UnregisterTGAImage(void), + UnregisterTHUMBNAILImage(void), + UnregisterTIFFImage(void), + UnregisterTILEImage(void), + UnregisterTIMImage(void), + UnregisterTIM2Image(void), + UnregisterTTFImage(void), + UnregisterTXTImage(void), + UnregisterUHDRImage(void), + UnregisterUILImage(void), + UnregisterURLImage(void), + UnregisterUYVYImage(void), + UnregisterVICARImage(void), + UnregisterVIDImage(void), + UnregisterVIDEOImage(void), + UnregisterVIFFImage(void), + UnregisterVIPSImage(void), + UnregisterWBMPImage(void), + UnregisterWEBPImage(void), + UnregisterWMFImage(void), + UnregisterWPGImage(void), + UnregisterXImage(void), + UnregisterXBMImage(void), + UnregisterXCImage(void), + UnregisterXCFImage(void), + UnregisterXPMImage(void), + UnregisterXPSImage(void), + UnregisterXWDImage(void), + UnregisterYAMLImage(void), + UnregisterYCBCRImage(void), + UnregisterYUVImage(void); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/statistic.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/statistic.h new file mode 100644 index 0000000000..93e472f66d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/statistic.h @@ -0,0 +1,185 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore statistical methods. +*/ +#ifndef MAGICKCORE_STATISTIC_H +#define MAGICKCORE_STATISTIC_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#define MaximumNumberOfImageMoments 8 +#define MaximumNumberOfPerceptualColorspaces 6 +#define MaximumNumberOfPerceptualHashes 7 + +typedef struct _ChannelStatistics +{ + size_t + depth; + + double + area, + minima, + maxima, + sum, + sum_squared, + sum_cubed, + sum_fourth_power, + mean, + variance, + standard_deviation, + kurtosis, + skewness, + entropy, + median; + + long double + sumLD, + M1, + M2, + M3, + M4; +} ChannelStatistics; + +typedef struct _ChannelMoments +{ + double + invariant[MaximumNumberOfImageMoments+1]; + + PointInfo + centroid, + ellipse_axis; + + double + ellipse_angle, + ellipse_eccentricity, + ellipse_intensity; +} ChannelMoments; + +typedef struct _ChannelPerceptualHash +{ + double + srgb_hu_phash[MaximumNumberOfImageMoments+1], + hclp_hu_phash[MaximumNumberOfImageMoments+1]; + + size_t + number_colorspaces; + + ColorspaceType + colorspace[MaximumNumberOfPerceptualColorspaces+1]; + + double + phash[MaximumNumberOfPerceptualColorspaces+1][MaximumNumberOfImageMoments+1]; + + size_t + number_channels; +} ChannelPerceptualHash; + +typedef enum +{ + UndefinedEvaluateOperator, + AbsEvaluateOperator, + AddEvaluateOperator, + AddModulusEvaluateOperator, + AndEvaluateOperator, + CosineEvaluateOperator, + DivideEvaluateOperator, + ExponentialEvaluateOperator, + GaussianNoiseEvaluateOperator, + ImpulseNoiseEvaluateOperator, + LaplacianNoiseEvaluateOperator, + LeftShiftEvaluateOperator, + LogEvaluateOperator, + MaxEvaluateOperator, + MeanEvaluateOperator, + MedianEvaluateOperator, + MinEvaluateOperator, + MultiplicativeNoiseEvaluateOperator, + MultiplyEvaluateOperator, + OrEvaluateOperator, + PoissonNoiseEvaluateOperator, + PowEvaluateOperator, + RightShiftEvaluateOperator, + RootMeanSquareEvaluateOperator, + SetEvaluateOperator, + SineEvaluateOperator, + SubtractEvaluateOperator, + SumEvaluateOperator, + ThresholdBlackEvaluateOperator, + ThresholdEvaluateOperator, + ThresholdWhiteEvaluateOperator, + UniformNoiseEvaluateOperator, + XorEvaluateOperator, + InverseLogEvaluateOperator +} MagickEvaluateOperator; + +typedef enum +{ + UndefinedFunction, + ArcsinFunction, + ArctanFunction, + PolynomialFunction, + SinusoidFunction +} MagickFunction; + +typedef enum +{ + UndefinedStatistic, + GradientStatistic, + MaximumStatistic, + MeanStatistic, + MedianStatistic, + MinimumStatistic, + ModeStatistic, + NonpeakStatistic, + RootMeanSquareStatistic, + StandardDeviationStatistic, + ContrastStatistic +} StatisticType; + +extern MagickExport ChannelStatistics + *GetImageStatistics(const Image *,ExceptionInfo *); + +extern MagickExport ChannelMoments + *GetImageMoments(const Image *,ExceptionInfo *); + +extern MagickExport ChannelPerceptualHash + *GetImagePerceptualHash(const Image *,ExceptionInfo *); + +extern MagickExport Image + *EvaluateImages(const Image *,const MagickEvaluateOperator,ExceptionInfo *), + *PolynomialImage(const Image *,const size_t,const double *,ExceptionInfo *), + *StatisticImage(const Image *,const StatisticType,const size_t,const size_t, + ExceptionInfo *); + +extern MagickExport MagickBooleanType + EvaluateImage(Image *,const MagickEvaluateOperator,const double, + ExceptionInfo *), + FunctionImage(Image *,const MagickFunction,const size_t,const double *, + ExceptionInfo *), + GetImageEntropy(const Image *,double *,ExceptionInfo *), + GetImageExtrema(const Image *,size_t *,size_t *,ExceptionInfo *), + GetImageMean(const Image *,double *,double *,ExceptionInfo *), + GetImageMedian(const Image *,double *,ExceptionInfo *), + GetImageKurtosis(const Image *,double *,double *,ExceptionInfo *), + GetImageRange(const Image *,double *,double *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/stream.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/stream.h new file mode 100644 index 0000000000..f4f8261cc3 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/stream.h @@ -0,0 +1,53 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image stream methods. +*/ +#ifndef MAGICKCORE_STREAM_H +#define MAGICKCORE_STREAM_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#include "MagickCore/pixel.h" + +typedef struct _StreamInfo + StreamInfo; + +typedef size_t + (*StreamHandler)(const Image *,const void *,const size_t); + +extern MagickExport Image + *ReadStream(const ImageInfo *,StreamHandler,ExceptionInfo *), + *StreamImage(const ImageInfo *,StreamInfo *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + OpenStream(const ImageInfo *,StreamInfo *,const char *,ExceptionInfo *), + WriteStream(const ImageInfo *,Image *,StreamHandler,ExceptionInfo *); + +extern MagickExport StreamInfo + *AcquireStreamInfo(const ImageInfo *,ExceptionInfo *), + *DestroyStreamInfo(StreamInfo *); + +extern MagickExport void + SetStreamInfoMap(StreamInfo *,const char *), + SetStreamInfoStorageType(StreamInfo *,const StorageType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/string_.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/string_.h new file mode 100644 index 0000000000..b2f2120106 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/string_.h @@ -0,0 +1,119 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore string methods. +*/ +#ifndef MAGICKCORE_STRING_H_ +#define MAGICKCORE_STRING_H_ + +#include "MagickCore/exception.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _StringInfo +{ + char + *path; + + unsigned char + *datum; + + size_t + length, + signature; + + char + *name; +} StringInfo; + +extern MagickExport char + *AcquireString(const char *), + *CloneString(char **,const char *), + *ConstantString(const char *), + *DestroyString(char *), + **DestroyStringList(char **), + *EscapeString(const char *,const char), + *FileToString(const char *,const size_t,ExceptionInfo *), + *GetEnvironmentValue(const char *), + *SanitizeString(const char *), + *StringInfoToDigest(const StringInfo *), + *StringInfoToHexString(const StringInfo *), + *StringInfoToString(const StringInfo *), + **StringToArgv(const char *,int *), + *StringToken(const char *,char **), + **StringToList(const char *), + **StringToStrings(const char *,size_t *); + +extern MagickExport const char + *GetStringInfoName(const StringInfo *), + *GetStringInfoPath(const StringInfo *); + +extern MagickExport double + InterpretSiPrefixValue(const char *magick_restrict,char **magick_restrict), + *StringToArrayOfDoubles(const char *,ssize_t *,ExceptionInfo *); + +extern MagickExport int + CompareStringInfo(const StringInfo *,const StringInfo *); + +extern MagickExport MagickBooleanType + ConcatenateString(char **magick_restrict,const char *magick_restrict), + IsStringTrue(const char *) magick_attribute((__pure__)), + IsStringFalse(const char *) magick_attribute((__pure__)), + SubstituteString(char **,const char *,const char *); + +extern MagickExport size_t + ConcatenateMagickString(char *magick_restrict,const char *magick_restrict, + const size_t) magick_attribute((__nonnull__)), + CopyMagickString(char *magick_restrict,const char *magick_restrict, + const size_t) magick_attribute((__nonnull__)), + GetStringInfoLength(const StringInfo *), + StripMagickString(char *); + +extern MagickExport ssize_t + FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *, + const size_t,char *); + +extern MagickExport StringInfo + *AcquireStringInfo(const size_t), + *BlobToStringInfo(const void *,const size_t), + *CloneStringInfo(const StringInfo *), + *ConfigureFileToStringInfo(const char *), + *DestroyStringInfo(StringInfo *), + *FileToStringInfo(const char *,const size_t,ExceptionInfo *), + *SplitStringInfo(StringInfo *,const size_t), + *StringToStringInfo(const char *); + +extern MagickExport unsigned char + *GetStringInfoDatum(const StringInfo *); + +extern MagickExport void + ConcatenateStringInfo(StringInfo *,const StringInfo *) + magick_attribute((__nonnull__)), + PrintStringInfo(FILE *file,const char *,const StringInfo *), + ResetStringInfo(StringInfo *), + SetStringInfo(StringInfo *,const StringInfo *), + SetStringInfoDatum(StringInfo *,const unsigned char *), + SetStringInfoLength(StringInfo *,const size_t), + SetStringInfoName(StringInfo *,const char *), + SetStringInfoPath(StringInfo *,const char *), + StripString(char *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/studio.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/studio.h new file mode 100644 index 0000000000..ebad26eaf9 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/studio.h @@ -0,0 +1,358 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore private application programming interface declarations. +*/ +#ifndef MAGICKCORE_STUDIO_H +#define MAGICKCORE_STUDIO_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if defined(WIN32) || defined(WIN64) +# define MAGICKCORE_WINDOWS_SUPPORT +#else +# define MAGICKCORE_POSIX_SUPPORT +#endif + +#define MAGICKCORE_IMPLEMENTATION 1 + +#if !defined(MAGICKCORE_CONFIG_H) +# define MAGICKCORE_CONFIG_H +#include "MagickCore/magick-config.h" +# if defined(MAGICKCORE__FILE_OFFSET_BITS) && !defined(_FILE_OFFSET_BITS) +# define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS +#endif +#if defined(_magickcore_const) && !defined(const) +# define const _magickcore_const +#endif +#if defined(_magickcore_inline) && !defined(inline) +# define inline _magickcore_inline +#endif +# if defined(__cplusplus) || defined(c_plusplus) +# undef inline +# endif +#endif + +#if defined(MAGICKCORE_NAMESPACE_PREFIX) +# include "MagickCore/methods.h" +#endif + +#if !defined(const) +# define STDC +#endif + +/* Define to 1 if assertions should be disabled. */ +#if defined(MAGICKCORE_NDEBUG) +#define NDEBUG 1 +#endif + +#include +#include +#if defined(MAGICKCORE_HAVE_SYS_STAT_H) +# include +#endif +#if defined(MAGICKCORE_STDC_HEADERS) +# include +# include +#else +# if defined(MAGICKCORE_HAVE_STDLIB_H) +# include +# endif +#endif +#if !defined(magick_restrict) +# if !defined(_magickcore_restrict) +# define magick_restrict restrict +# else +# define magick_restrict _magickcore_restrict +# endif +#endif +#if defined(MAGICKCORE_HAVE_STRING_H) +# if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H) +# include +# endif +# include +#endif +#if defined(MAGICKCORE_HAVE_STRINGS_H) +# include +#endif +#if defined(MAGICKCORE_HAVE_INTTYPES_H) +# include +#endif +#if defined(MAGICKCORE_HAVE_STDINT_H) +# include +#endif +#if defined(MAGICKCORE_HAVE_UNISTD_H) +# include +#endif +#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG) +#define _CRTDBG_MAP_ALLOC +#endif +#if defined(MAGICKCORE_WINDOWS_SUPPORT) +# define NOMINMAX +# include +#if !defined(__CYGWIN__) +# include +#endif +# if !defined(MAGICKCORE_HAVE_STRERROR) +# define HAVE_STRERROR +# endif +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(MAGICKCORE_HAVE_XLOCALE_H) +# include +#endif +#if defined(MAGICKCORE_THREAD_SUPPORT) +# include +#endif +#if defined(MAGICKCORE_WINDOWS_SUPPORT) +# if !defined(__CYGWIN__) +# if defined(MAGICKCORE_DPC_SUPPORT) +# include +# ifdef _MSC_VER +# pragma comment (lib, "ws2_32.lib") +# endif +# endif +# include +# endif +#endif +#if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H) +# include +#endif +#if defined(MAGICKCORE_HAVE_ARM_LIMITS_H) +# include +#endif + +#if defined(MAGICKCORE_HAVE_CL_CL_H) +# define MAGICKCORE_OPENCL_SUPPORT 1 +#endif +#if defined(MAGICKCORE_HAVE_OPENCL_CL_H) +# define MAGICKCORE_OPENCL_SUPPORT 1 +#endif + +#if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__)) +# include +# define MAGICKCORE_OPENMP_SUPPORT 1 +#endif + +#if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD +ssize_t pread(int,void *,size_t,off_t); +#endif + +#if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE +ssize_t pwrite(int,const void *,size_t,off_t); +#endif + +#if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY +extern size_t strlcpy(char *,const char *,size_t); +#endif + +#if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF +extern int vsnprintf(char *,size_t,const char *,va_list); +#endif + +#include "MagickCore/method-attribute.h" + +#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT) +# include +# include +# if defined(MAGICKCORE_POSIX_SUPPORT) +# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H) +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) +# include +# endif +# if defined(MAGICKCORE_HAVE_SYS_DIR_H) +# include +# endif +# if defined(MAGICKCORE_HAVE_NDIR_H) +# include +# endif +# else +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +# endif +# include +# include +# endif +# if !defined(S_ISDIR) +# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +# endif +# if !defined(S_ISREG) +# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) +# endif +# include "MagickCore/magick-type.h" +# if !defined(MAGICKCORE_WINDOWS_SUPPORT) +# include +# if defined(MAGICKCORE_HAVE_SYS_TIMES_H) +# include +# endif +# if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H) +# include +# endif +# if defined(MAGICKCORE_HAVE_SYS_MMAN_H) +# include +# endif +# if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H) +# include +# endif +# if defined(MAGICKCORE_HAVE_SYS_SOCKET_H) +# include +# endif +# if defined(MAGICKCORE_HAVE_SYS_UIO_H) +# include +# endif +#endif +#else +# include +# include +# include "MagickCore/magick-type.h" +#endif + +#if defined(S_IRUSR) && defined(S_IWUSR) +# define S_MODE (S_IRUSR | S_IWUSR) +#elif defined (MAGICKCORE_WINDOWS_SUPPORT) +# define S_MODE (_S_IREAD | _S_IWRITE) +#else +# define S_MODE 0600 +#endif + +#if defined(MAGICKCORE_WINDOWS_SUPPORT) +# include "MagickCore/nt-base.h" +#endif +#ifdef __VMS +# include "MagickCore/vms.h" +#endif + +#undef HAVE_CONFIG_H +#undef gamma +#undef index +#undef pipe +#undef y1 + +/* + Review these platform specific definitions. +*/ +#if defined(MAGICKCORE_POSIX_SUPPORT) && !( defined(__OS2__) || defined( vms ) ) +# define DirectorySeparator "/" +# define DirectoryListSeparator ':' +# define EditorOptions " -title \"Edit Image Comment\" -e vi" +# define Exit exit +# define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse) +# define X11_PREFERENCES_PATH "~/." +# define ProcessPendingEvents(text) +# define ReadCommandlLine(argc,argv) +# define SetNotifyHandlers +#else +# ifdef __VMS +# define X11_APPLICATION_PATH "decw$system_defaults:" +# define DirectorySeparator "" +# define DirectoryListSeparator ';' +# define EditorOptions "" +# define Exit exit +# define IsBasenameSeparator(c) \ + (((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse) +# define MAGICKCORE_LIBRARY_PATH "sys$login:" +# define MAGICKCORE_SHARE_PATH "sys$login:" +# define X11_PREFERENCES_PATH "decw$user_defaults:" +# define ProcessPendingEvents(text) +# define ReadCommandlLine(argc,argv) +# define SetNotifyHandlers +# endif +# if defined(__OS2__) +# define DirectorySeparator "\\" +# define DirectoryListSeparator ';' +# define EditorOptions " -title \"Edit Image Comment\" -e vi" +# define Exit exit +# define IsBasenameSeparator(c) \ + (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse) +# define PreferencesDefaults "~\." +# define ProcessPendingEvents(text) +# define ReadCommandlLine(argc,argv) +# define SetNotifyHandlers +#endif +# if defined(MAGICKCORE_WINDOWS_SUPPORT) +# define DirectorySeparator "\\" +# define DirectoryListSeparator ';' +# define EditorOptions "" +# define IsBasenameSeparator(c) \ + (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse) +# define ProcessPendingEvents(text) +# if !defined(X11_PREFERENCES_PATH) +# define X11_PREFERENCES_PATH "~\\." +# endif +# define ReadCommandlLine(argc,argv) +# define SetNotifyHandlers \ + SetErrorHandler(NTErrorHandler); \ + SetWarningHandler(NTWarningHandler) +# endif + +#endif + +/* + Define system symbols if not already defined. +*/ +#if !defined(STDIN_FILENO) +#define STDIN_FILENO 0x00 +#endif + +#if !defined(O_BINARY) +#define O_BINARY 0x00 +#endif + +#if !defined(PATH_MAX) +#define PATH_MAX 4096 +#endif + +#if defined(MAGICKCORE_LTDL_DELEGATE) || (defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DLL) && !defined(_LIB)) +# define MAGICKCORE_MODULES_SUPPORT +#endif + +#if defined(_MAGICKMOD_) +# undef MAGICKCORE_BUILD_MODULES +# define MAGICKCORE_BUILD_MODULES +#endif + +/* + Magick defines. +*/ +#define MagickMaxRecursionDepth 600 +#define Swap(x,y) ((x)^=(y), (y)^=(x), (x)^=(y)) +#if defined(_MSC_VER) +# define DisableMSCWarning(nr) __pragma(warning(push)) \ + __pragma(warning(disable:nr)) +# define RestoreMSCWarning __pragma(warning(pop)) +#else +# define DisableMSCWarning(nr) +# define RestoreMSCWarning +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/threshold.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/threshold.h new file mode 100644 index 0000000000..4c7b194c2b --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/threshold.h @@ -0,0 +1,63 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image threshold methods. +*/ +#ifndef MAGICKCORE_THRESHOLD_H +#define MAGICKCORE_THRESHOLD_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedThresholdMethod, + KapurThresholdMethod, + OTSUThresholdMethod, + TriangleThresholdMethod +} AutoThresholdMethod; + +typedef struct _ThresholdMap + ThresholdMap; + +extern MagickExport Image + *AdaptiveThresholdImage(const Image *,const size_t,const size_t,const double, + ExceptionInfo *); + +extern MagickExport ThresholdMap + *DestroyThresholdMap(ThresholdMap *), + *GetThresholdMap(const char *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + AutoThresholdImage(Image *,const AutoThresholdMethod,ExceptionInfo *), + BilevelImage(Image *,const double,ExceptionInfo *), + BlackThresholdImage(Image *,const char *,ExceptionInfo *), + ClampImage(Image *,ExceptionInfo *), + ColorThresholdImage(Image *,const PixelInfo *,const PixelInfo *, + ExceptionInfo *), + ListThresholdMaps(FILE *,ExceptionInfo *), + OrderedDitherImage(Image *,const char *,ExceptionInfo *), + PerceptibleImage(Image *,const double,ExceptionInfo *), + RandomThresholdImage(Image *,const double,const double,ExceptionInfo *), + RangeThresholdImage(Image *,const double,const double,const double, + const double,ExceptionInfo *), + WhiteThresholdImage(Image *,const char *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/timer.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/timer.h new file mode 100644 index 0000000000..21df5c4e86 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/timer.h @@ -0,0 +1,76 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore timer methods. +*/ +#ifndef MAGICKCORE_TIMER_H +#define MAGICKCORE_TIMER_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedTimerState, + StoppedTimerState, + RunningTimerState +} TimerState; + +typedef struct _Timer +{ + double + start, + stop, + total; +} Timer; + +typedef struct _TimerInfo +{ + Timer + user, + elapsed; + + TimerState + state; + + size_t + signature; +} TimerInfo; + +extern MagickExport double + GetElapsedTime(TimerInfo *), + GetUserTime(TimerInfo *); + +extern MagickExport MagickBooleanType + ContinueTimer(TimerInfo *); + +extern MagickExport ssize_t + FormatMagickTime(const time_t,const size_t,char *); + +extern MagickExport TimerInfo + *AcquireTimerInfo(void), + *DestroyTimerInfo(TimerInfo *); + +extern MagickExport void + GetTimerInfo(TimerInfo *), + ResetTimer(TimerInfo *), + StartTimer(TimerInfo *,const MagickBooleanType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/token.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/token.h new file mode 100644 index 0000000000..da861cfe2d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/token.h @@ -0,0 +1,51 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore token methods. +*/ +#ifndef MAGICKCORE_TOKEN_H +#define MAGICKCORE_TOKEN_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + Typedef declarations. +*/ +typedef struct _TokenInfo + TokenInfo; + +extern MagickExport int + Tokenizer(TokenInfo *,const unsigned int,char *,const size_t,const char *, + const char *,const char *,const char *,const char,char *,int *,char *); + +extern MagickExport MagickBooleanType + GlobExpression(const char *magick_restrict,const char *magick_restrict, + const MagickBooleanType) magick_attribute((__pure__)); + +extern MagickExport size_t + GetNextToken(const char *magick_restrict,const char **magick_restrict, + const size_t,char *magick_restrict) magick_hot_spot; + +extern MagickExport TokenInfo + *AcquireTokenInfo(void), + *DestroyTokenInfo(TokenInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/transform.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/transform.h new file mode 100644 index 0000000000..6f9ada924a --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/transform.h @@ -0,0 +1,46 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image transform methods. +*/ +#ifndef MAGICKCORE_TRANSFORM_H +#define MAGICKCORE_TRANSFORM_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern MagickExport Image + *AutoOrientImage(const Image *,const OrientationType,ExceptionInfo *), + *ChopImage(const Image *,const RectangleInfo *,ExceptionInfo *), + *ConsolidateCMYKImages(const Image *,ExceptionInfo *), + *CropImage(const Image *,const RectangleInfo *,ExceptionInfo *), + *CropImageToTiles(const Image *,const char *, ExceptionInfo *), + *ExcerptImage(const Image *,const RectangleInfo *,ExceptionInfo *), + *ExtentImage(const Image *,const RectangleInfo *,ExceptionInfo *), + *FlipImage(const Image *,ExceptionInfo *), + *FlopImage(const Image *,ExceptionInfo *), + *RollImage(const Image *,const ssize_t,const ssize_t,ExceptionInfo *), + *ShaveImage(const Image *,const RectangleInfo *,ExceptionInfo *), + *SpliceImage(const Image *,const RectangleInfo *,ExceptionInfo *), + *TransposeImage(const Image *,ExceptionInfo *), + *TransverseImage(const Image *,ExceptionInfo *), + *TrimImage(const Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/type.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/type.h new file mode 100644 index 0000000000..8b80ea2c65 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/type.h @@ -0,0 +1,100 @@ +/* + Copyright @ 2001 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image type methods. +*/ +#ifndef MAGICKCORE_TYPE_H +#define MAGICKCORE_TYPE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedStretch, + NormalStretch, + UltraCondensedStretch, + ExtraCondensedStretch, + CondensedStretch, + SemiCondensedStretch, + SemiExpandedStretch, + ExpandedStretch, + ExtraExpandedStretch, + UltraExpandedStretch, + AnyStretch +} StretchType; + +typedef enum +{ + UndefinedStyle, + NormalStyle, + ItalicStyle, + ObliqueStyle, + AnyStyle, + BoldStyle /* deprecated */ +} StyleType; + +typedef struct _TypeInfo +{ + size_t + face; + + char + *path, + *name, + *description, + *family; + + StyleType + style; + + StretchType + stretch; + + size_t + weight; + + char + *encoding, + *foundry, + *format, + *metrics, + *glyphs; + + MagickBooleanType + stealth; + + size_t + signature; +} TypeInfo; + +extern MagickExport char + **GetTypeList(const char *,size_t *,ExceptionInfo *); + +extern MagickExport MagickBooleanType + ListTypeInfo(FILE *,ExceptionInfo *); + +extern MagickExport const TypeInfo + *GetTypeInfo(const char *,ExceptionInfo *), + *GetTypeInfoByFamily(const char *,const StyleType,const StretchType, + const size_t,ExceptionInfo *), + **GetTypeInfoList(const char *,size_t *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/utility.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/utility.h new file mode 100644 index 0000000000..ac8afc8fdd --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/utility.h @@ -0,0 +1,65 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore utility methods. +*/ +#ifndef MAGICKCORE_UTILITY_H +#define MAGICKCORE_UTILITY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedPath, + MagickPath, + RootPath, + HeadPath, + TailPath, + BasePath, + ExtensionPath, + SubimagePath, + CanonicalPath, + SubcanonicalPath, + BasePathSansCompressExtension +} PathType; + +extern MagickExport char + *Base64Encode(const unsigned char *,const size_t,size_t *); + +extern MagickExport MagickBooleanType + AcquireUniqueFilename(char *), + AcquireUniqueSymbolicLink(const char *,char *), + ExpandFilenames(int *,char ***), + GetPathAttributes(const char *,void *), + IsPathAccessible(const char *); + +extern MagickExport size_t + MultilineCensus(const char *) magick_attribute((__pure__)); + +extern MagickExport unsigned char + *Base64Decode(const char *, size_t *); + +extern MagickExport void + AppendImageFormat(const char *,char *), + GetPathComponent(const char *,PathType,char *), + MagickDelay(const MagickSizeType); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/version.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/version.h new file mode 100644 index 0000000000..c5c8d3dfcb --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/version.h @@ -0,0 +1,95 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore version methods. +*/ +#ifndef _MAGICKCORE_VERSION_H +#define _MAGICKCORE_VERSION_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + Define declarations. +*/ +#define MagickPackageName "ImageMagick" +#define MagickCopyright "(C) 1999 ImageMagick Studio LLC" +#define MagickLibVersion 0x711 +#define MagickLibVersionText "7.1.1" +#define MagickLibVersionNumber 10,0,1 +#define MagickLibAddendum "-34" +#define MagickLibInterface 10 +#define MagickLibMinInterface 10 +#define MagickPlatform "wasm32" +#define MagickppLibVersionText "7.1.1" +#define MagickppLibVersionNumber 5:0:0 +#define MagickppLibAddendum "-34" +#define MagickppLibInterface 5 +#define MagickppLibMinInterface 5 +#define MagickGitRevision "39a4f1cb2:20240623" +#define MagickReleaseDate "2024-06-23" +#define MagickAuthoritativeLicense \ + "https://imagemagick.org/script/license.php" +#define MagickAuthoritativeURL "https://imagemagick.org" +#define MagickHomeURL "file:///root/lib/share/doc/ImageMagick-7/index.html" +#if (MAGICKCORE_QUANTUM_DEPTH == 8) +#define MagickQuantumDepth "Q8" +#define MagickQuantumRange "255" +#elif (MAGICKCORE_QUANTUM_DEPTH == 16) +#define MagickQuantumDepth "Q16" +#define MagickQuantumRange "65535" +#elif (MAGICKCORE_QUANTUM_DEPTH == 32) +#define MagickQuantumDepth "Q32" +#define MagickQuantumRange "4294967295" +#elif (MAGICKCORE_QUANTUM_DEPTH == 64) +#define MagickQuantumDepth "Q64" +#define MagickQuantumRange "65535" +#else +#define MagickQuantumDepth "Q?" +#define MagickQuantumRange "?" +#endif +#if defined(MAGICKCORE_HDRI_SUPPORT) +#define MagickHDRISupport "-HDRI" +#else +#define MagickHDRISupport "" +#endif +#define MagickVersion \ + MagickPackageName " " MagickLibVersionText MagickLibAddendum " " \ + MagickQuantumDepth MagickHDRISupport " " MagickPlatform " " \ + MagickGitRevision " " MagickAuthoritativeURL + +extern MagickExport char + *GetMagickHomeURL(void); + +extern MagickExport const char + *GetMagickCopyright(void) magick_attribute((__const__)), + *GetMagickDelegates(void) magick_attribute((__const__)), + *GetMagickFeatures(void) magick_attribute((__const__)), + *GetMagickLicense(void) magick_attribute((__const__)), + *GetMagickPackageName(void) magick_attribute((__const__)), + *GetMagickQuantumDepth(size_t *), + *GetMagickQuantumRange(size_t *), + *GetMagickReleaseDate(void) magick_attribute((__const__)), + *GetMagickVersion(size_t *); + +extern MagickExport void + ListMagickVersion(FILE *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/vision.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/vision.h new file mode 100644 index 0000000000..a08924a03e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/vision.h @@ -0,0 +1,64 @@ +/* + Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore computer vision methods. +*/ +#ifndef MAGICKCORE_VISION_H +#define MAGICKCORE_VISION_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#define CCMaxMetrics 16 + +typedef struct _CCObjectInfo +{ + ssize_t + id; + + RectangleInfo + bounding_box; + + PixelInfo + color; + + PointInfo + centroid; + + double + area, + census; + + MagickBooleanType + merge; + + double + metric[CCMaxMetrics]; + + ssize_t + key; +} CCObjectInfo; + +extern MagickExport Image + *ConnectedComponentsImage(const Image *,const size_t,CCObjectInfo **, + ExceptionInfo *), + *IntegralImage(const Image *,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/visual-effects.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/visual-effects.h new file mode 100644 index 0000000000..4b4c0517e6 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/visual-effects.h @@ -0,0 +1,76 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore image visual effects methods. +*/ +#ifndef MAGICKCORE_VISUAL_EFFECTS_H +#define MAGICKCORE_VISUAL_EFFECTS_H + +#include "MagickCore/draw.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef enum +{ + UndefinedNoise, + UniformNoise, + GaussianNoise, + MultiplicativeGaussianNoise, + ImpulseNoise, + LaplacianNoise, + PoissonNoise, + RandomNoise +} NoiseType; + +extern MagickExport Image + *AddNoiseImage(const Image *,const NoiseType,const double,ExceptionInfo *), + *BlueShiftImage(const Image *,const double,ExceptionInfo *), + *CharcoalImage(const Image *,const double,const double,ExceptionInfo *), + *ColorizeImage(const Image *,const char *,const PixelInfo *,ExceptionInfo *), + *ColorMatrixImage(const Image *,const KernelInfo *kernel,ExceptionInfo *), + *ImplodeImage(const Image *,const double,const PixelInterpolateMethod, + ExceptionInfo *), + *MorphImages(const Image *,const size_t,ExceptionInfo *), + *PolaroidImage(const Image *,const DrawInfo *,const char *,const double, + const PixelInterpolateMethod,ExceptionInfo *), + *SepiaToneImage(const Image *,const double,ExceptionInfo *), + *ShadowImage(const Image *,const double,const double,const ssize_t, + const ssize_t,ExceptionInfo *), + *SketchImage(const Image *,const double,const double,const double, + ExceptionInfo *), + *SteganoImage(const Image *,const Image *,ExceptionInfo *), + *StereoImage(const Image *,const Image *,ExceptionInfo *), + *StereoAnaglyphImage(const Image *,const Image *,const ssize_t,const ssize_t, + ExceptionInfo *), + *SwirlImage(const Image *,double,const PixelInterpolateMethod, + ExceptionInfo *), + *TintImage(const Image *,const char *,const PixelInfo *,ExceptionInfo *), + *VignetteImage(const Image *,const double,const double,const ssize_t, + const ssize_t,ExceptionInfo *), + *WaveImage(const Image *,const double,const double, + const PixelInterpolateMethod,ExceptionInfo *), + *WaveletDenoiseImage(const Image *,const double,const double,ExceptionInfo *); + +extern MagickExport MagickBooleanType + PlasmaImage(Image *,const SegmentInfo *,size_t,size_t,ExceptionInfo *), + SolarizeImage(Image *,const double,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/widget.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/widget.h new file mode 100644 index 0000000000..41b6e32dd8 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/widget.h @@ -0,0 +1,29 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore X11 widget methods. +*/ +#ifndef MAGICKCORE_WIDGET_H +#define MAGICKCORE_WIDGET_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/xml-tree.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/xml-tree.h new file mode 100644 index 0000000000..60f0a393a9 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/xml-tree.h @@ -0,0 +1,50 @@ +/* + Copyright @ 2004 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Magick's toolkit xml-tree methods. +*/ +#ifndef MAGICKCORE_XML_TREE_H +#define MAGICKCORE_XML_TREE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _XMLTreeInfo + XMLTreeInfo; + +extern MagickExport char + *XMLTreeInfoToXML(XMLTreeInfo *); + +extern MagickExport const char + *GetXMLTreeAttribute(XMLTreeInfo *,const char *), + *GetXMLTreeContent(XMLTreeInfo *), + *GetXMLTreeTag(XMLTreeInfo *); + +extern MagickExport XMLTreeInfo + *AddChildToXMLTree(XMLTreeInfo *,const char *,const size_t), + *DestroyXMLTree(XMLTreeInfo *), + *GetNextXMLTreeTag(XMLTreeInfo *), + *GetXMLTreeChild(XMLTreeInfo *,const char *), + *GetXMLTreeSibling(XMLTreeInfo *), + *NewXMLTree(const char *,ExceptionInfo *), + *NewXMLTreeTag(const char *), + *SetXMLTreeContent(XMLTreeInfo *,const char *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/xwindow.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/xwindow.h new file mode 100644 index 0000000000..a3603c4a1c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickCore/xwindow.h @@ -0,0 +1,45 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore X11 window methods. +*/ +#ifndef MAGICKCORE_XWINDOW_H +#define MAGICKCORE_XWINDOW_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _XImportInfo +{ + MagickBooleanType + frame, + borders, + screen, + descend, + silent; +} XImportInfo; + +extern MagickExport Image + *XImportImage(const ImageInfo *,XImportInfo *,ExceptionInfo *); + +extern MagickExport void + XGetImportInfo(XImportInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/MagickWand.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/MagickWand.h new file mode 100644 index 0000000000..11fef4445c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/MagickWand.h @@ -0,0 +1,133 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand Application Programming Interface declarations. +*/ + +#ifndef MAGICKWAND_MAGICKWAND_H +#define MAGICKWAND_MAGICKWAND_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if !defined(MAGICKWAND_CONFIG_H) +# define MAGICKWAND_CONFIG_H +# if !defined(vms) +# include "MagickCore/magick-config.h" +# else +# include "magick-config.h" +# endif +#if defined(_magickcore_const) && !defined(const) +# define const _magickcore_const +#endif +#if defined(_magickcore_inline) && !defined(inline) +# define inline _magickcore_inline +#endif +#if !defined(magick_restrict) +# if !defined(_magickcore_restrict) +# define magick_restrict restrict +# else +# define magick_restrict _magickcore_restrict +# endif +#endif +# if defined(__cplusplus) || defined(c_plusplus) +# undef inline +# endif +#endif + +#define MAGICKWAND_CHECK_VERSION(major,minor,micro) \ + ((MAGICKWAND_MAJOR_VERSION > (major)) || \ + ((MAGICKWAND_MAJOR_VERSION == (major)) && \ + (MAGICKWAND_MINOR_VERSION > (minor))) || \ + ((MAGICKWAND_MAJOR_VERSION == (major)) && \ + (MAGICKWAND_MINOR_VERSION == (minor)) && \ + (MAGICKWAND_MICRO_VERSION >= (micro)))) + +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(WIN64) +# define MAGICKWAND_WINDOWS_SUPPORT +#else +# define MAGICKWAND_POSIX_SUPPORT +#endif + +typedef struct _MagickWand + MagickWand; + +#include "MagickWand/method-attribute.h" +#include "MagickCore/MagickCore.h" +#include "MagickWand/animate.h" +#include "MagickWand/compare.h" +#include "MagickWand/composite.h" +#include "MagickWand/conjure.h" +#include "MagickWand/deprecate.h" +#include "MagickWand/display.h" +#include "MagickWand/drawing-wand.h" +#include "MagickWand/identify.h" +#include "MagickWand/import.h" +#include "MagickWand/wandcli.h" +#include "MagickWand/operation.h" +#include "MagickWand/magick-cli.h" +#include "MagickWand/magick-property.h" +#include "MagickWand/magick-image.h" +#include "MagickWand/mogrify.h" +#include "MagickWand/montage.h" +#include "MagickWand/pixel-iterator.h" +#include "MagickWand/pixel-wand.h" +#include "MagickWand/stream.h" +#include "MagickWand/wand-view.h" + +extern WandExport char + *MagickGetException(const MagickWand *,ExceptionType *); + +extern WandExport ExceptionType + MagickGetExceptionType(const MagickWand *); + +extern WandExport MagickBooleanType + IsMagickWand(const MagickWand *), + IsMagickWandInstantiated(void), + MagickClearException(MagickWand *), + MagickSetIteratorIndex(MagickWand *,const ssize_t); + +extern WandExport MagickWand + *CloneMagickWand(const MagickWand *), + *DestroyMagickWand(MagickWand *), + *NewMagickWand(void), + *NewMagickWandFromImage(const Image *); + +extern WandExport ssize_t + MagickGetIteratorIndex(MagickWand *); + +extern WandExport void + ClearMagickWand(MagickWand *), + MagickWandGenesis(void), + MagickWandTerminus(void), + *MagickRelinquishMemory(void *), + MagickResetIterator(MagickWand *), + MagickSetFirstIterator(MagickWand *), + MagickSetLastIterator(MagickWand *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/animate.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/animate.h new file mode 100644 index 0000000000..b78225eb6d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/animate.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand animate command-line methods. +*/ +#ifndef MAGICKWAND_ANIMATE_H +#define MAGICKWAND_ANIMATE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + AnimateImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/compare.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/compare.h new file mode 100644 index 0000000000..7aae6364ec --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/compare.h @@ -0,0 +1,32 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand compare command-line method. +*/ +#ifndef MAGICKWAND_COMPARE_H +#define MAGICKWAND_COMPARE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + CompareImagesCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/composite.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/composite.h new file mode 100644 index 0000000000..3895c26dad --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/composite.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand composite command-line method. +*/ +#ifndef MAGICKWAND_COMPOSITE_H +#define MAGICKWAND_COMPOSITE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + CompositeImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/conjure.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/conjure.h new file mode 100644 index 0000000000..f11c94b619 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/conjure.h @@ -0,0 +1,32 @@ +/* + Copyright @ 2001 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand conjure command-line method. +*/ +#ifndef MAGICKWAND_CONJURE_H +#define MAGICKWAND_CONJURE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + ConjureImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/deprecate.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/deprecate.h new file mode 100644 index 0000000000..0f9a63c676 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/deprecate.h @@ -0,0 +1,40 @@ +/* + Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickCore deprecated methods. +*/ +#ifndef MAGICKWAND_DEPRECATE_H +#define MAGICKWAND_DEPRECATE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#include "MagickWand/pixel-wand.h" + +#if !defined(MAGICKCORE_EXCLUDE_DEPRECATED) + +extern WandExport MagickBooleanType + ConvertImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *), + MagickGetImageAlphaColor(MagickWand *,PixelWand *), + MagickSetImageAlphaColor(MagickWand *,const PixelWand *); + +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/display.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/display.h new file mode 100644 index 0000000000..e39ad3b37d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/display.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand display command-line method. +*/ +#ifndef MAGICKWAND_DISPLAY_H +#define MAGICKWAND_DISPLAY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + DisplayImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/drawing-wand.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/drawing-wand.h new file mode 100644 index 0000000000..c4008b351e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/drawing-wand.h @@ -0,0 +1,230 @@ +/* + Copyright @ 2002 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand drawing wand methods. +*/ +#ifndef MAGICKWAND_DRAWING_WAND_H +#define MAGICKWAND_DRAWING_WAND_H + +#include "MagickWand/pixel-wand.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _DrawingWand + DrawingWand; + +extern WandExport AlignType + DrawGetTextAlignment(const DrawingWand *); + +extern WandExport char + *DrawGetClipPath(const DrawingWand *), + *DrawGetDensity(const DrawingWand *), + *DrawGetException(const DrawingWand *,ExceptionType *), + *DrawGetFont(const DrawingWand *), + *DrawGetFontFamily(const DrawingWand *), + *DrawGetTextEncoding(const DrawingWand *), + *DrawGetVectorGraphics(DrawingWand *); + +extern WandExport ClipPathUnits + DrawGetClipUnits(const DrawingWand *) magick_attribute((__pure__)); + +extern WandExport DecorationType + DrawGetTextDecoration(const DrawingWand *) magick_attribute((__pure__)); + +extern WandExport DirectionType + DrawGetTextDirection(const DrawingWand *); + +extern WandExport double + DrawGetFillOpacity(const DrawingWand *) magick_attribute((__pure__)), + DrawGetFontSize(const DrawingWand *) magick_attribute((__pure__)), + DrawGetOpacity(const DrawingWand *) magick_attribute((__pure__)), + *DrawGetStrokeDashArray(const DrawingWand *,size_t *), + DrawGetStrokeDashOffset(const DrawingWand *) magick_attribute((__pure__)), + DrawGetStrokeOpacity(const DrawingWand *) magick_attribute((__pure__)), + DrawGetStrokeWidth(const DrawingWand *) magick_attribute((__pure__)), + DrawGetTextKerning(DrawingWand *) magick_attribute((__pure__)), + DrawGetTextInterlineSpacing(DrawingWand *) magick_attribute((__pure__)), + DrawGetTextInterwordSpacing(DrawingWand *) magick_attribute((__pure__)); + +extern WandExport DrawInfo + *PeekDrawingWand(const DrawingWand *); + +extern WandExport DrawingWand + *AcquireDrawingWand(const DrawInfo *,Image *), + *CloneDrawingWand(const DrawingWand *), + *DestroyDrawingWand(DrawingWand *), + *NewDrawingWand(void); + +extern WandExport ExceptionInfo + *DrawCloneExceptionInfo(const DrawingWand *wand); + +extern WandExport ExceptionType + DrawGetExceptionType(const DrawingWand *); + +extern WandExport FillRule + DrawGetClipRule(const DrawingWand *) magick_attribute((__pure__)), + DrawGetFillRule(const DrawingWand *) magick_attribute((__pure__)); + +extern WandExport GravityType + DrawGetGravity(const DrawingWand *) magick_attribute((__pure__)); + +extern WandExport LineCap + DrawGetStrokeLineCap(const DrawingWand *) magick_attribute((__pure__)); + +extern WandExport LineJoin + DrawGetStrokeLineJoin(const DrawingWand *) magick_attribute((__pure__)); + +extern WandExport MagickBooleanType + DrawClearException(DrawingWand *), + DrawComposite(DrawingWand *,const CompositeOperator,const double, + const double,const double,const double,MagickWand *), + DrawGetFontResolution(const DrawingWand *,double *,double *), + DrawGetStrokeAntialias(const DrawingWand *) magick_attribute((__pure__)), + DrawGetTextAntialias(const DrawingWand *) magick_attribute((__pure__)), + DrawGetTypeMetrics(const DrawingWand *,const char *,MagickBooleanType, + TypeMetric *), + DrawPopPattern(DrawingWand *), + DrawPushPattern(DrawingWand *,const char *,const double,const double, + const double,const double), + DrawRender(DrawingWand *), + DrawSetClipPath(DrawingWand *,const char *), + DrawSetDensity(DrawingWand *,const char *), + DrawSetFillPatternURL(DrawingWand *,const char *), + DrawSetFont(DrawingWand *,const char *), + DrawSetFontFamily(DrawingWand *,const char *), + DrawSetFontResolution(DrawingWand *,const double,const double), + DrawSetStrokeDashArray(DrawingWand *,const size_t,const double *), + DrawSetStrokePatternURL(DrawingWand *,const char *), + DrawSetVectorGraphics(DrawingWand *,const char *), + IsDrawingWand(const DrawingWand *), + PopDrawingWand(DrawingWand *), + PushDrawingWand(DrawingWand *); + +extern WandExport StretchType + DrawGetFontStretch(const DrawingWand *); + +extern WandExport StyleType + DrawGetFontStyle(const DrawingWand *); + +extern WandExport size_t + DrawGetFontWeight(const DrawingWand *) magick_attribute((__pure__)), + DrawGetStrokeMiterLimit(const DrawingWand *) magick_attribute((__pure__)); + +extern WandExport void + ClearDrawingWand(DrawingWand *), + DrawAffine(DrawingWand *,const AffineMatrix *), + DrawAlpha(DrawingWand *,const double,const double,const PaintMethod), + DrawAnnotation(DrawingWand *,const double,const double,const unsigned char *), + DrawArc(DrawingWand *,const double,const double,const double,const double, + const double,const double), + DrawBezier(DrawingWand *,const size_t,const PointInfo *), + DrawGetBorderColor(const DrawingWand *,PixelWand *), + DrawCircle(DrawingWand *,const double,const double,const double,const double), + DrawColor(DrawingWand *,const double,const double,const PaintMethod), + DrawComment(DrawingWand *,const char *), + DrawEllipse(DrawingWand *,const double,const double,const double,const double, + const double,const double), + DrawGetFillColor(const DrawingWand *,PixelWand *), + DrawGetStrokeColor(const DrawingWand *,PixelWand *), + DrawSetTextKerning(DrawingWand *,const double), + DrawSetTextInterlineSpacing(DrawingWand *,const double), + DrawSetTextInterwordSpacing(DrawingWand *,const double), + DrawGetTextUnderColor(const DrawingWand *,PixelWand *), + DrawLine(DrawingWand *,const double, const double,const double,const double), + DrawPathClose(DrawingWand *), + DrawPathCurveToAbsolute(DrawingWand *,const double,const double,const double, + const double,const double,const double), + DrawPathCurveToRelative(DrawingWand *,const double,const double,const double, + const double,const double, const double), + DrawPathCurveToQuadraticBezierAbsolute(DrawingWand *,const double, + const double,const double,const double), + DrawPathCurveToQuadraticBezierRelative(DrawingWand *,const double, + const double,const double,const double), + DrawPathCurveToQuadraticBezierSmoothAbsolute(DrawingWand *,const double, + const double), + DrawPathCurveToQuadraticBezierSmoothRelative(DrawingWand *,const double, + const double), + DrawPathCurveToSmoothAbsolute(DrawingWand *,const double,const double, + const double,const double), + DrawPathCurveToSmoothRelative(DrawingWand *,const double,const double, + const double,const double), + DrawPathEllipticArcAbsolute(DrawingWand *,const double,const double, + const double,const MagickBooleanType,const MagickBooleanType,const double, + const double), + DrawPathEllipticArcRelative(DrawingWand *,const double,const double, + const double,const MagickBooleanType,const MagickBooleanType,const double, + const double), + DrawPathFinish(DrawingWand *), + DrawPathLineToAbsolute(DrawingWand *,const double,const double), + DrawPathLineToRelative(DrawingWand *,const double,const double), + DrawPathLineToHorizontalAbsolute(DrawingWand *,const double), + DrawPathLineToHorizontalRelative(DrawingWand *,const double), + DrawPathLineToVerticalAbsolute(DrawingWand *,const double), + DrawPathLineToVerticalRelative(DrawingWand *,const double), + DrawPathMoveToAbsolute(DrawingWand *,const double,const double), + DrawPathMoveToRelative(DrawingWand *,const double,const double), + DrawPathStart(DrawingWand *), + DrawPoint(DrawingWand *,const double,const double), + DrawPolygon(DrawingWand *,const size_t,const PointInfo *), + DrawPolyline(DrawingWand *,const size_t,const PointInfo *), + DrawPopClipPath(DrawingWand *), + DrawPopDefs(DrawingWand *), + DrawPushClipPath(DrawingWand *,const char *), + DrawPushDefs(DrawingWand *), + DrawRectangle(DrawingWand *,const double,const double,const double, + const double), + DrawResetVectorGraphics(DrawingWand *), + DrawRotate(DrawingWand *,const double), + DrawRoundRectangle(DrawingWand *,double,double,double,double,double,double), + DrawScale(DrawingWand *,const double,const double), + DrawSetBorderColor(DrawingWand *,const PixelWand *), + DrawSetClipRule(DrawingWand *,const FillRule), + DrawSetClipUnits(DrawingWand *,const ClipPathUnits), + DrawSetFillColor(DrawingWand *,const PixelWand *), + DrawSetFillOpacity(DrawingWand *,const double), + DrawSetFillRule(DrawingWand *,const FillRule), + DrawSetFontSize(DrawingWand *,const double), + DrawSetFontStretch(DrawingWand *,const StretchType), + DrawSetFontStyle(DrawingWand *,const StyleType), + DrawSetFontWeight(DrawingWand *,const size_t), + DrawSetGravity(DrawingWand *,const GravityType), + DrawSetOpacity(DrawingWand *,const double), + DrawSetStrokeAntialias(DrawingWand *,const MagickBooleanType), + DrawSetStrokeColor(DrawingWand *,const PixelWand *), + DrawSetStrokeDashOffset(DrawingWand *,const double dashoffset), + DrawSetStrokeLineCap(DrawingWand *,const LineCap), + DrawSetStrokeLineJoin(DrawingWand *,const LineJoin), + DrawSetStrokeMiterLimit(DrawingWand *,const size_t), + DrawSetStrokeOpacity(DrawingWand *, const double), + DrawSetStrokeWidth(DrawingWand *,const double), + DrawSetTextAlignment(DrawingWand *,const AlignType), + DrawSetTextAntialias(DrawingWand *,const MagickBooleanType), + DrawSetTextDecoration(DrawingWand *,const DecorationType), + DrawSetTextDirection(DrawingWand *,const DirectionType), + DrawSetTextEncoding(DrawingWand *,const char *), + DrawSetTextUnderColor(DrawingWand *,const PixelWand *), + DrawSetViewbox(DrawingWand *,const double,const double,const double, + const double), + DrawSkewX(DrawingWand *,const double), + DrawSkewY(DrawingWand *,const double), + DrawTranslate(DrawingWand *,const double,const double); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/identify.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/identify.h new file mode 100644 index 0000000000..9bd6092a73 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/identify.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand identify command-line method. +*/ +#ifndef MAGICKWAND_IDENTIFY_H +#define MAGICKWAND_IDENTIFY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + IdentifyImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/import.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/import.h new file mode 100644 index 0000000000..4ab10283e6 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/import.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand import command-line method. +*/ +#ifndef MAGICKWAND_IMPORT_H +#define MAGICKWAND_IMPORT_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + ImportImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-cli.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-cli.h new file mode 100644 index 0000000000..d4291847f1 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-cli.h @@ -0,0 +1,43 @@ +/* + Copyright @ 2012 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand convert command-line method. +*/ +#ifndef MAGICKWAND_MAGICK_CLI_H +#define MAGICKWAND_MAGICK_CLI_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef MagickBooleanType + (*MagickCommand)(ImageInfo *,int,char **,char **,ExceptionInfo *); + +extern WandExport void + ProcessScriptOptions(MagickCLI *,const char *,int,char **,int); + +extern WandExport int + ProcessCommandOptions(MagickCLI *,int,char **,int); + +extern WandExport MagickBooleanType + MagickCommandGenesis(ImageInfo *,MagickCommand,int,char **,char **, + ExceptionInfo *), + MagickImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-image.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-image.h new file mode 100644 index 0000000000..6027c434e3 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-image.h @@ -0,0 +1,426 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand image Methods. +*/ + +#ifndef MAGICKWAND_MAGICK_IMAGE_H +#define MAGICKWAND_MAGICK_IMAGE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport ChannelFeatures + *MagickGetImageFeatures(MagickWand *,const size_t); + +extern WandExport ChannelType + MagickSetImageChannelMask(MagickWand *,const ChannelType); + +extern WandExport ChannelStatistics + *MagickGetImageStatistics(MagickWand *); + +extern WandExport char + *MagickGetImageFilename(MagickWand *), + *MagickGetImageFormat(MagickWand *), + *MagickGetImageSignature(MagickWand *), + *MagickIdentifyImage(MagickWand *); + +extern WandExport ColorspaceType + MagickGetImageColorspace(MagickWand *); + +extern WandExport CompositeOperator + MagickGetImageCompose(MagickWand *); + +extern WandExport CompressionType + MagickGetImageCompression(MagickWand *); + +extern WandExport DisposeType + MagickGetImageDispose(MagickWand *); + +extern WandExport double + *MagickGetImageDistortions(MagickWand *,const MagickWand *, + const MetricType), + MagickGetImageFuzz(MagickWand *), + MagickGetImageGamma(MagickWand *), + MagickGetImageTotalInkDensity(MagickWand *); + +extern WandExport EndianType + MagickGetImageEndian(MagickWand *); + +extern WandExport FilterType + MagickGetImageFilter(MagickWand *); + +extern WandExport GravityType + MagickGetImageGravity(MagickWand *); + +extern WandExport Image + *MagickDestroyImage(Image *), + *GetImageFromMagickWand(const MagickWand *); + +extern WandExport ImageType + MagickGetImageType(MagickWand *), + MagickIdentifyImageType(MagickWand *); + +extern WandExport InterlaceType + MagickGetImageInterlaceScheme(MagickWand *); + +extern WandExport PixelInterpolateMethod + MagickGetImageInterpolateMethod(MagickWand *); + +extern WandExport MagickBooleanType + MagickAdaptiveBlurImage(MagickWand *,const double,const double), + MagickAdaptiveResizeImage(MagickWand *,const size_t,const size_t), + MagickAdaptiveSharpenImage(MagickWand *,const double,const double), + MagickAdaptiveThresholdImage(MagickWand *,const size_t,const size_t, + const double), + MagickAddImage(MagickWand *,const MagickWand *), + MagickAddNoiseImage(MagickWand *,const NoiseType,const double), + MagickAffineTransformImage(MagickWand *,const DrawingWand *), + MagickAnnotateImage(MagickWand *,const DrawingWand *,const double, + const double,const double,const char *), + MagickAnimateImages(MagickWand *,const char *), + MagickAutoGammaImage(MagickWand *), + MagickAutoLevelImage(MagickWand *), + MagickAutoOrientImage(MagickWand *), + MagickAutoThresholdImage(MagickWand *,const AutoThresholdMethod), + MagickBilateralBlurImage(MagickWand *,const double,const double,const double, + const double), + MagickBlackThresholdImage(MagickWand *,const PixelWand *), + MagickBlueShiftImage(MagickWand *,const double), + MagickBlurImage(MagickWand *,const double,const double), + MagickBorderImage(MagickWand *,const PixelWand *,const size_t,const size_t, + const CompositeOperator compose), + MagickBrightnessContrastImage(MagickWand *,const double,const double), + MagickCannyEdgeImage(MagickWand *,const double,const double,const double, + const double), + MagickCharcoalImage(MagickWand *,const double,const double), + MagickChopImage(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t), + MagickCLAHEImage(MagickWand *,const size_t,const size_t,const double, + const double), + MagickClampImage(MagickWand *), + MagickClipImage(MagickWand *), + MagickClipImagePath(MagickWand *,const char *,const MagickBooleanType), + MagickClutImage(MagickWand *,const MagickWand *,const PixelInterpolateMethod), + MagickColorDecisionListImage(MagickWand *,const char *), + MagickColorizeImage(MagickWand *,const PixelWand *,const PixelWand *), + MagickColorMatrixImage(MagickWand *,const KernelInfo *), + MagickColorThresholdImage(MagickWand *,const PixelWand *,const PixelWand *), + MagickCommentImage(MagickWand *,const char *), + MagickCompositeImage(MagickWand *,const MagickWand *,const CompositeOperator, + const MagickBooleanType,const ssize_t,const ssize_t), + MagickCompositeImageGravity(MagickWand *,const MagickWand *, + const CompositeOperator,const GravityType), + MagickCompositeLayers(MagickWand *,const MagickWand *,const CompositeOperator, + const ssize_t,const ssize_t), + MagickConnectedComponentsImage(MagickWand *,const size_t,CCObjectInfo **), + MagickConstituteImage(MagickWand *,const size_t,const size_t,const char *, + const StorageType,const void *), + MagickContrastImage(MagickWand *,const MagickBooleanType), + MagickContrastStretchImage(MagickWand *,const double,const double), + MagickConvolveImage(MagickWand *,const KernelInfo *), + MagickCropImage(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t), + MagickCycleColormapImage(MagickWand *,const ssize_t), + MagickDecipherImage(MagickWand *,const char *), + MagickDeskewImage(MagickWand *,const double), + MagickDespeckleImage(MagickWand *), + MagickDisplayImage(MagickWand *,const char *), + MagickDisplayImages(MagickWand *,const char *), + MagickDistortImage(MagickWand *,const DistortMethod,const size_t, + const double *,const MagickBooleanType), + MagickDrawImage(MagickWand *,const DrawingWand *), + MagickEdgeImage(MagickWand *,const double), + MagickEmbossImage(MagickWand *,const double,const double), + MagickEncipherImage(MagickWand *,const char *), + MagickEnhanceImage(MagickWand *), + MagickEqualizeImage(MagickWand *), + MagickEvaluateImage(MagickWand *,const MagickEvaluateOperator,const double), + MagickExportImagePixels(MagickWand *,const ssize_t,const ssize_t, + const size_t,const size_t,const char *,const StorageType,void *), + MagickExtentImage(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t), + MagickFlipImage(MagickWand *), + MagickFloodfillPaintImage(MagickWand *,const PixelWand *,const double, + const PixelWand *,const ssize_t,const ssize_t,const MagickBooleanType), + MagickFlopImage(MagickWand *), + MagickForwardFourierTransformImage(MagickWand *,const MagickBooleanType), + MagickFrameImage(MagickWand *,const PixelWand *,const size_t,const size_t, + const ssize_t,const ssize_t,const CompositeOperator), + MagickFunctionImage(MagickWand *,const MagickFunction,const size_t, + const double *), + MagickGammaImage(MagickWand *,const double), + MagickGaussianBlurImage(MagickWand *,const double,const double), + MagickGetImageAlphaChannel(MagickWand *), + MagickGetImageBackgroundColor(MagickWand *,PixelWand *), + MagickGetImageBluePrimary(MagickWand *,double *,double *,double *), + MagickGetImageBorderColor(MagickWand *,PixelWand *), + MagickGetImageKurtosis(MagickWand *,double *,double *), + MagickGetImageMean(MagickWand *,double *,double *), + MagickGetImageRange(MagickWand *,double *,double *), + MagickGetImageColormapColor(MagickWand *,const size_t,PixelWand *), + MagickGetImageDistortion(MagickWand *,const MagickWand *,const MetricType, + double *), + MagickGetImageGreenPrimary(MagickWand *,double *,double *,double *), + MagickGetImageLength(MagickWand *,MagickSizeType *), + MagickGetImageMatteColor(MagickWand *,PixelWand *), + MagickGetImagePage(MagickWand *,size_t *,size_t *,ssize_t *, + ssize_t *), + MagickGetImagePixelColor(MagickWand *,const ssize_t,const ssize_t, + PixelWand *), + MagickGetImageRange(MagickWand *,double *,double *), + MagickGetImageRedPrimary(MagickWand *,double *,double *,double *), + MagickGetImageResolution(MagickWand *,double *,double *), + MagickGetImageWhitePoint(MagickWand *,double *,double *,double *), + MagickHaldClutImage(MagickWand *,const MagickWand *), + MagickHasNextImage(MagickWand *), + MagickHasPreviousImage(MagickWand *), + MagickHoughLineImage(MagickWand *,const size_t,const size_t,const size_t), + MagickImplodeImage(MagickWand *,const double,const PixelInterpolateMethod), + MagickImportImagePixels(MagickWand *,const ssize_t,const ssize_t,const size_t, + const size_t,const char *,const StorageType,const void *), + MagickInterpolativeResizeImage(MagickWand *,const size_t,const size_t, + const PixelInterpolateMethod), + MagickInverseFourierTransformImage(MagickWand *,MagickWand *, + const MagickBooleanType), + MagickKmeansImage(MagickWand *, const size_t, const size_t, const double), + MagickKuwaharaImage(MagickWand *,const double,const double), + MagickLabelImage(MagickWand *,const char *), + MagickLevelImage(MagickWand *,const double,const double,const double), + MagickLevelImageColors(MagickWand *,const PixelWand *,const PixelWand *, + const MagickBooleanType), + MagickLevelizeImage(MagickWand *,const double,const double,const double), + MagickLinearStretchImage(MagickWand *,const double,const double), + MagickLiquidRescaleImage(MagickWand *,const size_t,const size_t,const double, + const double), + MagickLocalContrastImage(MagickWand *,const double,const double), + MagickMagnifyImage(MagickWand *), + MagickMeanShiftImage(MagickWand *,const size_t,const size_t,const double), + MagickMinifyImage(MagickWand *), + MagickModeImage(MagickWand *,const double), + MagickModulateImage(MagickWand *,const double,const double,const double), + MagickMorphologyImage(MagickWand *,const MorphologyMethod,const ssize_t, + const KernelInfo *), + MagickMotionBlurImage(MagickWand *,const double,const double,const double), + MagickNegateImage(MagickWand *,const MagickBooleanType), + MagickNewImage(MagickWand *,const size_t,const size_t,const PixelWand *), + MagickNextImage(MagickWand *), + MagickNormalizeImage(MagickWand *), + MagickOilPaintImage(MagickWand *,const double,const double), + MagickOpaquePaintImage(MagickWand *,const PixelWand *,const PixelWand *, + const double,const MagickBooleanType), + MagickOptimizeImageTransparency(MagickWand *), + MagickOrderedDitherImage(MagickWand *,const char *), + MagickPolynomialImage(MagickWand *,const size_t,const double *), + MagickTransparentPaintImage(MagickWand *,const PixelWand *, + const double,const double,const MagickBooleanType invert), + MagickPingImage(MagickWand *,const char *), + MagickPingImageBlob(MagickWand *,const void *,const size_t), + MagickPingImageFile(MagickWand *,FILE *), + MagickPolaroidImage(MagickWand *,const DrawingWand *,const char *, + const double,const PixelInterpolateMethod), + MagickPosterizeImage(MagickWand *,const size_t,const DitherMethod), + MagickPreviousImage(MagickWand *), + MagickQuantizeImage(MagickWand *,const size_t,const ColorspaceType, + const size_t,const DitherMethod,const MagickBooleanType), + MagickQuantizeImages(MagickWand *,const size_t,const ColorspaceType, + const size_t,const DitherMethod,const MagickBooleanType), + MagickRangeThresholdImage(MagickWand *,const double,const double, + const double,const double), + MagickRotationalBlurImage(MagickWand *,const double), + MagickRaiseImage(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t,const MagickBooleanType), + MagickRandomThresholdImage(MagickWand *,const double,const double), + MagickReadImage(MagickWand *,const char *), + MagickReadImageBlob(MagickWand *,const void *,const size_t), + MagickReadImageFile(MagickWand *,FILE *), + MagickReduceNoiseImage(MagickWand *,const double), + MagickRemapImage(MagickWand *,const MagickWand *,const DitherMethod), + MagickRemoveImage(MagickWand *), + MagickResampleImage(MagickWand *,const double,const double,const FilterType), + MagickResetImagePage(MagickWand *,const char *), + MagickResizeImage(MagickWand *,const size_t,const size_t,const FilterType), + MagickRollImage(MagickWand *,const ssize_t,const ssize_t), + MagickRotateImage(MagickWand *,const PixelWand *,const double), + MagickSampleImage(MagickWand *,const size_t,const size_t), + MagickScaleImage(MagickWand *,const size_t,const size_t), + MagickSegmentImage(MagickWand *,const ColorspaceType,const MagickBooleanType, + const double,const double), + MagickSelectiveBlurImage(MagickWand *,const double,const double, + const double), + MagickSeparateImage(MagickWand *,const ChannelType), + MagickSepiaToneImage(MagickWand *,const double), + MagickSetImage(MagickWand *,const MagickWand *), + MagickSetImageAlpha(MagickWand *,const double), + MagickSetImageAlphaChannel(MagickWand *,const AlphaChannelOption), + MagickSetImageBackgroundColor(MagickWand *,const PixelWand *), + MagickSetImageBluePrimary(MagickWand *,const double,const double, + const double), + MagickSetImageBorderColor(MagickWand *,const PixelWand *), + MagickSetImageColor(MagickWand *,const PixelWand *), + MagickSetImageColormapColor(MagickWand *,const size_t, + const PixelWand *), + MagickSetImageColorspace(MagickWand *,const ColorspaceType), + MagickSetImageCompose(MagickWand *,const CompositeOperator), + MagickSetImageCompression(MagickWand *,const CompressionType), + MagickSetImageDelay(MagickWand *,const size_t), + MagickSetImageDepth(MagickWand *,const size_t), + MagickSetImageDispose(MagickWand *,const DisposeType), + MagickSetImageCompressionQuality(MagickWand *,const size_t), + MagickSetImageEndian(MagickWand *,const EndianType), + MagickSetImageExtent(MagickWand *,const size_t,const size_t), + MagickSetImageFilename(MagickWand *,const char *), + MagickSetImageFilter(MagickWand *,const FilterType), + MagickSetImageFormat(MagickWand *,const char *), + MagickSetImageFuzz(MagickWand *,const double), + MagickSetImageGamma(MagickWand *,const double), + MagickSetImageGravity(MagickWand *,const GravityType), + MagickSetImageGreenPrimary(MagickWand *,const double,const double, + const double), + MagickSetImageInterlaceScheme(MagickWand *,const InterlaceType), + MagickSetImageInterpolateMethod(MagickWand *,const PixelInterpolateMethod), + MagickSetImageIterations(MagickWand *,const size_t), + MagickSetImageMask(MagickWand *,const PixelMask,const MagickWand *), + MagickSetImageMatte(MagickWand *,const MagickBooleanType), + MagickSetImageMatteColor(MagickWand *,const PixelWand *), + MagickSetImageOrientation(MagickWand *,const OrientationType), + MagickSetImagePage(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t), + MagickSetImagePixelColor(MagickWand *,const ssize_t,const ssize_t, + const PixelWand *), + MagickSetImageRedPrimary(MagickWand *,const double,const double, + const double), + MagickSetImageRenderingIntent(MagickWand *,const RenderingIntent), + MagickSetImageResolution(MagickWand *,const double,const double), + MagickSetImageScene(MagickWand *,const size_t), + MagickSetImageTicksPerSecond(MagickWand *,const ssize_t), + MagickSetImageType(MagickWand *,const ImageType), + MagickSetImageUnits(MagickWand *,const ResolutionType), + MagickSetImageWhitePoint(MagickWand *,const double,const double, + const double), + MagickShadeImage(MagickWand *,const MagickBooleanType,const double, + const double), + MagickShadowImage(MagickWand *,const double,const double,const ssize_t, + const ssize_t), + MagickSharpenImage(MagickWand *,const double,const double), + MagickShaveImage(MagickWand *,const size_t,const size_t), + MagickShearImage(MagickWand *,const PixelWand *,const double,const double), + MagickSigmoidalContrastImage(MagickWand *,const MagickBooleanType, + const double,const double), + MagickSketchImage(MagickWand *,const double,const double,const double), + MagickSolarizeImage(MagickWand *,const double), + MagickSparseColorImage(MagickWand *,const SparseColorMethod,const size_t, + const double *), + MagickSpliceImage(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t), + MagickSpreadImage(MagickWand *,const PixelInterpolateMethod,const double), + MagickStatisticImage(MagickWand *,const StatisticType,const size_t, + const size_t), + MagickStripImage(MagickWand *), + MagickSwirlImage(MagickWand *,const double,const PixelInterpolateMethod), + MagickTintImage(MagickWand *,const PixelWand *,const PixelWand *), + MagickTransformImageColorspace(MagickWand *,const ColorspaceType), + MagickTransposeImage(MagickWand *), + MagickTransverseImage(MagickWand *), + MagickThresholdImage(MagickWand *,const double), + MagickThresholdImageChannel(MagickWand *,const ChannelType,const double), + MagickThumbnailImage(MagickWand *,const size_t,const size_t), + MagickTrimImage(MagickWand *,const double), + MagickUniqueImageColors(MagickWand *), + MagickUnsharpMaskImage(MagickWand *,const double,const double,const double, + const double), + MagickVignetteImage(MagickWand *,const double,const double,const ssize_t, + const ssize_t), + MagickWaveImage(MagickWand *,const double,const double, + const PixelInterpolateMethod), + MagickWaveletDenoiseImage(MagickWand *,const double,const double), + MagickWhiteBalanceImage(MagickWand *), + MagickWhiteThresholdImage(MagickWand *,const PixelWand *), + MagickWriteImage(MagickWand *,const char *), + MagickWriteImageFile(MagickWand *,FILE *), + MagickWriteImages(MagickWand *,const char *,const MagickBooleanType), + MagickWriteImagesFile(MagickWand *,FILE *); + +extern WandExport MagickProgressMonitor + MagickSetImageProgressMonitor(MagickWand *,const MagickProgressMonitor, + void *); + +extern WandExport MagickWand + *MagickAppendImages(MagickWand *,const MagickBooleanType), + *MagickChannelFxImage(MagickWand *,const char *), + *MagickCoalesceImages(MagickWand *), + *MagickCombineImages(MagickWand *,const ColorspaceType), + *MagickCompareImages(MagickWand *,const MagickWand *,const MetricType, + double *), + *MagickCompareImagesLayers(MagickWand *,const LayerMethod), + *MagickComplexImages(MagickWand *,const ComplexOperator), + *MagickDeconstructImages(MagickWand *), + *MagickEvaluateImages(MagickWand *,const MagickEvaluateOperator), + *MagickFxImage(MagickWand *,const char *), + *MagickGetImage(MagickWand *), + *MagickGetImageMask(MagickWand *,const PixelMask), + *MagickGetImageRegion(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t), + *MagickMergeImageLayers(MagickWand *,const LayerMethod), + *MagickMorphImages(MagickWand *,const size_t), + *MagickMontageImage(MagickWand *,const DrawingWand *,const char *, + const char *,const MontageMode,const char *), + *MagickOptimizeImageLayers(MagickWand *), + *MagickPreviewImages(MagickWand *wand,const PreviewType), + *MagickSimilarityImage(MagickWand *,const MagickWand *,const MetricType, + const double,RectangleInfo *,double *), + *MagickSmushImages(MagickWand *,const MagickBooleanType,const ssize_t), + *MagickSteganoImage(MagickWand *,const MagickWand *,const ssize_t), + *MagickStereoImage(MagickWand *,const MagickWand *), + *MagickTextureImage(MagickWand *,const MagickWand *); + +extern WandExport OrientationType + MagickGetImageOrientation(MagickWand *); + +extern WandExport PixelWand + **MagickGetImageHistogram(MagickWand *,size_t *); + +extern WandExport RenderingIntent + MagickGetImageRenderingIntent(MagickWand *); + +extern WandExport ResolutionType + MagickGetImageUnits(MagickWand *); + +extern WandExport size_t + MagickGetImageColors(MagickWand *), + MagickGetImageCompressionQuality(MagickWand *), + MagickGetImageDelay(MagickWand *), + MagickGetImageDepth(MagickWand *), + MagickGetImageHeight(MagickWand *), + MagickGetImageIterations(MagickWand *), + MagickGetImageScene(MagickWand *), + MagickGetImageTicksPerSecond(MagickWand *), + MagickGetImageWidth(MagickWand *), + MagickGetNumberImages(MagickWand *); + +extern WandExport unsigned char + *MagickGetImageBlob(MagickWand *,size_t *), + *MagickGetImagesBlob(MagickWand *,size_t *); + +extern WandExport VirtualPixelMethod + MagickGetImageVirtualPixelMethod(MagickWand *), + MagickSetImageVirtualPixelMethod(MagickWand *,const VirtualPixelMethod); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-property.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-property.h new file mode 100644 index 0000000000..9de6f114b9 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/magick-property.h @@ -0,0 +1,150 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand property, options, and profile methods. +*/ + +#ifndef MAGICKWAND_MAGICK_PROPERTY_H +#define MAGICKWAND_MAGICK_PROPERTY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport char + *MagickGetFilename(const MagickWand *), + *MagickGetFormat(MagickWand *), + *MagickGetFont(MagickWand *), + *MagickGetHomeURL(void), + *MagickGetImageArtifact(MagickWand *,const char *), + **MagickGetImageArtifacts(MagickWand *,const char *,size_t *), + **MagickGetImageProfiles(MagickWand *,const char *,size_t *), + *MagickGetImageProperty(MagickWand *,const char *), + **MagickGetImageProperties(MagickWand *,const char *,size_t *), + *MagickGetOption(MagickWand *,const char *), + **MagickGetOptions(MagickWand *,const char *,size_t *), + *MagickQueryConfigureOption(const char *), + **MagickQueryConfigureOptions(const char *,size_t *), + **MagickQueryFonts(const char *,size_t *), + **MagickQueryFormats(const char *,size_t *); + +extern WandExport ColorspaceType + MagickGetColorspace(MagickWand *); + +extern WandExport CompressionType + MagickGetCompression(MagickWand *); + +extern WandExport const char + *MagickGetCopyright(void), + *MagickGetPackageName(void), + *MagickGetQuantumDepth(size_t *), + *MagickGetQuantumRange(size_t *), + *MagickGetReleaseDate(void), + *MagickGetVersion(size_t *); + +extern WandExport double + MagickGetPointsize(MagickWand *), + *MagickGetSamplingFactors(MagickWand *,size_t *), + *MagickQueryFontMetrics(MagickWand *,const DrawingWand *,const char *), + *MagickQueryMultilineFontMetrics(MagickWand *,const DrawingWand *, + const char *); + +extern WandExport FilterType + MagickGetFilter(MagickWand *); + +extern WandExport GravityType + MagickGetGravity(MagickWand *); + +extern WandExport ImageType + MagickGetType(MagickWand *); + +extern WandExport InterlaceType + MagickGetInterlaceScheme(MagickWand *); + +extern WandExport PixelInterpolateMethod + MagickGetInterpolateMethod(MagickWand *); + +extern WandExport OrientationType + MagickGetOrientation(MagickWand *); + +extern WandExport MagickBooleanType + MagickDeleteImageArtifact(MagickWand *,const char *), + MagickDeleteImageProperty(MagickWand *,const char *), + MagickDeleteOption(MagickWand *,const char *), + MagickGetAntialias(const MagickWand *), + MagickGetPage(const MagickWand *,size_t *,size_t *,ssize_t *,ssize_t *), + MagickGetResolution(const MagickWand *,double *,double *), + MagickGetSize(const MagickWand *,size_t *,size_t *), + MagickGetSizeOffset(const MagickWand *,ssize_t *), + MagickProfileImage(MagickWand *,const char *,const void *,const size_t), + MagickSetAntialias(MagickWand *,const MagickBooleanType), + MagickSetBackgroundColor(MagickWand *,const PixelWand *), + MagickSetColorspace(MagickWand *,const ColorspaceType), + MagickSetCompression(MagickWand *,const CompressionType), + MagickSetCompressionQuality(MagickWand *,const size_t), + MagickSetDepth(MagickWand *,const size_t), + MagickSetExtract(MagickWand *,const char *), + MagickSetFilename(MagickWand *,const char *), + MagickSetFilter(MagickWand *,const FilterType), + MagickSetFormat(MagickWand *,const char *), + MagickSetFont(MagickWand *,const char *), + MagickSetGravity(MagickWand *,const GravityType), + MagickSetImageArtifact(MagickWand *,const char *,const char *), + MagickSetImageProfile(MagickWand *,const char *,const void *,const size_t), + MagickSetImageProperty(MagickWand *,const char *,const char *), + MagickSetInterlaceScheme(MagickWand *,const InterlaceType), + MagickSetInterpolateMethod(MagickWand *,const PixelInterpolateMethod), + MagickSetOption(MagickWand *,const char *,const char *), + MagickSetOrientation(MagickWand *,const OrientationType), + MagickSetPage(MagickWand *,const size_t,const size_t,const ssize_t, + const ssize_t), + MagickSetPassphrase(MagickWand *,const char *), + MagickSetPointsize(MagickWand *,const double), + MagickSetResolution(MagickWand *,const double,const double), + MagickSetResourceLimit(const ResourceType type,const MagickSizeType limit), + MagickSetSamplingFactors(MagickWand *,const size_t,const double *), + MagickSetSecurityPolicy(MagickWand *,const char *), + MagickSetSize(MagickWand *,const size_t,const size_t), + MagickSetSizeOffset(MagickWand *,const size_t,const size_t,const ssize_t), + MagickSetType(MagickWand *,const ImageType); + +extern WandExport MagickProgressMonitor + MagickSetProgressMonitor(MagickWand *,const MagickProgressMonitor,void *); + +extern WandExport MagickSizeType + MagickGetResource(const ResourceType), + MagickGetResourceLimit(const ResourceType); + +extern WandExport PixelWand + *MagickGetBackgroundColor(MagickWand *); + +extern WandExport OrientationType + MagickGetOrientationType(MagickWand *); + +extern WandExport size_t + MagickGetCompressionQuality(MagickWand *); + +extern WandExport unsigned char + *MagickGetImageProfile(MagickWand *,const char *,size_t *), + *MagickRemoveImageProfile(MagickWand *,const char *,size_t *); + +extern WandExport void + MagickSetSeed(const unsigned long); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/method-attribute.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/method-attribute.h new file mode 100644 index 0000000000..97675b879e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/method-attribute.h @@ -0,0 +1,111 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand method attributes. +*/ +#ifndef MAGICKWAND_METHOD_ATTRIBUTE_H +#define MAGICKWAND_METHOD_ATTRIBUTE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__) +# define WandPrivate +# if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB) +# define _MAGICKDLL_ +# endif +# if defined(_MAGICKDLL_) +# if defined(_VISUALC_) +# pragma warning( disable: 4273 ) /* Disable the dll linkage warnings */ +# endif +# if !defined(_MAGICKLIB_) +# if defined(__clang__) || defined(__GNUC__) +# define WandExport __attribute__ ((dllimport)) +# else +# define WandExport __declspec(dllimport) +# endif +# else +# if defined(__clang__) || defined(__GNUC__) +# define WandExport __attribute__ ((dllexport)) +# else +# define WandExport __declspec(dllexport) +# endif +# endif +# else +# define WandExport +# endif +# if defined(_VISUALC_) +# pragma warning(disable : 4018) +# pragma warning(disable : 4068) +# pragma warning(disable : 4244) +# pragma warning(disable : 4142) +# pragma warning(disable : 4800) +# pragma warning(disable : 4786) +# pragma warning(disable : 4996) +# endif +#else +# if defined(__clang__) || (__GNUC__ >= 4) +# define WandExport __attribute__ ((visibility ("default"))) +# define WandPrivate __attribute__ ((visibility ("hidden"))) +# else +# define WandExport +# define WandPrivate +# endif +#endif + +#define MagickWandSignature 0xabacadabUL +#if !defined(MagickPathExtent) +# define MagickPathExtent 4096 +#endif + +#if defined(MAGICKCORE_HAVE___ATTRIBUTE__) +# define wand_aligned(x) __attribute__((aligned(x))) +# define wand_attribute __attribute__ +# define wand_unused(x) wand_unused_ ## x __attribute__((unused)) +# define wand_unreferenced(x) /* nothing */ +#elif defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__) +# define wand_aligned(x) __declspec(align(x)) +# define wand_attribute(x) /* nothing */ +# define wand_unused(x) x +# define wand_unreferenced(x) (x) +#else +# define wand_aligned(x) /* nothing */ +# define wand_attribute(x) /* nothing */ +# define wand_unused(x) x +# define wand_unreferenced(x) /* nothing */ +#endif + +#if !defined(__clang__) && (defined(__GNUC__) && (__GNUC__) > 4) +# define wand_alloc_size(x) __attribute__((__alloc_size__(x))) +# define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) +#else +# define wand_alloc_size(x) /* nothing */ +# define wand_alloc_sizes(x,y) /* nothing */ +#endif + +#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__) > 4) +# define wand_cold_spot __attribute__((__cold__)) +# define wand_hot_spot __attribute__((__hot__)) +#else +# define wand_cold_spot +# define wand_hot_spot +#endif + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/mogrify.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/mogrify.h new file mode 100644 index 0000000000..956410ffdd --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/mogrify.h @@ -0,0 +1,38 @@ +/* + Copyright @ 2000 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand mogrify command-line method. +*/ +#ifndef MAGICKWAND_MOGRIFY_H +#define MAGICKWAND_MOGRIFY_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + MogrifyImage(ImageInfo *,const int,const char **,Image **,ExceptionInfo *), + MogrifyImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *), + MogrifyImageInfo(ImageInfo *,const int,const char **,ExceptionInfo *), + MogrifyImageList(ImageInfo *,const int,const char **,Image **, + ExceptionInfo *), + MogrifyImages(ImageInfo *,const MagickBooleanType,const int,const char **, + Image **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/montage.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/montage.h new file mode 100644 index 0000000000..4532c9e3ea --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/montage.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand montage command-line method. +*/ +#ifndef MAGICKWAND_MONTAGE_H +#define MAGICKWAND_MONTAGE_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + MontageImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/operation.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/operation.h new file mode 100644 index 0000000000..56ff93bd0b --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/operation.h @@ -0,0 +1,33 @@ +/* + Copyright @ 2011 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand command-line option process. +*/ +#ifndef MAGICKWAND_OPERATION_H +#define MAGICKWAND_OPERATION_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport void + CLIOption(MagickCLI *,const char *,...) + magick_attribute((__format__ (__printf__,2,0))); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/pixel-iterator.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/pixel-iterator.h new file mode 100644 index 0000000000..41fd8289fb --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/pixel-iterator.h @@ -0,0 +1,68 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Pixel Iterator Methods. +*/ +#ifndef MAGICKWAND_PIXEL_ITERATOR_H +#define MAGICKWAND_PIXEL_ITERATOR_H + +#include "MagickWand/MagickWand.h" +#include "MagickWand/pixel-wand.h" + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _PixelIterator + PixelIterator; + +extern WandExport char + *PixelGetIteratorException(const PixelIterator *,ExceptionType *); + +extern WandExport ExceptionType + PixelGetIteratorExceptionType(const PixelIterator *); + +extern WandExport MagickBooleanType + IsPixelIterator(const PixelIterator *), + PixelClearIteratorException(PixelIterator *), + PixelSetIteratorRow(PixelIterator *,const ssize_t), + PixelSyncIterator(PixelIterator *); + +extern WandExport PixelIterator + *ClonePixelIterator(const PixelIterator *), + *DestroyPixelIterator(PixelIterator *), + *NewPixelIterator(MagickWand *), + *NewPixelRegionIterator(MagickWand *,const ssize_t,const ssize_t,const size_t, + const size_t); + +extern WandExport PixelWand + **PixelGetCurrentIteratorRow(PixelIterator *,size_t *), + **PixelGetNextIteratorRow(PixelIterator *,size_t *), + **PixelGetPreviousIteratorRow(PixelIterator *,size_t *); + +extern WandExport ssize_t + PixelGetIteratorRow(PixelIterator *); + +extern WandExport void + ClearPixelIterator(PixelIterator *), + PixelResetIterator(PixelIterator *), + PixelSetFirstIteratorRow(PixelIterator *), + PixelSetLastIteratorRow(PixelIterator *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/pixel-wand.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/pixel-wand.h new file mode 100644 index 0000000000..2826cc82d0 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/pixel-wand.h @@ -0,0 +1,117 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand pixel wand methods. +*/ +#ifndef MAGICKWAND_PIXEL_WAND_H +#define MAGICKWAND_PIXEL_WAND_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _PixelWand + PixelWand; + +extern WandExport char + *PixelGetColorAsNormalizedString(const PixelWand *), + *PixelGetColorAsString(const PixelWand *), + *PixelGetException(const PixelWand *,ExceptionType *); + +extern WandExport double + PixelGetAlpha(const PixelWand *) magick_attribute((__pure__)), + PixelGetBlack(const PixelWand *) magick_attribute((__pure__)), + PixelGetBlue(const PixelWand *) magick_attribute((__pure__)), + PixelGetCyan(const PixelWand *) magick_attribute((__pure__)), + PixelGetFuzz(const PixelWand *) magick_attribute((__pure__)), + PixelGetGreen(const PixelWand *) magick_attribute((__pure__)), + PixelGetMagenta(const PixelWand *) magick_attribute((__pure__)), + PixelGetAlpha(const PixelWand *) magick_attribute((__pure__)), + PixelGetRed(const PixelWand *) magick_attribute((__pure__)), + PixelGetYellow(const PixelWand *) magick_attribute((__pure__)); + +extern WandExport ExceptionType + PixelGetExceptionType(const PixelWand *); + +extern WandExport MagickBooleanType + IsPixelWand(const PixelWand *), + IsPixelWandSimilar(PixelWand *,PixelWand *,const double), + PixelClearException(PixelWand *), + PixelSetColor(PixelWand *,const char *); + +extern WandExport PixelInfo + PixelGetPixel(const PixelWand *); + +extern WandExport PixelWand + *ClonePixelWand(const PixelWand *), + **ClonePixelWands(const PixelWand **,const size_t), + *DestroyPixelWand(PixelWand *), + **DestroyPixelWands(PixelWand **,const size_t), + *NewPixelWand(void), + **NewPixelWands(const size_t); + +extern WandExport Quantum + PixelGetAlphaQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetBlackQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetBlueQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetCyanQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetGreenQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetIndex(const PixelWand *) magick_attribute((__pure__)), + PixelGetMagentaQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetAlphaQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetRedQuantum(const PixelWand *) magick_attribute((__pure__)), + PixelGetYellowQuantum(const PixelWand *) magick_attribute((__pure__)); + +extern WandExport size_t + PixelGetColorCount(const PixelWand *) magick_attribute((__pure__)); + +extern WandExport void + ClearPixelWand(PixelWand *), + PixelGetHSL(const PixelWand *,double *,double *,double *), + PixelGetMagickColor(const PixelWand *,PixelInfo *), + PixelGetQuantumPacket(const PixelWand *,PixelInfo *), + PixelGetQuantumPixel(const Image *,const PixelWand *,Quantum *), + PixelSetAlpha(PixelWand *,const double), + PixelSetAlphaQuantum(PixelWand *,const Quantum), + PixelSetBlack(PixelWand *,const double), + PixelSetBlackQuantum(PixelWand *,const Quantum), + PixelSetBlue(PixelWand *,const double), + PixelSetBlueQuantum(PixelWand *,const Quantum), + PixelSetColorFromWand(PixelWand *,const PixelWand *), + PixelSetColorCount(PixelWand *,const size_t), + PixelSetCyan(PixelWand *,const double), + PixelSetCyanQuantum(PixelWand *,const Quantum), + PixelSetFuzz(PixelWand *,const double), + PixelSetGreen(PixelWand *,const double), + PixelSetGreenQuantum(PixelWand *,const Quantum), + PixelSetHSL(PixelWand *,const double,const double,const double), + PixelSetIndex(PixelWand *,const Quantum), + PixelSetMagenta(PixelWand *,const double), + PixelSetMagentaQuantum(PixelWand *,const Quantum), + PixelSetPixelColor(PixelWand *,const PixelInfo *), + PixelSetAlpha(PixelWand *,const double), + PixelSetAlphaQuantum(PixelWand *,const Quantum), + PixelSetPixelColor(PixelWand *,const PixelInfo *), + PixelSetQuantumPixel(const Image *,const Quantum *,PixelWand *), + PixelSetRed(PixelWand *,const double), + PixelSetRedQuantum(PixelWand *,const Quantum), + PixelSetYellow(PixelWand *,const double), + PixelSetYellowQuantum(PixelWand *,const Quantum); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/stream.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/stream.h new file mode 100644 index 0000000000..2c70953216 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/stream.h @@ -0,0 +1,32 @@ +/* + Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand montage command-line method. +*/ +#ifndef MAGICKWAND_STREAM_H +#define MAGICKWAND_STREAM_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +extern WandExport MagickBooleanType + StreamImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/wand-view.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/wand-view.h new file mode 100644 index 0000000000..8176b9030c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/wand-view.h @@ -0,0 +1,73 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand wand view methods. +*/ +#ifndef MAGICKWAND_WAND_VIEW_H +#define MAGICKWAND_WAND_VIEW_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _WandView + WandView; + +typedef MagickBooleanType + (*DuplexTransferWandViewMethod)(const WandView *,const WandView *,WandView *, + const ssize_t,const int,void *), + (*GetWandViewMethod)(const WandView *,const ssize_t,const int,void *), + (*SetWandViewMethod)(WandView *,const ssize_t,const int,void *), + (*TransferWandViewMethod)(const WandView *,WandView *,const ssize_t, + const int,void *), + (*UpdateWandViewMethod)(WandView *,const ssize_t,const int,void *); + +extern WandExport char + *GetWandViewException(const WandView *,ExceptionType *); + +extern WandExport MagickBooleanType + DuplexTransferWandViewIterator(WandView *,WandView *,WandView *, + DuplexTransferWandViewMethod,void *), + GetWandViewIterator(WandView *,GetWandViewMethod,void *), + IsWandView(const WandView *), + SetWandViewIterator(WandView *,SetWandViewMethod,void *), + TransferWandViewIterator(WandView *,WandView *,TransferWandViewMethod,void *), + UpdateWandViewIterator(WandView *,UpdateWandViewMethod,void *); + +extern WandExport MagickWand + *GetWandViewWand(const WandView *); + +extern WandExport PixelWand + **GetWandViewPixels(const WandView *); + +extern WandExport RectangleInfo + GetWandViewExtent(const WandView *); + +extern WandExport void + SetWandViewDescription(WandView *,const char *), + SetWandViewThreads(WandView *,const size_t); + +extern WandExport WandView + *CloneWandView(const WandView *), + *DestroyWandView(WandView *), + *NewWandView(MagickWand *), + *NewWandViewExtent(MagickWand *,const ssize_t,const ssize_t,const size_t, + const size_t); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/wandcli.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/wandcli.h new file mode 100644 index 0000000000..dc8cf5e698 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/MagickWand/wandcli.h @@ -0,0 +1,45 @@ +/* + Copyright @ 2011 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand command-line option process. +*/ +#ifndef MAGICKWAND_WAND_CLI_H +#define MAGICKWAND_WAND_CLI_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +typedef struct _MagickCLI + MagickCLI; + +extern WandExport MagickCLI + *AcquireMagickCLI(ImageInfo *,ExceptionInfo *), + *DestroyMagickCLI(MagickCLI *); + +extern WandExport MagickBooleanType + CLICatchException(MagickCLI *,const MagickBooleanType), + CLILogEvent(MagickCLI *,const LogEventType,const char *,const char *, + const size_t,const char *,...) + magick_attribute((__format__ (__printf__,6,7))), + CLIThrowException(MagickCLI *,const char *,const char *,const size_t, + const ExceptionType,const char *,const char *,...) + magick_attribute((__format__ (__printf__,7,8))); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/magick-wand.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/magick-wand.h new file mode 100644 index 0000000000..11fef4445c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/ImageMagick-7/magick-wand.h @@ -0,0 +1,133 @@ +/* + Copyright @ 2003 ImageMagick Studio LLC, a non-profit organization + dedicated to making software imaging solutions freely available. + + You may not use this file except in compliance with the License. You may + obtain a copy of the License at + + https://imagemagick.org/script/license.php + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + MagickWand Application Programming Interface declarations. +*/ + +#ifndef MAGICKWAND_MAGICKWAND_H +#define MAGICKWAND_MAGICKWAND_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +#if !defined(MAGICKWAND_CONFIG_H) +# define MAGICKWAND_CONFIG_H +# if !defined(vms) +# include "MagickCore/magick-config.h" +# else +# include "magick-config.h" +# endif +#if defined(_magickcore_const) && !defined(const) +# define const _magickcore_const +#endif +#if defined(_magickcore_inline) && !defined(inline) +# define inline _magickcore_inline +#endif +#if !defined(magick_restrict) +# if !defined(_magickcore_restrict) +# define magick_restrict restrict +# else +# define magick_restrict _magickcore_restrict +# endif +#endif +# if defined(__cplusplus) || defined(c_plusplus) +# undef inline +# endif +#endif + +#define MAGICKWAND_CHECK_VERSION(major,minor,micro) \ + ((MAGICKWAND_MAJOR_VERSION > (major)) || \ + ((MAGICKWAND_MAJOR_VERSION == (major)) && \ + (MAGICKWAND_MINOR_VERSION > (minor))) || \ + ((MAGICKWAND_MAJOR_VERSION == (major)) && \ + (MAGICKWAND_MINOR_VERSION == (minor)) && \ + (MAGICKWAND_MICRO_VERSION >= (micro)))) + +#include +#include +#include +#include +#include +#include +#include + +#if defined(WIN32) || defined(WIN64) +# define MAGICKWAND_WINDOWS_SUPPORT +#else +# define MAGICKWAND_POSIX_SUPPORT +#endif + +typedef struct _MagickWand + MagickWand; + +#include "MagickWand/method-attribute.h" +#include "MagickCore/MagickCore.h" +#include "MagickWand/animate.h" +#include "MagickWand/compare.h" +#include "MagickWand/composite.h" +#include "MagickWand/conjure.h" +#include "MagickWand/deprecate.h" +#include "MagickWand/display.h" +#include "MagickWand/drawing-wand.h" +#include "MagickWand/identify.h" +#include "MagickWand/import.h" +#include "MagickWand/wandcli.h" +#include "MagickWand/operation.h" +#include "MagickWand/magick-cli.h" +#include "MagickWand/magick-property.h" +#include "MagickWand/magick-image.h" +#include "MagickWand/mogrify.h" +#include "MagickWand/montage.h" +#include "MagickWand/pixel-iterator.h" +#include "MagickWand/pixel-wand.h" +#include "MagickWand/stream.h" +#include "MagickWand/wand-view.h" + +extern WandExport char + *MagickGetException(const MagickWand *,ExceptionType *); + +extern WandExport ExceptionType + MagickGetExceptionType(const MagickWand *); + +extern WandExport MagickBooleanType + IsMagickWand(const MagickWand *), + IsMagickWandInstantiated(void), + MagickClearException(MagickWand *), + MagickSetIteratorIndex(MagickWand *,const ssize_t); + +extern WandExport MagickWand + *CloneMagickWand(const MagickWand *), + *DestroyMagickWand(MagickWand *), + *NewMagickWand(void), + *NewMagickWandFromImage(const Image *); + +extern WandExport ssize_t + MagickGetIteratorIndex(MagickWand *); + +extern WandExport void + ClearMagickWand(MagickWand *), + MagickWandGenesis(void), + MagickWandTerminus(void), + *MagickRelinquishMemory(void *), + MagickResetIterator(MagickWand *), + MagickSetFirstIterator(MagickWand *), + MagickSetLastIterator(MagickWand *); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jconfig.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jconfig.h new file mode 100644 index 0000000000..597188ad5b --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jconfig.h @@ -0,0 +1,60 @@ +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". + */ +#define JPEG_LIB_VERSION 62 + +/* libjpeg-turbo version */ +#define LIBJPEG_TURBO_VERSION 3.0.3 + +/* libjpeg-turbo version in integer form */ +#define LIBJPEG_TURBO_VERSION_NUMBER 3000003 + +/* Support arithmetic encoding when using 8-bit samples */ +#define C_ARITH_CODING_SUPPORTED 1 + +/* Support arithmetic decoding when using 8-bit samples */ +#define D_ARITH_CODING_SUPPORTED 1 + +/* Support in-memory source/destination managers */ +#define MEM_SRCDST_SUPPORTED 1 + +/* Use accelerated SIMD routines when using 8-bit samples */ +/* #undef WITH_SIMD */ + +/* This version of libjpeg-turbo supports run-time selection of data precision, + * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build + * time. However, some downstream software expects the macro to be defined. + * Since 12-bit data precision is an opt-in feature that requires explicitly + * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data + * types, the unmodified portion of the libjpeg API still behaves as if it were + * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data + * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here. + */ +#ifndef BITS_IN_JSAMPLE +#define BITS_IN_JSAMPLE 8 +#endif + +#ifdef _WIN32 + +#undef RIGHT_SHIFT_IS_UNSIGNED + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + +/* Define "INT32" as int, not long, per Windows custom */ +#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ +typedef short INT16; +typedef signed int INT32; +#endif +#define XMD_H /* prevent jmorecfg.h from redefining it */ + +#else + +/* Define if your (broken) compiler shifts signed values as if they were + unsigned. */ +/* #undef RIGHT_SHIFT_IS_UNSIGNED */ + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jerror.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jerror.h new file mode 100644 index 0000000000..71ba03e2a3 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jerror.h @@ -0,0 +1,336 @@ +/* + * jerror.h + * + * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 1997-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. + * libjpeg-turbo Modifications: + * Copyright (C) 2014, 2017, 2021-2023, D. R. Commander. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code, string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code, string) code, + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +#if JPEG_LIB_VERSION < 70 +JMESSAGE(JERR_ARITH_NOTIMPL, "Sorry, arithmetic coding is not implemented") +#endif +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") +#endif +JMESSAGE(JERR_BAD_DCT_COEF, + "DCT coefficient (lossy) or spatial difference (lossless) out of range") +JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JERR_BAD_DROP_SAMPLING, + "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") +#endif +JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive/lossless parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive/lossless parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Requested features are incompatible") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") +#endif +JMESSAGE(JERR_NO_BACKING_STORE, "Memory limit exceeded") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT_SHORT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_EXTENSION, "JFIF extension marker: type 0x%02x, length %u") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr (lossy) or RGB (lossless)") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +#if JPEG_LIB_VERSION >= 70 +JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") +#endif +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") +#if JPEG_LIB_VERSION < 70 +JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") +#if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED) +JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") +JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") +#endif +#endif +JMESSAGE(JWRN_BOGUS_ICC, "Corrupt JPEG data: bad ICC marker") +#if JPEG_LIB_VERSION < 70 +JMESSAGE(JERR_BAD_DROP_SAMPLING, + "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") +#endif +JMESSAGE(JERR_BAD_RESTART, + "Invalid restart interval %d; must be an integer multiple of the number of MCUs in an MCU row (%d)") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT1(cinfo, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT2(cinfo, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT3(cinfo, code, p1, p2, p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT4(cinfo, code, p1, p2, p3, p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXIT6(cinfo, code, p1, p2, p3, p4, p5, p6) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (cinfo)->err->msg_parm.i[4] = (p5), \ + (cinfo)->err->msg_parm.i[5] = (p6), \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) +#define ERREXITS(cinfo, code, str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \ + (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) +#define WARNMS1(cinfo, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) +#define WARNMS2(cinfo, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo, lvl, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) +#define TRACEMS1(cinfo, lvl, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) +#define TRACEMS2(cinfo, lvl, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) +#define TRACEMS3(cinfo, lvl, code, p1, p2, p3) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMS4(cinfo, lvl, code, p1, p2, p3, p4) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMS5(cinfo, lvl, code, p1, p2, p3, p4, p5) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMS8(cinfo, lvl, code, p1, p2, p3, p4, p5, p6, p7, p8) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); ) +#define TRACEMSS(cinfo, lvl, code, str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \ + (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jmorecfg.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jmorecfg.h new file mode 100644 index 0000000000..89c7842c87 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jmorecfg.h @@ -0,0 +1,385 @@ +/* + * jmorecfg.h + * + * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. + * libjpeg-turbo Modifications: + * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of Rec. ITU-T T.81 | ISO/IEC 10918-1, set this to 255. + * However, darn few applications need more than 4 channels (maybe 5 for CMYK + + * alpha mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +/* JSAMPLE should be the smallest type that will hold the values 0..255. */ + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int)(value)) + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + + +/* J12SAMPLE should be the smallest type that will hold the values 0..4095. */ + +typedef short J12SAMPLE; + +#define MAXJ12SAMPLE 4095 +#define CENTERJ12SAMPLE 2048 + + +/* J16SAMPLE should be the smallest type that will hold the values 0..65535. */ + +typedef unsigned short J16SAMPLE; + +#define MAXJ16SAMPLE 65535 +#define CENTERJ16SAMPLE 32768 + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +typedef unsigned char UINT8; + +/* UINT16 must hold at least the values 0..65535. */ + +typedef unsigned short UINT16; + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. + * + * NOTE: The INT32 typedef dates back to libjpeg v5 (1994.) Integers were + * sometimes 16-bit back then (MS-DOS), which is why INT32 is typedef'd to + * long. It also wasn't common (or at least as common) in 1994 for INT32 to be + * defined by platform headers. Since then, however, INT32 is defined in + * several other common places: + * + * Xmd.h (X11 header) typedefs INT32 to int on 64-bit platforms and long on + * 32-bit platforms (i.e always a 32-bit signed type.) + * + * basetsd.h (Win32 header) typedefs INT32 to int (always a 32-bit signed type + * on modern platforms.) + * + * qglobal.h (Qt header) typedefs INT32 to int (always a 32-bit signed type on + * modern platforms.) + * + * This is a recipe for conflict, since "long" and "int" aren't always + * compatible types. Since the definition of INT32 has technically been part + * of the libjpeg API for more than 20 years, we can't remove it, but we do not + * use it internally any longer. We instead define a separate type (JLONG) + * for internal use, which ensures that internal behavior will always be the + * same regardless of any external headers that may be included. + */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ +#ifndef _BASETSD_H /* MinGW is slightly different */ +#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ +typedef long INT32; +#endif +#endif +#endif +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. (Note that changing this datatype will + * potentially require modifying the SIMD code. The x86-64 SIMD extensions, + * in particular, assume a 32-bit JDIMENSION.) + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* Originally, this macro was used as a way of defining function prototypes + * for both modern compilers as well as older compilers that did not support + * prototype parameters. libjpeg-turbo has never supported these older, + * non-ANSI compilers, but the macro is still included because there is some + * software out there that uses it. + */ + +#define JMETHOD(type, methodname, arglist) type (*methodname) arglist + + +/* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS), + * but again, some software relies on this macro. + */ + +#undef FAR +#define FAR + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* accurate integer method */ +#define DCT_IFAST_SUPPORTED /* less accurate int method [legacy feature] */ +#define DCT_FLOAT_SUPPORTED /* floating-point method [legacy feature] */ + +/* Encoder capability options: */ + +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive and lossless JPEG: + * the default tables don't work for progressive mode or lossless mode. + * (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * The RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros are a vestigial + * feature of libjpeg. The idea was that, if an application developer needed + * to compress from/decompress to a BGR/BGRX/RGBX/XBGR/XRGB buffer, they could + * change these macros, rebuild libjpeg, and link their application statically + * with it. In reality, few people ever did this, because there were some + * severe restrictions involved (cjpeg and djpeg no longer worked properly, + * compressing/decompressing RGB JPEGs no longer worked properly, and the color + * quantizer wouldn't work with pixel sizes other than 3.) Furthermore, since + * all of the O/S-supplied versions of libjpeg were built with the default + * values of RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE, many applications + * have come to regard these values as immutable. + * + * The libjpeg-turbo colorspace extensions provide a much cleaner way of + * compressing from/decompressing to buffers with arbitrary component orders + * and pixel sizes. Thus, we do not support changing the values of RGB_RED, + * RGB_GREEN, RGB_BLUE, or RGB_PIXELSIZE. In addition to the restrictions + * listed above, changing these values will also break the SIMD extensions and + * the regression tests. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + +#define JPEG_NUMCS 17 + +#define EXT_RGB_RED 0 +#define EXT_RGB_GREEN 1 +#define EXT_RGB_BLUE 2 +#define EXT_RGB_PIXELSIZE 3 + +#define EXT_RGBX_RED 0 +#define EXT_RGBX_GREEN 1 +#define EXT_RGBX_BLUE 2 +#define EXT_RGBX_PIXELSIZE 4 + +#define EXT_BGR_RED 2 +#define EXT_BGR_GREEN 1 +#define EXT_BGR_BLUE 0 +#define EXT_BGR_PIXELSIZE 3 + +#define EXT_BGRX_RED 2 +#define EXT_BGRX_GREEN 1 +#define EXT_BGRX_BLUE 0 +#define EXT_BGRX_PIXELSIZE 4 + +#define EXT_XBGR_RED 3 +#define EXT_XBGR_GREEN 2 +#define EXT_XBGR_BLUE 1 +#define EXT_XBGR_PIXELSIZE 4 + +#define EXT_XRGB_RED 1 +#define EXT_XRGB_GREEN 2 +#define EXT_XRGB_BLUE 3 +#define EXT_XRGB_PIXELSIZE 4 + +static const int rgb_red[JPEG_NUMCS] = { + -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED, + EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, + EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED, + -1 +}; + +static const int rgb_green[JPEG_NUMCS] = { + -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN, + EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, + EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN, + -1 +}; + +static const int rgb_blue[JPEG_NUMCS] = { + -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE, + EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, + EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE, + -1 +}; + +static const int rgb_pixelsize[JPEG_NUMCS] = { + -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE, + EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, + EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE, + -1 +}; + +/* Definitions for speed-related optimizations. */ + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#ifndef WITH_SIMD +#define MULTIPLIER int /* type for fastest integer multiply */ +#else +#define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */ +#endif +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + */ + +#ifndef FAST_FLOAT +#define FAST_FLOAT float +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jpeglib.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jpeglib.h new file mode 100644 index 0000000000..a59e98c25e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/jpeglib.h @@ -0,0 +1,1209 @@ +/* + * jpeglib.h + * + * This file was part of the Independent JPEG Group's software: + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2002-2009 by Guido Vollbeding. + * Lossless JPEG Modifications: + * Copyright (C) 1999, Ken Murchison. + * libjpeg-turbo Modifications: + * Copyright (C) 2009-2011, 2013-2014, 2016-2017, 2020, 2022-2023, + D. R. Commander. + * Copyright (C) 2015, Google, Inc. + * For conditions of distribution and use, see the accompanying README.ijg + * file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +extern "C" { +#endif +#endif + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +/* NOTE: In lossless mode, an MCU contains one or more samples rather than one + * or more 8x8 DCT blocks, so the term "data unit" is used to generically + * describe a sample in lossless mode or an 8x8 DCT block in lossy mode. To + * preserve backward API/ABI compatibility, the field and macro names retain + * the "block" terminology. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on data units/MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on data units/MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + */ + +typedef JSAMPLE *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef J12SAMPLE *J12SAMPROW; /* ptr to one image row of 12-bit pixel + samples. */ +typedef J12SAMPROW *J12SAMPARRAY; /* ptr to some 12-bit sample rows (a 2-D + 12-bit sample array) */ +typedef J12SAMPARRAY *J12SAMPIMAGE; /* a 3-D 12-bit sample array: top index is + color */ + +typedef J16SAMPLE *J16SAMPROW; /* ptr to one image row of 16-bit pixel + samples. */ +typedef J16SAMPROW *J16SAMPARRAY; /* ptr to some 16-bit sample rows (a 2-D + 16-bit sample array) */ +typedef J16SAMPARRAY *J16SAMPIMAGE; /* a 3-D 16-bit sample array: top index is + color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in data units. + * In lossy mode, any dummy blocks added to complete an MCU are not counted; + * therefore these values do not depend on whether a scan is interleaved or + * not. In lossless mode, these are always equal to the image width and + * height. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a data unit in samples. Always DCTSIZE for lossy compression. + * For lossy decompression this is the size of the output from one DCT block, + * reflecting any scaling we choose to apply during the IDCT step. + * Values from 1 to 16 are supported. Note that different components may + * receive different IDCT scalings. In lossless mode, this is always equal + * to 1. + */ +#if JPEG_LIB_VERSION >= 70 + int DCT_h_scaled_size; + int DCT_v_scaled_size; +#else + int DCT_scaled_size; +#endif + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface), thus + * downsampled_width = ceil(image_width * Hi/Hmax) + * and similarly for height. For lossy decompression, IDCT scaling is + * included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_[h_]scaled_size/DCTSIZE) + * In lossless mode, these are always equal to the image width and height. + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of data units per MCU, horizontally */ + int MCU_height; /* number of data units per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_[h_]scaled_size */ + int last_col_width; /* # of non-dummy data units across in last MCU */ + int last_row_height; /* # of non-dummy data units down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL *quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void *dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms + (Ss is the predictor selection value in + lossless mode) */ + int Ah, Al; /* progressive JPEG successive approx. parms + (Al is the point transform value in lossless + mode) */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct *jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET *data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +#define JCS_EXTENSIONS 1 +#define JCS_ALPHA_EXTENSIONS 1 + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue as specified by the RGB_RED, + RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK, /* Y/Cb/Cr/K */ + JCS_EXT_RGB, /* red/green/blue */ + JCS_EXT_RGBX, /* red/green/blue/x */ + JCS_EXT_BGR, /* blue/green/red */ + JCS_EXT_BGRX, /* blue/green/red/x */ + JCS_EXT_XBGR, /* x/blue/green/red */ + JCS_EXT_XRGB, /* x/red/green/blue */ + /* When out_color_space it set to JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR, + or JCS_EXT_XRGB during decompression, the X byte is undefined, and in + order to ensure the best performance, libjpeg-turbo can set that byte to + whatever value it wishes. Use the following colorspace constants to + ensure that the X byte is set to 0xFF, so that it can be interpreted as an + opaque alpha channel. */ + JCS_EXT_RGBA, /* red/green/blue/alpha */ + JCS_EXT_BGRA, /* blue/green/red/alpha */ + JCS_EXT_ABGR, /* alpha/blue/green/red */ + JCS_EXT_ARGB, /* alpha/red/green/blue */ + JCS_RGB565 /* 5-bit red/6-bit green/5-bit blue + [decompression only] */ +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* accurate integer method */ + JDCT_IFAST, /* less accurate integer method [legacy feature] */ + JDCT_FLOAT /* floating-point method [legacy feature] */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr *err; /* Error handler module */ \ + struct jpeg_memory_mgr *mem; /* Memory manager module */ \ + struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */ \ + void *client_data; /* Available for use by application */ \ + boolean is_decompressor; /* So common code can tell which is which */ \ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct *j_common_ptr; +typedef struct jpeg_compress_struct *j_compress_ptr; +typedef struct jpeg_decompress_struct *j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr *dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + +#if JPEG_LIB_VERSION >= 70 + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + JDIMENSION jpeg_width; /* scaled JPEG image width */ + JDIMENSION jpeg_height; /* scaled JPEG image height */ + /* Dimensions of actual JPEG image that will be written to file, + * derived from input dimensions by scaling factors above. + * These fields are computed by jpeg_start_compress(). + * You can also use jpeg_calc_jpeg_dimensions() to determine these values + * in advance of calling jpeg_start_compress(). + */ +#endif + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info *comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; +#if JPEG_LIB_VERSION >= 70 + int q_scale_factor[NUM_QUANT_TBLS]; +#endif + /* ptrs to coefficient quantization tables, or NULL if not defined, + * and corresponding scale factors (percentage, initialized 100). + */ + + JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info *scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ +#if JPEG_LIB_VERSION >= 70 + boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ +#endif + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + +#if JPEG_LIB_VERSION >= 70 + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ +#endif + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coefficient or + difference controller */ + /* The coefficient or difference controller receives data in units of MCU + * rows as defined for fully interleaved scans (whether the JPEG file is + * interleaved or not). In lossy mode, there are v_samp_factor * DCTSIZE + * sample rows of each component in an "iMCU" (interleaved MCU) row. In + * lossless mode, total_iMCU_rows is always equal to the image height. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of data units per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th data unit in an MCU */ + + int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for + scan */ + +#if JPEG_LIB_VERSION >= 80 + int block_size; /* the basic DCT block size: 1..16 */ + const int *natural_order; /* natural-order position array */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) */ +#endif + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master *master; + struct jpeg_c_main_controller *main; + struct jpeg_c_prep_controller *prep; + struct jpeg_c_coef_controller *coef; + struct jpeg_marker_writer *marker; + struct jpeg_color_converter *cconvert; + struct jpeg_downsampler *downsample; + struct jpeg_forward_dct *fdct; + struct jpeg_entropy_encoder *entropy; + jpeg_scan_info *script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr *src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array + If data_precision is 12 or 16, then this is + actually a J12SAMPARRAY or a J16SAMPARRAY, + so callers must type-cast it in order to + read/write 12-bit or 16-bit samples from/to + the array. */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info *comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + +#if JPEG_LIB_VERSION >= 80 + boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ +#endif + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + +#if JPEG_LIB_VERSION >= 70 + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ +#else + int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ +#endif + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient or difference controller's input and output progress is + * measured in units of "iMCU" (interleaved MCU) rows. These are the same as + * MCU rows in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. In lossy mode, we define an iMCU row as v_samp_factor + * DCT block rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_[v_]scaled_size sample rows of a component per iMCU row. + * In lossless mode, total_iMCU_rows is always equal to the image height. + */ + + JSAMPLE *sample_range_limit; /* table for fast range-limiting + If data_precision is 12 or 16, then this is + actually a J12SAMPLE pointer or a J16SAMPLE + pointer, so callers must type-cast it in + order to read 12-bit or 16-bit samples from + the array. */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of data units per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th data unit in an MCU */ + + int Ss, Se, Ah, Al; /* progressive/lossless JPEG parameters for + scan */ + +#if JPEG_LIB_VERSION >= 80 + /* These fields are derived from Se of first SOS marker. + */ + int block_size; /* the basic DCT block size: 1..16 */ + const int *natural_order; /* natural-order position array for entropy decode */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ +#endif + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master *master; + struct jpeg_d_main_controller *main; + struct jpeg_d_coef_controller *coef; + struct jpeg_d_post_controller *post; + struct jpeg_input_controller *inputctl; + struct jpeg_marker_reader *marker; + struct jpeg_entropy_decoder *entropy; + struct jpeg_inverse_dct *idct; + struct jpeg_upsampler *upsample; + struct jpeg_color_deconverter *cconvert; + struct jpeg_color_quantizer *cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + void (*error_exit) (j_common_ptr cinfo); + /* Conditionally emit a trace or warning message */ + void (*emit_message) (j_common_ptr cinfo, int msg_level); + /* Routine that actually outputs a trace or error message */ + void (*output_message) (j_common_ptr cinfo); + /* Format a message string for the most recent JPEG error or message */ + void (*format_message) (j_common_ptr cinfo, char *buffer); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + void (*reset_error_mgr) (j_common_ptr cinfo); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const *jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const *addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + void (*progress_monitor) (j_common_ptr cinfo); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET *next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + void (*init_destination) (j_compress_ptr cinfo); + boolean (*empty_output_buffer) (j_compress_ptr cinfo); + void (*term_destination) (j_compress_ptr cinfo); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET *next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + void (*init_source) (j_decompress_ptr cinfo); + boolean (*fill_input_buffer) (j_decompress_ptr cinfo); + void (*skip_input_data) (j_decompress_ptr cinfo, long num_bytes); + boolean (*resync_to_restart) (j_decompress_ptr cinfo, int desired); + void (*term_source) (j_decompress_ptr cinfo); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control *jvirt_sarray_ptr; +typedef struct jvirt_barray_control *jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + void *(*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject); + void *(*alloc_large) (j_common_ptr cinfo, int pool_id, + size_t sizeofobject); + /* If cinfo->data_precision is 12 or 16, then this method and the + * access_virt_sarray method actually return a J12SAMPARRAY or a + * J16SAMPARRAY, so callers must type-cast the return value in order to + * read/write 12-bit or 16-bit samples from/to the array. + */ + JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, JDIMENSION numrows); + JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, JDIMENSION numrows); + jvirt_sarray_ptr (*request_virt_sarray) (j_common_ptr cinfo, int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess); + jvirt_barray_ptr (*request_virt_barray) (j_common_ptr cinfo, int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess); + void (*realize_virt_arrays) (j_common_ptr cinfo); + JSAMPARRAY (*access_virt_sarray) (j_common_ptr cinfo, jvirt_sarray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable); + JBLOCKARRAY (*access_virt_barray) (j_common_ptr cinfo, jvirt_barray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable); + void (*free_pool) (j_common_ptr cinfo, int pool_id); + void (*self_destruct) (j_common_ptr cinfo); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo); + + +/* Originally, this macro was used as a way of defining function prototypes + * for both modern compilers as well as older compilers that did not support + * prototype parameters. libjpeg-turbo has never supported these older, + * non-ANSI compilers, but the macro is still included because there is some + * software out there that uses it. + */ + +#define JPP(arglist) arglist + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error(struct jpeg_error_mgr *err); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t)sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t)sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress(j_compress_ptr cinfo, int version, + size_t structsize); +EXTERN(void) jpeg_CreateDecompress(j_decompress_ptr cinfo, int version, + size_t structsize); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress(j_compress_ptr cinfo); +EXTERN(void) jpeg_destroy_decompress(j_decompress_ptr cinfo); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest(j_compress_ptr cinfo, FILE *outfile); +EXTERN(void) jpeg_stdio_src(j_decompress_ptr cinfo, FILE *infile); + +/* Data source and destination managers: memory buffers. */ +EXTERN(void) jpeg_mem_dest(j_compress_ptr cinfo, unsigned char **outbuffer, + unsigned long *outsize); +EXTERN(void) jpeg_mem_src(j_decompress_ptr cinfo, + const unsigned char *inbuffer, unsigned long insize); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults(j_compress_ptr cinfo); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace(j_compress_ptr cinfo, + J_COLOR_SPACE colorspace); +EXTERN(void) jpeg_default_colorspace(j_compress_ptr cinfo); +EXTERN(void) jpeg_set_quality(j_compress_ptr cinfo, int quality, + boolean force_baseline); +EXTERN(void) jpeg_set_linear_quality(j_compress_ptr cinfo, int scale_factor, + boolean force_baseline); +#if JPEG_LIB_VERSION >= 70 +EXTERN(void) jpeg_default_qtables(j_compress_ptr cinfo, + boolean force_baseline); +#endif +EXTERN(void) jpeg_add_quant_table(j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline); +EXTERN(int) jpeg_quality_scaling(int quality); +EXTERN(void) jpeg_enable_lossless(j_compress_ptr cinfo, + int predictor_selection_value, + int point_transform); +EXTERN(void) jpeg_simple_progression(j_compress_ptr cinfo); +EXTERN(void) jpeg_suppress_tables(j_compress_ptr cinfo, boolean suppress); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table(j_common_ptr cinfo); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table(j_common_ptr cinfo); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress(j_compress_ptr cinfo, + boolean write_all_tables); +EXTERN(JDIMENSION) jpeg_write_scanlines(j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_write_scanlines(j_compress_ptr cinfo, + J12SAMPARRAY scanlines, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg16_write_scanlines(j_compress_ptr cinfo, + J16SAMPARRAY scanlines, + JDIMENSION num_lines); +EXTERN(void) jpeg_finish_compress(j_compress_ptr cinfo); + +#if JPEG_LIB_VERSION >= 70 +/* Precalculate JPEG dimensions for current compression parameters. */ +EXTERN(void) jpeg_calc_jpeg_dimensions(j_compress_ptr cinfo); +#endif + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data(j_compress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_write_raw_data(j_compress_ptr cinfo, + J12SAMPIMAGE data, + JDIMENSION num_lines); + +/* Write a special marker. See libjpeg.txt concerning safe usage. */ +EXTERN(void) jpeg_write_marker(j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header(j_compress_ptr cinfo, int marker, + unsigned int datalen); +EXTERN(void) jpeg_write_m_byte(j_compress_ptr cinfo, int val); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables(j_compress_ptr cinfo); + +/* Write ICC profile. See libjpeg.txt for usage information. */ +EXTERN(void) jpeg_write_icc_profile(j_compress_ptr cinfo, + const JOCTET *icc_data_ptr, + unsigned int icc_data_len); + + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header(j_decompress_ptr cinfo, boolean require_image); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress(j_decompress_ptr cinfo); +EXTERN(JDIMENSION) jpeg_read_scanlines(j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg12_read_scanlines(j_decompress_ptr cinfo, + J12SAMPARRAY scanlines, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg16_read_scanlines(j_decompress_ptr cinfo, + J16SAMPARRAY scanlines, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg_skip_scanlines(j_decompress_ptr cinfo, + JDIMENSION num_lines); +EXTERN(JDIMENSION) jpeg12_skip_scanlines(j_decompress_ptr cinfo, + JDIMENSION num_lines); +EXTERN(void) jpeg_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, + JDIMENSION *width); +EXTERN(void) jpeg12_crop_scanline(j_decompress_ptr cinfo, JDIMENSION *xoffset, + JDIMENSION *width); +EXTERN(boolean) jpeg_finish_decompress(j_decompress_ptr cinfo); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data(j_decompress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION max_lines); +EXTERN(JDIMENSION) jpeg12_read_raw_data(j_decompress_ptr cinfo, + J12SAMPIMAGE data, + JDIMENSION max_lines); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans(j_decompress_ptr cinfo); +EXTERN(boolean) jpeg_start_output(j_decompress_ptr cinfo, int scan_number); +EXTERN(boolean) jpeg_finish_output(j_decompress_ptr cinfo); +EXTERN(boolean) jpeg_input_complete(j_decompress_ptr cinfo); +EXTERN(void) jpeg_new_colormap(j_decompress_ptr cinfo); +EXTERN(int) jpeg_consume_input(j_decompress_ptr cinfo); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +#if JPEG_LIB_VERSION >= 80 +EXTERN(void) jpeg_core_output_dimensions(j_decompress_ptr cinfo); +#endif +EXTERN(void) jpeg_calc_output_dimensions(j_decompress_ptr cinfo); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers(j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor(j_decompress_ptr cinfo, + int marker_code, + jpeg_marker_parser_method routine); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients(j_decompress_ptr cinfo); +EXTERN(void) jpeg_write_coefficients(j_compress_ptr cinfo, + jvirt_barray_ptr *coef_arrays); +EXTERN(void) jpeg_copy_critical_parameters(j_decompress_ptr srcinfo, + j_compress_ptr dstinfo); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress(j_compress_ptr cinfo); +EXTERN(void) jpeg_abort_decompress(j_decompress_ptr cinfo); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort(j_common_ptr cinfo); +EXTERN(void) jpeg_destroy(j_common_ptr cinfo); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired); + +/* Read ICC profile. See libjpeg.txt for usage information. */ +EXTERN(boolean) jpeg_read_icc_profile(j_decompress_ptr cinfo, + JOCTET **icc_data_ptr, + unsigned int *icc_data_len); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +} +#endif +#endif + +#endif /* JPEGLIB_H */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/png.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/png.h new file mode 100644 index 0000000000..f109cdf336 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/png.h @@ -0,0 +1,3247 @@ + +/* png.h - header file for PNG reference library + * + * libpng version 1.6.39 - November 20, 2022 + * + * Copyright (c) 2018-2022 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. (See LICENSE, below.) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.6.35, July 2018: + * Glenn Randers-Pehrson + * libpng versions 1.6.36, December 2018, through 1.6.39, November 2022: + * Cosmin Truta + * See also "Contributing Authors", below. + */ + +/* + * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE + * ========================================= + * + * PNG Reference Library License version 2 + * --------------------------------------- + * + * * Copyright (c) 1995-2022 The PNG Reference Library Authors. + * * Copyright (c) 2018-2022 Cosmin Truta. + * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * * Copyright (c) 1996-1997 Andreas Dilger. + * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * The software is supplied "as is", without warranty of any kind, + * express or implied, including, without limitation, the warranties + * of merchantability, fitness for a particular purpose, title, and + * non-infringement. In no event shall the Copyright owners, or + * anyone distributing the software, be liable for any damages or + * other liability, whether in contract, tort or otherwise, arising + * from, out of, or in connection with the software, or the use or + * other dealings in the software, even if advised of the possibility + * of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute + * this software, or portions hereof, for any purpose, without fee, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you + * must not claim that you wrote the original software. If you + * use this software in a product, an acknowledgment in the product + * documentation would be appreciated, but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * + * PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) + * ----------------------------------------------------------------------- + * + * libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are + * derived from libpng-1.0.6, and are distributed according to the same + * disclaimer and license as libpng-1.0.6 with the following individuals + * added to the list of Contributing Authors: + * + * Simon-Pierre Cadieux + * Eric S. Raymond + * Mans Rullgard + * Cosmin Truta + * Gilles Vollant + * James Yu + * Mandar Sahastrabuddhe + * Google Inc. + * Vadim Barkov + * + * and with the following additions to the disclaimer: + * + * There is no warranty against interference with your enjoyment of + * the library or against infringement. There is no warranty that our + * efforts or the library will fulfill any of your particular purposes + * or needs. This library is provided with all faults, and the entire + * risk of satisfactory quality, performance, accuracy, and effort is + * with the user. + * + * Some files in the "contrib" directory and some configure-generated + * files that are distributed with libpng have other copyright owners, and + * are released under other open source licenses. + * + * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are + * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from + * libpng-0.96, and are distributed according to the same disclaimer and + * license as libpng-0.96, with the following individuals added to the + * list of Contributing Authors: + * + * Tom Lane + * Glenn Randers-Pehrson + * Willem van Schaik + * + * libpng versions 0.89, June 1996, through 0.96, May 1997, are + * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, + * and are distributed according to the same disclaimer and license as + * libpng-0.88, with the following individuals added to the list of + * Contributing Authors: + * + * John Bowler + * Kevin Bracey + * Sam Bushell + * Magnus Holmgren + * Greg Roelofs + * Tom Tanner + * + * Some files in the "scripts" directory have other copyright owners, + * but are released under this license. + * + * libpng versions 0.5, May 1995, through 0.88, January 1996, are + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * For the purposes of this copyright and license, "Contributing Authors" + * is defined as the following set of individuals: + * + * Andreas Dilger + * Dave Martindale + * Guy Eric Schalnat + * Paul Schmidt + * Tim Wegner + * + * The PNG Reference Library is supplied "AS IS". The Contributing + * Authors and Group 42, Inc. disclaim all warranties, expressed or + * implied, including, without limitation, the warranties of + * merchantability and of fitness for any purpose. The Contributing + * Authors and Group 42, Inc. assume no liability for direct, indirect, + * incidental, special, exemplary, or consequential damages, which may + * result from the use of the PNG Reference Library, even if advised of + * the possibility of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * source code, or portions hereof, for any purpose, without fee, subject + * to the following restrictions: + * + * 1. The origin of this source code must not be misrepresented. + * + * 2. Altered versions must be plainly marked as such and must not + * be misrepresented as being the original source. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * The Contributing Authors and Group 42, Inc. specifically permit, + * without fee, and encourage the use of this source code as a component + * to supporting the PNG file format in commercial products. If you use + * this source code in a product, acknowledgment is not required but would + * be appreciated. + * + * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + * + * TRADEMARK + * ========= + * + * The name "libpng" has not been registered by the Copyright owners + * as a trademark in any jurisdiction. However, because libpng has + * been distributed and maintained world-wide, continually since 1995, + * the Copyright owners claim "common-law trademark protection" in any + * jurisdiction where common-law trademark is recognized. + */ + +/* + * A "png_get_copyright" function is available, for convenient use in "about" + * boxes and the like: + * + * printf("%s", png_get_copyright(NULL)); + * + * Also, the PNG logo (in PNG format, of course) is supplied in the + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + */ + +/* + * The contributing authors would like to thank all those who helped + * with testing, bug fixes, and patience. This wouldn't have been + * possible without all of you. + * + * Thanks to Frank J. T. Wojcik for helping with the documentation. + */ + +/* Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * ... + * 1.0.69 10 10069 10.so.0.69[.0] + * ... + * 1.2.59 13 10259 12.so.0.59[.0] + * ... + * 1.4.20 14 10420 14.so.0.20[.0] + * ... + * 1.5.30 15 10530 15.so.15.30[.0] + * ... + * 1.6.39 16 10639 16.so.16.39[.0] + * + * Henceforth the source version will match the shared-library major and + * minor numbers; the shared-library major version number will be used for + * changes in backward compatibility, as it is intended. + * The PNG_LIBPNG_VER macro, which is not used within libpng but is + * available for applications, is an unsigned integer of the form XYYZZ + * corresponding to the source version X.Y.Z (leading zeros in Y and Z). + * Beta versions were given the previous public release number plus a + * letter, until version 1.0.6j; from then on they were given the upcoming + * public release number plus "betaNN" or "rcNN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * DLLNUM will change each time there are forward or backward changes + * in binary compatibility (e.g., when a new feature is added). + * + * See libpng.txt or libpng.3 for more information. The PNG specification + * is available as a W3C Recommendation and as an ISO/IEC Standard; see + * + */ + +#ifndef PNG_H +#define PNG_H + +/* This is not the place to learn how to use libpng. The file libpng-manual.txt + * describes how to use libpng, and the file example.c summarizes it + * with some code on which to build. This file is useful for looking + * at the actual function definitions and structure components. If that + * file has been stripped from your copy of libpng, you can find it at + * + * + * If you just need to read a PNG file and don't want to read the documentation + * skip to the end of this file and read the section entitled 'simplified API'. + */ + +/* Version information for png.h - this should match the version in png.c */ +#define PNG_LIBPNG_VER_STRING "1.6.39" +#define PNG_HEADER_VERSION_STRING " libpng version 1.6.39 - November 20, 2022\n" + +#define PNG_LIBPNG_VER_SONUM 16 +#define PNG_LIBPNG_VER_DLLNUM 16 + +/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ +#define PNG_LIBPNG_VER_MAJOR 1 +#define PNG_LIBPNG_VER_MINOR 6 +#define PNG_LIBPNG_VER_RELEASE 39 + +/* This should be zero for a public release, or non-zero for a + * development version. [Deprecated] + */ +#define PNG_LIBPNG_VER_BUILD 0 + +/* Release Status */ +#define PNG_LIBPNG_BUILD_ALPHA 1 +#define PNG_LIBPNG_BUILD_BETA 2 +#define PNG_LIBPNG_BUILD_RC 3 +#define PNG_LIBPNG_BUILD_STABLE 4 +#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 + +/* Release-Specific Flags */ +#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with + PNG_LIBPNG_BUILD_STABLE only */ +#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_SPECIAL */ +#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_PRIVATE */ + +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE + +/* Careful here. At one time, Guy wanted to use 082, but that + * would be octal. We must not include leading zeros. + * Versions 0.7 through 1.0.0 were in the range 0 to 100 here + * (only version 1.0.0 was mis-numbered 100 instead of 10000). + * From version 1.0.1 it is: + * XXYYZZ, where XX=major, YY=minor, ZZ=release + */ +#define PNG_LIBPNG_VER 10639 /* 1.6.39 */ + +/* Library configuration: these options cannot be changed after + * the library has been built. + */ +#ifndef PNGLCONF_H +/* If pnglibconf.h is missing, you can + * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h + */ +# include "pnglibconf.h" +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Machine specific configuration. */ +# include "pngconf.h" +#endif + +/* + * Added at libpng-1.2.8 + * + * Ref MSDN: Private as priority over Special + * VS_FF_PRIVATEBUILD File *was not* built using standard release + * procedures. If this value is given, the StringFileInfo block must + * contain a PrivateBuild string. + * + * VS_FF_SPECIALBUILD File *was* built by the original company using + * standard release procedures but is a variation of the standard + * file of the same version number. If this value is given, the + * StringFileInfo block must contain a SpecialBuild string. + */ + +#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) +#else +# ifdef PNG_LIBPNG_SPECIALBUILD +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) +# else +# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) +# endif +#endif + +#ifndef PNG_VERSION_INFO_ONLY + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Version information for C files, stored in png.c. This had better match + * the version above. + */ +#define png_libpng_ver png_get_header_ver(NULL) + +/* This file is arranged in several sections: + * + * 1. [omitted] + * 2. Any configuration options that can be specified by for the application + * code when it is built. (Build time configuration is in pnglibconf.h) + * 3. Type definitions (base types are defined in pngconf.h), structure + * definitions. + * 4. Exported library functions. + * 5. Simplified API. + * 6. Implementation options. + * + * The library source code has additional files (principally pngpriv.h) that + * allow configuration of the library. + */ + +/* Section 1: [omitted] */ + +/* Section 2: run time configuration + * See pnglibconf.h for build time configuration + * + * Run time configuration allows the application to choose between + * implementations of certain arithmetic APIs. The default is set + * at build time and recorded in pnglibconf.h, but it is safe to + * override these (and only these) settings. Note that this won't + * change what the library does, only application code, and the + * settings can (and probably should) be made on a per-file basis + * by setting the #defines before including png.h + * + * Use macros to read integers from PNG data or use the exported + * functions? + * PNG_USE_READ_MACROS: use the macros (see below) Note that + * the macros evaluate their argument multiple times. + * PNG_NO_USE_READ_MACROS: call the relevant library function. + * + * Use the alternative algorithm for compositing alpha samples that + * does not use division? + * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' + * algorithm. + * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. + * + * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is + * false? + * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error + * APIs to png_warning. + * Otherwise the calls are mapped to png_error. + */ + +/* Section 3: type definitions, including structures and compile time + * constants. + * See pngconf.h for base types that vary by machine/system + */ + +/* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +typedef char* png_libpng_version_1_6_39; + +/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. + * + * png_struct is the cache of information used while reading or writing a single + * PNG file. One of these is always required, although the simplified API + * (below) hides the creation and destruction of it. + */ +typedef struct png_struct_def png_struct; +typedef const png_struct * png_const_structp; +typedef png_struct * png_structp; +typedef png_struct * * png_structpp; + +/* png_info contains information read from or to be written to a PNG file. One + * or more of these must exist while reading or creating a PNG file. The + * information is not used by libpng during read but is used to control what + * gets written when a PNG file is created. "png_get_" function calls read + * information during read and "png_set_" functions calls write information + * when creating a PNG. + * been moved into a separate header file that is not accessible to + * applications. Read libpng-manual.txt or libpng.3 for more info. + */ +typedef struct png_info_def png_info; +typedef png_info * png_infop; +typedef const png_info * png_const_infop; +typedef png_info * * png_infopp; + +/* Types with names ending 'p' are pointer types. The corresponding types with + * names ending 'rp' are identical pointer types except that the pointer is + * marked 'restrict', which means that it is the only pointer to the object + * passed to the function. Applications should not use the 'restrict' types; + * it is always valid to pass 'p' to a pointer with a function argument of the + * corresponding 'rp' type. Different compilers have different rules with + * regard to type matching in the presence of 'restrict'. For backward + * compatibility libpng callbacks never have 'restrict' in their parameters and, + * consequentially, writing portable application code is extremely difficult if + * an attempt is made to use 'restrict'. + */ +typedef png_struct * PNG_RESTRICT png_structrp; +typedef const png_struct * PNG_RESTRICT png_const_structrp; +typedef png_info * PNG_RESTRICT png_inforp; +typedef const png_info * PNG_RESTRICT png_const_inforp; + +/* Three color definitions. The order of the red, green, and blue, (and the + * exact size) is not important, although the size of the fields need to + * be png_byte or png_uint_16 (as defined below). + */ +typedef struct png_color_struct +{ + png_byte red; + png_byte green; + png_byte blue; +} png_color; +typedef png_color * png_colorp; +typedef const png_color * png_const_colorp; +typedef png_color * * png_colorpp; + +typedef struct png_color_16_struct +{ + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ +} png_color_16; +typedef png_color_16 * png_color_16p; +typedef const png_color_16 * png_const_color_16p; +typedef png_color_16 * * png_color_16pp; + +typedef struct png_color_8_struct +{ + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ +} png_color_8; +typedef png_color_8 * png_color_8p; +typedef const png_color_8 * png_const_color_8p; +typedef png_color_8 * * png_color_8pp; + +/* + * The following two structures are used for the in-core representation + * of sPLT chunks. + */ +typedef struct png_sPLT_entry_struct +{ + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; +} png_sPLT_entry; +typedef png_sPLT_entry * png_sPLT_entryp; +typedef const png_sPLT_entry * png_const_sPLT_entryp; +typedef png_sPLT_entry * * png_sPLT_entrypp; + +/* When the depth of the sPLT palette is 8 bits, the color and alpha samples + * occupy the LSB of their respective members, and the MSB of each member + * is zero-filled. The frequency member always occupies the full 16 bits. + */ + +typedef struct png_sPLT_struct +{ + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ +} png_sPLT_t; +typedef png_sPLT_t * png_sPLT_tp; +typedef const png_sPLT_t * png_const_sPLT_tp; +typedef png_sPLT_t * * png_sPLT_tpp; + +#ifdef PNG_TEXT_SUPPORTED +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, + * and whether that contents is compressed or not. The "key" field + * points to a regular zero-terminated C string. The "text" fields can be a + * regular C string, an empty string, or a NULL pointer. + * However, the structure returned by png_get_text() will always contain + * the "text" field as a regular zero-terminated C string (possibly + * empty), never a NULL pointer, so it can be safely used in printf() and + * other string-handling functions. Note that the "itxt_length", "lang", and + * "lang_key" members of the structure only exist when the library is built + * with iTXt chunk support. Prior to libpng-1.4.0 the library was built by + * default without iTXt support. Also note that when iTXt *is* supported, + * the "lang" and "lang_key" fields contain NULL pointers when the + * "compression" field contains * PNG_TEXT_COMPRESSION_NONE or + * PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the + * same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag" + * which is always 0 or 1, or its "compression method" which is always 0. + */ +typedef struct png_text_struct +{ + int compression; /* compression value: + -1: tEXt, none + 0: zTXt, deflate + 1: iTXt, none + 2: iTXt, deflate */ + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") + or a NULL pointer */ + size_t text_length; /* length of the text string */ + size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters + or a NULL pointer */ + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + chars or a NULL pointer */ +} png_text; +typedef png_text * png_textp; +typedef const png_text * png_const_textp; +typedef png_text * * png_textpp; +#endif + +/* Supported compression types for text in PNG files (tEXt, and zTXt). + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ +#define PNG_TEXT_COMPRESSION_NONE_WR -3 +#define PNG_TEXT_COMPRESSION_zTXt_WR -2 +#define PNG_TEXT_COMPRESSION_NONE -1 +#define PNG_TEXT_COMPRESSION_zTXt 0 +#define PNG_ITXT_COMPRESSION_NONE 1 +#define PNG_ITXT_COMPRESSION_zTXt 2 +#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ + +/* png_time is a way to hold the time in an machine independent way. + * Two conversions are provided, both from time_t and struct tm. There + * is no portable way to convert to either of these structures, as far + * as I know. If you know of a portable way, send it to me. As a side + * note - PNG has always been Year 2000 compliant! + */ +typedef struct png_time_struct +{ + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +} png_time; +typedef png_time * png_timep; +typedef const png_time * png_const_timep; +typedef png_time * * png_timepp; + +#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) ||\ + defined(PNG_USER_CHUNKS_SUPPORTED) +/* png_unknown_chunk is a structure to hold queued chunks for which there is + * no specific support. The idea is that we can use this to queue + * up private chunks for output even though the library doesn't actually + * know about their semantics. + * + * The data in the structure is set by libpng on read and used on write. + */ +typedef struct png_unknown_chunk_t +{ + png_byte name[5]; /* Textual chunk name with '\0' terminator */ + png_byte *data; /* Data, should not be modified on read! */ + size_t size; + + /* On write 'location' must be set using the flag values listed below. + * Notice that on read it is set by libpng however the values stored have + * more bits set than are listed below. Always treat the value as a + * bitmask. On write set only one bit - setting multiple bits may cause the + * chunk to be written in multiple places. + */ + png_byte location; /* mode of operation at read time */ +} +png_unknown_chunk; + +typedef png_unknown_chunk * png_unknown_chunkp; +typedef const png_unknown_chunk * png_const_unknown_chunkp; +typedef png_unknown_chunk * * png_unknown_chunkpp; +#endif + +/* Flag values for the unknown chunk location byte. */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_AFTER_IDAT 0x08 + +/* Maximum positive integer used in PNG is (2^31)-1 */ +#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) +#define PNG_UINT_32_MAX ((png_uint_32)(-1)) +#define PNG_SIZE_MAX ((size_t)(-1)) + +/* These are constants for fixed point values encoded in the + * PNG specification manner (x100000) + */ +#define PNG_FP_1 100000 +#define PNG_FP_HALF 50000 +#define PNG_FP_MAX ((png_fixed_point)0x7fffffffL) +#define PNG_FP_MIN (-PNG_FP_MAX) + +/* These describe the color_type field in png_info. */ +/* color type masks */ +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +/* color types. Note that not all combinations are legal */ +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) +/* aliases */ +#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA +#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA + +/* This is for compression type. PNG 1.0-1.2 only define the single type. */ +#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ +#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE + +/* This is for filter type. PNG 1.0-1.2 only define the single type. */ +#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ +#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ +#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE + +/* These are for the interlacing type. These values should NOT be changed. */ +#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ +#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ +#define PNG_INTERLACE_LAST 2 /* Not a valid value */ + +/* These are for the oFFs chunk. These values should NOT be changed. */ +#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ +#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ +#define PNG_OFFSET_LAST 2 /* Not a valid value */ + +/* These are for the pCAL chunk. These values should NOT be changed. */ +#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ +#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ +#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ +#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ +#define PNG_EQUATION_LAST 4 /* Not a valid value */ + +/* These are for the sCAL chunk. These values should NOT be changed. */ +#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ +#define PNG_SCALE_METER 1 /* meters per pixel */ +#define PNG_SCALE_RADIAN 2 /* radians per pixel */ +#define PNG_SCALE_LAST 3 /* Not a valid value */ + +/* These are for the pHYs chunk. These values should NOT be changed. */ +#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ +#define PNG_RESOLUTION_METER 1 /* pixels/meter */ +#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ + +/* These are for the sRGB chunk. These values should NOT be changed. */ +#define PNG_sRGB_INTENT_PERCEPTUAL 0 +#define PNG_sRGB_INTENT_RELATIVE 1 +#define PNG_sRGB_INTENT_SATURATION 2 +#define PNG_sRGB_INTENT_ABSOLUTE 3 +#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ + +/* This is for text chunks */ +#define PNG_KEYWORD_MAX_LENGTH 79 + +/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ +#define PNG_MAX_PALETTE_LENGTH 256 + +/* These determine if an ancillary chunk's data has been successfully read + * from the PNG header, or if the application has filled in the corresponding + * data in the info_struct to be written into the output file. The values + * of the PNG_INFO_ defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001U +#define PNG_INFO_sBIT 0x0002U +#define PNG_INFO_cHRM 0x0004U +#define PNG_INFO_PLTE 0x0008U +#define PNG_INFO_tRNS 0x0010U +#define PNG_INFO_bKGD 0x0020U +#define PNG_INFO_hIST 0x0040U +#define PNG_INFO_pHYs 0x0080U +#define PNG_INFO_oFFs 0x0100U +#define PNG_INFO_tIME 0x0200U +#define PNG_INFO_pCAL 0x0400U +#define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */ +#define PNG_INFO_eXIf 0x10000U /* GR-P, 1.6.31 */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info * png_row_infop; +typedef png_row_info * * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. + */ +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +/* not used anywhere */ +/* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */ +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in , and the application + * must include this before png.h to obtain the definition of jmp_buf. The + * function is required to be PNG_NORETURN, but this is not checked. If the + * function does return the application will crash via an abort() or similar + * system level call. + * + * If you get a warning here while building the library you may need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! + */ +PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ +/* Added to libpng-1.2.34 */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ +/* Added to libpng-1.5.4 */ +#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#if INT_MAX >= 0x8000 /* else this might break */ +#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ +#endif + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. + */ +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); + +/* Section 4: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes + */ + +/* Returns the version number of the library */ +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); + +/* Tell lib we have already handled the first magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (ie return non-zero). + */ +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start, + size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). + */ +#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n)) + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); + +PNG_EXPORT(6, size_t, png_get_compression_buffer_size, + (png_const_structrp png_ptr)); + +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, + size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +#endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), + PNG_NORETURN); + +#ifdef PNG_READ_SUPPORTED +/* Reset the compression stream */ +PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); +#endif + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +#endif + +/* Write the PNG file signature. */ +PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr, + png_const_bytep data, size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr)); + +/* Allocate and initialize the info structure */ +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr), + PNG_ALLOCATED); + +/* DEPRECATED: this function allowed init structures to be created using the + * default allocation method (typically malloc). Use is deprecated in 1.6.0 and + * the API will be removed in the future. + */ +PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, + size_t png_info_struct_size), PNG_DEPRECATED); + +/* Writes all the PNG information before the image. */ +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structrp png_ptr, png_const_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. */ +PNG_EXPORT(22, void, png_read_info, + (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + /* Convert to a US string format: there is no localization support in this + * routine. The original implementation used a 29 character buffer in + * png_struct, this will be removed in future versions. + */ +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */ +PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, + png_const_timep ptime),PNG_DEPRECATED); +#endif +PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29], + png_const_timep ptime)); +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* Convert from a struct tm to png_time */ +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + const struct tm * ttime)); + +/* Convert from time_t to png_time. Uses gmtime() */ +PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime)); +#endif /* CONVERT_tIME */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand the grayscale to 24-bit RGB if necessary. */ +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB to grayscale. */ +#define PNG_ERROR_ACTION_NONE 1 +#define PNG_ERROR_ACTION_WARN 2 +#define PNG_ERROR_ACTION_ERROR 3 +#define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/ + +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr, + int error_action, double red, double green)) +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)) + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp + png_ptr)); +#endif + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* How the alpha channel is interpreted - this affects how the color channels + * of a PNG file are returned to the calling application when an alpha channel, + * or a tRNS chunk in a palette file, is present. + * + * This has no effect on the way pixels are written into a PNG output + * datastream. The color samples in a PNG datastream are never premultiplied + * with the alpha samples. + * + * The default is to return data according to the PNG specification: the alpha + * channel is a linear measure of the contribution of the pixel to the + * corresponding composited pixel, and the color channels are unassociated + * (not premultiplied). The gamma encoded color channels must be scaled + * according to the contribution and to do this it is necessary to undo + * the encoding, scale the color values, perform the composition and re-encode + * the values. This is the 'PNG' mode. + * + * The alternative is to 'associate' the alpha with the color information by + * storing color channel values that have been scaled by the alpha. + * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes + * (the latter being the two common names for associated alpha color channels). + * + * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha + * value is equal to the maximum value. + * + * The final choice is to gamma encode the alpha channel as well. This is + * broken because, in practice, no implementation that uses this choice + * correctly undoes the encoding before handling alpha composition. Use this + * choice only if other serious errors in the software or hardware you use + * mandate it; the typical serious error is for dark halos to appear around + * opaque areas of the composited PNG image because of arithmetic overflow. + * + * The API function png_set_alpha_mode specifies which of these choices to use + * with an enumerated 'mode' value and the gamma of the required output: + */ +#define PNG_ALPHA_PNG 0 /* according to the PNG standard */ +#define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ +#define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ +#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ +#define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ +#define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ + +PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode, + double output_gamma)) +PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, + int mode, png_fixed_point output_gamma)) +#endif + +#if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* The output_gamma value is a screen gamma in libpng terminology: it expresses + * how to decode the output values, not how they are encoded. + */ +#define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ +#define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ +#define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ +#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ +#endif + +/* The following are examples of calls to png_set_alpha_mode to achieve the + * required overall gamma correction and, where necessary, alpha + * premultiplication. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * This is the default libpng handling of the alpha channel - it is not + * pre-multiplied into the color components. In addition the call states + * that the output is for a sRGB system and causes all PNG files without gAMA + * chunks to be assumed to be encoded using sRGB. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * In this case the output is assumed to be something like an sRGB conformant + * display preceded by a power-law lookup table of power 1.45. This is how + * early Mac systems behaved. + * + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); + * This is the classic Jim Blinn approach and will work in academic + * environments where everything is done by the book. It has the shortcoming + * of assuming that input PNG data with no gamma information is linear - this + * is unlikely to be correct unless the PNG files where generated locally. + * Most of the time the output precision will be so low as to show + * significant banding in dark areas of the image. + * + * png_set_expand_16(pp); + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); + * This is a somewhat more realistic Jim Blinn inspired approach. PNG files + * are assumed to have the sRGB encoding if not marked with a gamma value and + * the output is always 16 bits per component. This permits accurate scaling + * and processing of the data. If you know that your input PNG files were + * generated locally you might need to replace PNG_DEFAULT_sRGB with the + * correct value for your system. + * + * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); + * If you just need to composite the PNG image onto an existing background + * and if you control the code that does this you can use the optimization + * setting. In this case you just copy completely opaque pixels to the + * output. For pixels that are not completely transparent (you just skip + * those) you do the composition math using png_composite or png_composite_16 + * below then encode the resultant 8-bit or 16-bit values to match the output + * encoding. + * + * Other cases + * If neither the PNG nor the standard linear encoding work for you because + * of the software or hardware you use then you have a big problem. The PNG + * case will probably result in halos around the image. The linear encoding + * will probably result in a washed out, too bright, image (it's actually too + * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably + * substantially reduce the halos. Alternatively try: + * + * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); + * This option will also reduce the halos, but there will be slight dark + * halos round the opaque parts of the image where the background is light. + * In the OPTIMIZED mode the halos will be light halos where the background + * is dark. Take your pick - the halos are unavoidable unless you can get + * your hardware/software fixed! (The OPTIMIZED approach is slightly + * faster.) + * + * When the default gamma of PNG files doesn't match the output gamma. + * If you have PNG files with no gamma information png_set_alpha_mode allows + * you to provide a default gamma, but it also sets the output gamma to the + * matching value. If you know your PNG files have a gamma that doesn't + * match the output you can take advantage of the fact that + * png_set_alpha_mode always sets the output gamma but only sets the PNG + * default if it is not already set: + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * The first call sets both the default and the output gamma values, the + * second call overrides the output gamma without changing the default. This + * is easier than achieving the same effect with png_set_gamma. You must use + * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will + * fire if more than one call to png_set_alpha_mode and png_set_background is + * made in the same read operation, however multiple calls with PNG_ALPHA_PNG + * are ignored. + */ + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, + int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 +/* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, + png_uint_32 filler, int flags)); +#endif /* READ_FILLER || WRITE_FILLER */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p + true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS by replacing with a background color. Prior to + * libpng-1.5.4 this API must not be called before the PNG file header has been + * read. Doing so will result in unexpected behavior and possible warnings or + * errors if the PNG file contains a bKGD chunk. + */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)) +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)) +#endif +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale a 16-bit depth file down to 8-bit, accurately. */ +PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */ +/* Strip the second byte of information from a 16-bit depth file. */ +PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. + */ +PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_const_uint_16p histogram, int full_quantize)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) + +/* Handle gamma correction. Screen_gamma=(display_exponent). + * NOTE: this API simply sets the screen and file gamma values. It will + * therefore override the value for gamma in a PNG file if it is called after + * the file header has been read - use with care - call before reading the PNG + * file for best results! + * + * These routines accept the same gamma values as png_set_alpha_mode (described + * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either + * API (floating point or fixed.) Notice, however, that the 'file_gamma' value + * is the inverse of a 'screen gamma' value. + */ +PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr, + double screen_gamma, double override_file_gamma)) +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr, + png_fixed_point screen_gamma, png_fixed_point override_file_gamma)) +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set how many lines between output flushes - 0 for no flushing */ +PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr)); +#endif + +/* Optional update palette with requested transformations */ +PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr)); + +/* Optional call to update the users info structure */ +PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. */ +PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read a row of data. */ +PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row, + png_bytep display_row)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the whole image into memory at once. */ +PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image)); +#endif + +/* Write a row of image data */ +PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr, + png_const_bytep row)); + +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows)); + +/* Write the image data */ +PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image)); + +/* Write the end of the PNG file. */ +PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. */ +PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +/* Free any memory associated with the png_info_struct */ +PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr, + png_infopp info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); + +/* Set the libpng method of handling chunk CRC errors */ +PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, + int ancil_action)); + +/* Values for png_set_crc_action() say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +#ifdef PNG_WRITE_SUPPORTED +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explanation of the compression functions. + */ + +/* Set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method, + int filters)); +#endif /* WRITE */ + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP) +#define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)) +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structrp png_ptr, int heuristic_method, int num_weights, + png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs)) +#endif /* WRITE_WEIGHTED_FILTER */ + +/* The following are no longer used and will be removed from libpng-1.7: */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer calculations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, + int window_bits)); + +PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ + +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +/* Also set zlib parameters for compressing non-IDAT chunks */ +PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(225, void, png_set_text_compression_window_bits, + (png_structrp png_ptr, int window_bits)); + +PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */ +#endif /* WRITE */ + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng-manual.txt for + * more information. + */ + +#ifdef PNG_STDIO_SUPPORTED +/* Initialize the input/output for the PNG file to the default functions. */ +PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, png_FILE_p fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. + */ +PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr)); + +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr, + png_read_status_ptr read_row_fn)); + +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr read_user_transform_fn)); +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr write_user_transform_fn)); +#endif + +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp)); +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +/* This callback is called only for *unknown* chunks. If + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known + * chunks to be treated as unknown, however in this case the callback must do + * any processing required by the chunk (e.g. by calling the appropriate + * png_set_ APIs.) + * + * There is no write support - on write, by default, all the chunks in the + * 'unknown' list are written in the specified position. + * + * The integer return from the callback function is interpreted thus: + * + * negative: An error occurred; png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be saved. A critical + * chunk will cause an error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + * + * See "INTERACTION WITH USER CHUNK CALLBACKS" below for important notes about + * how this behavior will change in libpng 1.7 + */ +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); + +/* Returns the user pointer associated with the push read functions */ +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, + (png_const_structrp png_ptr)); + +/* Function to be called when data becomes available */ +PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr, + png_inforp info_ptr, png_bytep buffer, size_t buffer_size)); + +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. + */ +PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp)); + +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr, + png_bytep old_row, png_const_bytep new_row)); +#endif /* PROGRESSIVE_READ */ + +PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +/* Added at libpng version 1.4.0 */ +PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Added at libpng version 1.2.4 */ +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Frees a pointer allocated by png_malloc() */ +PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); + +/* Free data that was allocated internally */ +PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 free_me, int num)); + +/* Reassign responsibility for freeing existing data, whether allocated + * by libpng or by the application; this works on the png_info structure passed + * in, it does not change the state for other png_info structures. + * + * It is unlikely that this function works correctly as of 1.6.0 and using it + * may result either in memory leaks or double free of allocated data. + */ +PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr, + png_inforp info_ptr, int freer, png_uint_32 mask)); + +/* Assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008U +#define PNG_FREE_ICCP 0x0010U +#define PNG_FREE_SPLT 0x0020U +#define PNG_FREE_ROWS 0x0040U +#define PNG_FREE_PCAL 0x0080U +#define PNG_FREE_SCAL 0x0100U +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_FREE_UNKN 0x0200U +#endif +/* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */ +#define PNG_FREE_PLTE 0x1000U +#define PNG_FREE_TRNS 0x2000U +#define PNG_FREE_TEXT 0x4000U +#define PNG_FREE_EXIF 0x8000U /* Added at libpng-1.6.31 */ +#define PNG_FREE_ALL 0xffffU +#define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); +PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, + png_voidp ptr), PNG_DEPRECATED); +#endif + +#ifdef PNG_ERROR_TEXT_SUPPORTED +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +/* The same, but the chunk name is prepended to the error string. */ +PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +#else +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN); +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#else +# define png_warning(s1,s2) ((void)(s1)) +# define png_chunk_warning(s1,s2) ((void)(s1)) +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +#ifdef PNG_READ_SUPPORTED +/* Same, chunk name is prepended to message (only during read) */ +PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif + +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structrp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* The png_set_ functions are for storing values in the png_info_struct. + * Similarly, the png_get_ calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_ functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +PNG_EXPORT(111, size_t, png_get_rowbytes, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* Returns row_pointers, which is an array of pointers to scanlines that was + * returned from png_read_png(). + */ +PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Set row_pointers, which is an array of pointers to scanlines for use + * by png_write_png(). + */ +PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image height in pixels. */ +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image bit_depth. */ +PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image color_type. */ +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image filter_type. */ +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image interlace_type. */ +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image compression_type. */ +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +#endif /* EASY_ACCESS */ + +#ifdef PNG_READ_SUPPORTED +/* Returns pointer to signature string read from PNG header */ +PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_16p *background)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_16p background)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)) +PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z, + double *green_X, double *green_Y, double *green_Z, double *blue_X, + double *blue_Y, double *blue_Z)) +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_white_x, png_fixed_point *int_white_y, + png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, + png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)) +PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z)) +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)) +PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr, + png_inforp info_ptr, double red_X, double red_Y, double red_Z, + double green_X, double green_Y, double green_Z, double blue_X, + double blue_Y, double blue_Z)) +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) +PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z)) +#endif + +#ifdef PNG_eXIf_SUPPORTED +PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *exif)); +PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep exif)); + +PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif)); +PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 num_exif, png_bytep exif)); +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *file_gamma)) +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_file_gamma)) +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr, + png_inforp info_ptr, double file_gamma)) +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_file_gamma)) +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_16p *hist)); +PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_uint_16p hist)); +#endif + +PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); + +PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charp *purpose, png_int_32 *X0, + png_int_32 *X1, int *type, int *nparams, png_charp *units, + png_charpp *params)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr, + png_inforp info_ptr, png_colorp *palette, int *num_palette)); + +PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr, + png_inforp info_ptr, png_const_colorp palette, int num_palette)); + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_8p *sig_bit)); +#endif + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_8p sig_bit)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *file_srgb_intent)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_sPLT_tpp entries)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)); +#endif + +#ifdef PNG_TEXT_SUPPORTED +/* png_get_text also returns the number of text chunks in *num_text */ +PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_textp *text_ptr, int *num_text)); +#endif + +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#ifdef PNG_TEXT_SUPPORTED +PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_timep *mod_time)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_timep mod_time)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans, + png_color_16p *trans_color)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr, + png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); +#endif + +#ifdef PNG_sCAL_SUPPORTED +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *unit, double *width, double *height)) +#if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_fixed_point *width, png_fixed_point *height)) +#endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, double width, double height)) +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, png_fixed_point width, + png_fixed_point height)) +PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, + png_const_charp swidth, png_const_charp sheight)); +#endif /* sCAL */ + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +/* Provide the default handling for all unknown chunks or, optionally, for + * specific unknown chunks. + * + * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was + * ignored and the default was used, the per-chunk setting only had an effect on + * write. If you wish to have chunk-specific handling on read in code that must + * work on earlier versions you must use a user chunk callback to specify the + * desired handling (keep or discard.) + * + * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The + * parameter is interpreted as follows: + * + * READ: + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Known chunks: do normal libpng processing, do not keep the chunk (but + * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + * Unknown chunks: for a specific chunk use the global default, when used + * as the default discard the chunk data. + * PNG_HANDLE_CHUNK_NEVER: + * Discard the chunk data. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Keep the chunk data if the chunk is not critical else raise a chunk + * error. + * PNG_HANDLE_CHUNK_ALWAYS: + * Keep the chunk data. + * + * If the chunk data is saved it can be retrieved using png_get_unknown_chunks, + * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent + * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks + * it simply resets the behavior to the libpng default. + * + * INTERACTION WITH USER CHUNK CALLBACKS: + * The per-chunk handling is always used when there is a png_user_chunk_ptr + * callback and the callback returns 0; the chunk is then always stored *unless* + * it is critical and the per-chunk setting is other than ALWAYS. Notice that + * the global default is *not* used in this case. (In effect the per-chunk + * value is incremented to at least IF_SAFE.) + * + * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and + * per-chunk defaults will be honored. If you want to preserve the current + * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE + * as the default - if you don't do this libpng 1.6 will issue a warning. + * + * If you want unhandled unknown chunks to be discarded in libpng 1.6 and + * earlier simply return '1' (handled). + * + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED: + * If this is *not* set known chunks will always be handled by libpng and + * will never be stored in the unknown chunk list. Known chunks listed to + * png_set_keep_unknown_chunks will have no effect. If it is set then known + * chunks listed with a keep other than AS_DEFAULT will *never* be processed + * by libpng, in addition critical chunks must either be processed by the + * callback or saved. + * + * The IHDR and IEND chunks must not be listed. Because this turns off the + * default handling for chunks that would otherwise be recognized the + * behavior of libpng transformations may well become incorrect! + * + * WRITE: + * When writing chunks the options only apply to the chunks specified by + * png_set_unknown_chunks (below), libpng will *always* write known chunks + * required by png_set_ calls and will always write the core critical chunks + * (as required for PLTE). + * + * Each chunk in the png_set_unknown_chunks list is looked up in the + * png_set_keep_unknown_chunks list to find the keep setting, this is then + * interpreted as follows: + * + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Write safe-to-copy chunks and write other chunks if the global + * default is set to _ALWAYS, otherwise don't write this chunk. + * PNG_HANDLE_CHUNK_NEVER: + * Do not write the chunk. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Write the chunk if it is safe-to-copy, otherwise do not write it. + * PNG_HANDLE_CHUNK_ALWAYS: + * Write the chunk. + * + * Note that the default behavior is effectively the opposite of the read case - + * in read unknown chunks are not stored by default, in write they are written + * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different + * - on write the safe-to-copy bit is checked, on read the critical bit is + * checked and on read if the chunk is critical an error will be raised. + * + * num_chunks: + * =========== + * If num_chunks is positive, then the "keep" parameter specifies the manner + * for handling only those chunks appearing in the chunk_list array, + * otherwise the chunk list array is ignored. + * + * If num_chunks is 0 the "keep" parameter specifies the default behavior for + * unknown chunks, as described above. + * + * If num_chunks is negative, then the "keep" parameter specifies the manner + * for handling all unknown chunks plus all chunks recognized by libpng + * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to + * be processed by libpng. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr, + int keep, png_const_bytep chunk_list, int num_chunks)); +#endif /* HANDLE_AS_UNKNOWN */ + +/* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned; + * the result is therefore true (non-zero) if special handling is required, + * false for the default handling. + */ +PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr, + png_const_bytep chunk_name)); +#endif /* SET_UNKNOWN_CHUNKS */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); + /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added + * unknowns to the location currently stored in the png_struct. This is + * invariably the wrong value on write. To fix this call the following API + * for each chunk in the list with the correct location. If you know your + * code won't be compiled on earlier versions you can rely on + * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing + * the correct thing. + */ + +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)); + +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_unknown_chunkpp entries)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + * If you need to turn it off for a chunk that your application has freed, + * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); + */ +PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, + png_inforp info_ptr, int mask)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* The "params" pointer is currently not used and is for future expansion. */ +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#ifdef PNG_WRITE_SUPPORTED +PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#endif + +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structrp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structrp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structrp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structrp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr, + png_uint_32 mng_features_permitted)); +#endif + +/* For use in png_set_keep_unknown, added to version 1.2.6 */ +#define PNG_HANDLE_CHUNK_AS_DEFAULT 0 +#define PNG_HANDLE_CHUNK_NEVER 1 +#define PNG_HANDLE_CHUNK_IF_SAFE 2 +#define PNG_HANDLE_CHUNK_ALWAYS 3 +#define PNG_HANDLE_CHUNK_LAST 4 + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. + */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr, + png_uint_32 strip_mode)); +#endif + +/* Added in libpng-1.2.6 */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structrp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.0 */ +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.1 */ +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structrp png_ptr)); +#endif + +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr, + png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* pHYs */ +#endif /* INCH_CONVERSIONS */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr)); + +/* Removed from libpng 1.6; use png_get_io_chunk_type. */ +PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr), + PNG_DEPRECATED) + +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structrp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* IO_STATE */ + +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. + */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* A macro to return the offset between pixels in the output row for a pair of + * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that + * follows. Note that ROW_OFFSET is the offset from one row to the next whereas + * COL_OFFSET is from one column to the next, within a row. + */ +#define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8) +#define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1)) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) + +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(y_in, pass) \ + (((y_in)<>(((7-(off))-(pass))<<2)) & 0xF) | \ + ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { \ + png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + 128); \ + (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); \ + } + +# define png_composite_16(composite, fg, alpha, bg) \ + { \ + png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(65535 \ + - (png_uint_32)(alpha)) + 32768); \ + (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); \ + } + +#else /* Standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = \ + (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + 127) / 255)) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = \ + (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ + 32767) / 65535)) +#endif /* READ_COMPOSITE_NODIV */ + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. + */ +# define PNG_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ +# define PNG_get_uint_16(buf) \ + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + +# define PNG_get_int_32(buf) \ + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \ + : (png_int_32)png_get_uint_32(buf))) + +/* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, + * but defining a macro name prefixed with PNG_PREFIX. + */ +# ifndef PNG_PREFIX +# define png_get_uint_32(buf) PNG_get_uint_32(buf) +# define png_get_uint_16(buf) PNG_get_uint_16(buf) +# define png_get_int_32(buf) PNG_get_int_32(buf) +# endif +#else +# ifdef PNG_PREFIX + /* No macros; revert to the (redefined) function */ +# define PNG_get_uint_32 (png_get_uint_32) +# define PNG_get_uint_16 (png_get_uint_16) +# define PNG_get_int_32 (png_get_int_32) +# endif +#endif + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +PNG_EXPORT(242, void, png_set_check_for_invalid_index, + (png_structrp png_ptr, int allowed)); +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, + png_const_infop info_ptr)); +# endif +#endif /* CHECK_FOR_INVALID_INDEX */ + +/******************************************************************************* + * Section 5: SIMPLIFIED API + ******************************************************************************* + * + * Please read the documentation in libpng-manual.txt (TODO: write said + * documentation) if you don't understand what follows. + * + * The simplified API hides the details of both libpng and the PNG file format + * itself. It allows PNG files to be read into a very limited number of + * in-memory bitmap formats or to be written from the same formats. If these + * formats do not accommodate your needs then you can, and should, use the more + * sophisticated APIs above - these support a wide variety of in-memory formats + * and a wide variety of sophisticated transformations to those formats as well + * as a wide variety of APIs to manipulate ancillary information. + * + * To read a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure (see below) on the stack, set the + * version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL + * (this is REQUIRED, your program may crash if you don't do it.) + * 2) Call the appropriate png_image_begin_read... function. + * 3) Set the png_image 'format' member to the required sample format. + * 4) Allocate a buffer for the image and, if required, the color-map. + * 5) Call png_image_finish_read to read the image and, if required, the + * color-map into your buffers. + * + * There are no restrictions on the format of the PNG input itself; all valid + * color types, bit depths, and interlace methods are acceptable, and the + * input image is transformed as necessary to the requested in-memory format + * during the png_image_finish_read() step. The only caveat is that if you + * request a color-mapped image from a PNG that is full-color or makes + * complex use of an alpha channel the transformation is extremely lossy and the + * result may look terrible. + * + * To write a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure on the stack and memset() it to all zero. + * 2) Initialize the members of the structure that describe the image, setting + * the 'format' member to the format of the image samples. + * 3) Call the appropriate png_image_write... function with a pointer to the + * image and, if necessary, the color-map to write the PNG data. + * + * png_image is a structure that describes the in-memory format of an image + * when it is being read or defines the in-memory format of an image that you + * need to write: + */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + +#define PNG_IMAGE_VERSION 1 + +typedef struct png_control *png_controlp; +typedef struct +{ + png_controlp opaque; /* Initialize to NULL, free with png_image_free */ + png_uint_32 version; /* Set to PNG_IMAGE_VERSION */ + png_uint_32 width; /* Image width in pixels (columns) */ + png_uint_32 height; /* Image height in pixels (rows) */ + png_uint_32 format; /* Image format as defined below */ + png_uint_32 flags; /* A bit mask containing informational flags */ + png_uint_32 colormap_entries; + /* Number of entries in the color-map */ + + /* In the event of an error or warning the following field will be set to a + * non-zero value and the 'message' field will contain a '\0' terminated + * string with the libpng error or warning message. If both warnings and + * an error were encountered, only the error is recorded. If there + * are multiple warnings, only the first one is recorded. + * + * The upper 30 bits of this value are reserved, the low two bits contain + * a value as follows: + */ +# define PNG_IMAGE_WARNING 1 +# define PNG_IMAGE_ERROR 2 + /* + * The result is a two-bit code such that a value more than 1 indicates + * a failure in the API just called: + * + * 0 - no warning or error + * 1 - warning + * 2 - error + * 3 - error preceded by warning + */ +# define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1) + + png_uint_32 warning_or_error; + + char message[64]; +} png_image, *png_imagep; + +/* The samples of the image have one to four channels whose components have + * original values in the range 0 to 1.0: + * + * 1: A single gray or luminance channel (G). + * 2: A gray/luminance channel and an alpha channel (GA). + * 3: Three red, green, blue color channels (RGB). + * 4: Three color channels and an alpha channel (RGBA). + * + * The components are encoded in one of two ways: + * + * a) As a small integer, value 0..255, contained in a single byte. For the + * alpha channel the original value is simply value/255. For the color or + * luminance channels the value is encoded according to the sRGB specification + * and matches the 8-bit format expected by typical display devices. + * + * The color/gray channels are not scaled (pre-multiplied) by the alpha + * channel and are suitable for passing to color management software. + * + * b) As a value in the range 0..65535, contained in a 2-byte integer. All + * channels can be converted to the original value by dividing by 65535; all + * channels are linear. Color channels use the RGB encoding (RGB end-points) of + * the sRGB specification. This encoding is identified by the + * PNG_FORMAT_FLAG_LINEAR flag below. + * + * When the simplified API needs to convert between sRGB and linear colorspaces, + * the actual sRGB transfer curve defined in the sRGB specification (see the + * article at ) is used, not the gamma=1/2.2 + * approximation used elsewhere in libpng. + * + * When an alpha channel is present it is expected to denote pixel coverage + * of the color or luminance channels and is returned as an associated alpha + * channel: the color/gray channels are scaled (pre-multiplied) by the alpha + * value. + * + * The samples are either contained directly in the image data, between 1 and 8 + * bytes per pixel according to the encoding, or are held in a color-map indexed + * by bytes in the image data. In the case of a color-map the color-map entries + * are individual samples, encoded as above, and the image data has one byte per + * pixel to select the relevant sample from the color-map. + */ + +/* PNG_FORMAT_* + * + * #defines to be used in png_image::format. Each #define identifies a + * particular layout of sample data and, if present, alpha values. There are + * separate defines for each of the two component encodings. + * + * A format is built up using single bit flag values. All combinations are + * valid. Formats can be built up from the flag values or you can use one of + * the predefined values below. When testing formats always use the FORMAT_FLAG + * macros to test for individual features - future versions of the library may + * add new flags. + * + * When reading or writing color-mapped images the format should be set to the + * format of the entries in the color-map then png_image_{read,write}_colormap + * called to read or write the color-map and set the format correctly for the + * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + * + * NOTE: libpng can be built with particular features disabled. If you see + * compiler errors because the definition of one of the following flags has been + * compiled out it is because libpng does not have the required support. It is + * possible, however, for the libpng configuration to enable the format on just + * read or just write; in that case you may see an error at run time. You can + * guard against this by checking for the definition of the appropriate + * "_SUPPORTED" macro, one of: + * + * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + */ +#define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ +#define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ +#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */ +#define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ + +#ifdef PNG_FORMAT_BGR_SUPPORTED +# define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */ +#endif + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED +# define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */ +#endif + +#define PNG_FORMAT_FLAG_ASSOCIATED_ALPHA 0x40U /* alpha channel is associated */ + +/* Commonly used formats have predefined macros. + * + * First the single byte (sRGB) formats: + */ +#define PNG_FORMAT_GRAY 0 +#define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA +#define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR +#define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) +#define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +/* Then the linear 2-byte formats. When naming these "Y" is used to + * indicate a luminance (gray) channel. + */ +#define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR +#define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) +#define PNG_FORMAT_LINEAR_RGB_ALPHA \ + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA) + +/* With color-mapped formats the image data is one byte for each pixel, the byte + * is an index into the color-map which is formatted as above. To obtain a + * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP + * to one of the above definitions, or you can use one of the definitions below. + */ +#define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP) + +/* PNG_IMAGE macros + * + * These are convenience macros to derive information from a png_image + * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the + * actual image sample values - either the entries in the color-map or the + * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values + * for the pixels and will always return 1 for color-mapped formats. The + * remaining macros return information about the rows in the image and the + * complete image. + * + * NOTE: All the macros that take a png_image::format parameter are compile time + * constants if the format parameter is, itself, a constant. Therefore these + * macros can be used in array declarations and case labels where required. + * Similarly the macros are also pre-processor constants (sizeof is not used) so + * they can be used in #if tests. + * + * First the information about the samples. + */ +#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\ + (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1) + /* Return the total number of channels in a given format: 1..4 */ + +#define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\ + ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1) + /* Return the size in bytes of a single component of a pixel or color-map + * entry (as appropriate) in the image: 1 or 2. + */ + +#define PNG_IMAGE_SAMPLE_SIZE(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)) + /* This is the size of the sample data for one sample. If the image is + * color-mapped it is the size of one color-map entry (and image pixels are + * one byte in size), otherwise it is the size of one image pixel. + */ + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + +/* Corresponding information about the pixels */ +#define PNG_IMAGE_PIXEL_(test,fmt)\ + (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt)) + +#define PNG_IMAGE_PIXEL_CHANNELS(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt) + /* The number of separate channels (components) in a pixel; 1 for a + * color-mapped image. + */ + +#define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt) + /* The size, in bytes, of each component in a pixel; 1 for a color-mapped + * image. + */ + +#define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt) + /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */ + +/* Information about the whole row, or whole image */ +#define PNG_IMAGE_ROW_STRIDE(image)\ + (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width) + /* Return the total number of components in a single row of the image; this + * is the minimum 'row stride', the minimum count of components between each + * row. For a color-mapped image this is the minimum number of bytes in a + * row. + * + * WARNING: this macro overflows for some images with more than one component + * and very large image widths. libpng will refuse to process an image where + * this macro would overflow. + */ + +#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ + (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride)) + /* Return the size, in bytes, of an image buffer given a png_image and a row + * stride - the number of components to leave space for in each row. + * + * WARNING: this macro overflows a 32-bit integer for some large PNG images, + * libpng will refuse to process an image where such an overflow would occur. + */ + +#define PNG_IMAGE_SIZE(image)\ + PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image)) + /* Return the size, in bytes, of the image in memory given just a png_image; + * the row stride is the minimum stride required for the image. + */ + +#define PNG_IMAGE_COLORMAP_SIZE(image)\ + (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries) + /* Return the size, in bytes, of the color-map of this image. If the image + * format is not a color-map format this will return a size sufficient for + * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + * you don't want to allocate a color-map in this case. + */ + +/* PNG_IMAGE_FLAG_* + * + * Flags containing additional information about the image are held in the + * 'flags' field of png_image. + */ +#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01 + /* This indicates that the RGB values of the in-memory bitmap do not + * correspond to the red, green and blue end-points defined by sRGB. + */ + +#define PNG_IMAGE_FLAG_FAST 0x02 + /* On write emphasise speed over compression; the resultant PNG file will be + * larger but will be produced significantly faster, particular for large + * images. Do not use this option for images which will be distributed, only + * used it when producing intermediate files that will be read back in + * repeatedly. For a typical 24-bit image the option will double the read + * speed at the cost of increasing the image size by 25%, however for many + * more compressible images the PNG file can be 10 times larger with only a + * slight speed gain. + */ + +#define PNG_IMAGE_FLAG_16BIT_sRGB 0x04 + /* On read if the image is a 16-bit per component image and there is no gAMA + * or sRGB chunk assume that the components are sRGB encoded. Notice that + * images output by the simplified API always have gamma information; setting + * this flag only affects the interpretation of 16-bit images from an + * external source. It is recommended that the application expose this flag + * to the user; the user can normally easily recognize the difference between + * linear and sRGB encoding. This flag has no effect on write - the data + * passed to the write APIs must have the correct encoding (as defined + * above.) + * + * If the flag is not set (the default) input 16-bit per component data is + * assumed to be linear. + * + * NOTE: the flag can only be set after the png_image_begin_read_ call, + * because that call initializes the 'flags' field. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* READ APIs + * --------- + * + * The png_image passed to the read APIs must have been initialized by setting + * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.) + */ +#ifdef PNG_STDIO_SUPPORTED +PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, + const char *file_name)); + /* The named file is opened for read and the image header is filled in + * from the PNG header in the file. + */ + +PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, + FILE* file)); + /* The PNG header is read from the stdio FILE object. */ +#endif /* STDIO */ + +PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image, + png_const_voidp memory, size_t size)); + /* The PNG header is read from the given memory buffer. */ + +PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image, + png_const_colorp background, void *buffer, png_int_32 row_stride, + void *colormap)); + /* Finish reading the image into the supplied buffer and clean up the + * png_image structure. + * + * row_stride is the step, in byte or 2-byte units as appropriate, + * between adjacent rows. A positive stride indicates that the top-most row + * is first in the buffer - the normal top-down arrangement. A negative + * stride indicates that the bottom-most row is first in the buffer. + * + * background need only be supplied if an alpha channel must be removed from + * a png_byte format and the removal is to be done by compositing on a solid + * color; otherwise it may be NULL and any composition will be done directly + * onto the buffer. The value is an sRGB color to use for the background, + * for grayscale output the green channel is used. + * + * background must be supplied when an alpha channel must be removed from a + * single byte color-mapped output format, in other words if: + * + * 1) The original format from png_image_begin_read_from_* had + * PNG_FORMAT_FLAG_ALPHA set. + * 2) The format set by the application does not. + * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and + * PNG_FORMAT_FLAG_LINEAR *not* set. + * + * For linear output removing the alpha channel is always done by compositing + * on black and background is ignored. + * + * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must + * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE. + * image->colormap_entries will be updated to the actual number of entries + * written to the colormap; this may be less than the original value. + */ + +PNG_EXPORT(238, void, png_image_free, (png_imagep image)); + /* Free any data allocated by libpng in image->opaque, setting the pointer to + * NULL. May be called at any time after the structure is initialized. + */ +#endif /* SIMPLIFIED_READ */ + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +/* WRITE APIS + * ---------- + * For write you must initialize a png_image structure to describe the image to + * be written. To do this use memset to set the whole structure to 0 then + * initialize fields describing your image. + * + * version: must be set to PNG_IMAGE_VERSION + * opaque: must be initialized to NULL + * width: image width in pixels + * height: image height in rows + * format: the format of the data (image and color-map) you wish to write + * flags: set to 0 unless one of the defined flags applies; set + * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB + * values do not correspond to the colors in sRGB. + * colormap_entries: set to the number of entries in the color-map (0 to 256) + */ +#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + /* Write the image to the named file. */ + +PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, png_int_32 row_stride, + const void *colormap)); + /* Write the image to the given (FILE*). */ +#endif /* SIMPLIFIED_WRITE_STDIO */ + +/* With all write APIs if image is in one of the linear formats with 16-bit + * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG + * gamma encoded according to the sRGB specification, otherwise a 16-bit linear + * encoded PNG file is written. + * + * With color-mapped data formats the colormap parameter point to a color-map + * with at least image->colormap_entries encoded in the specified format. If + * the format is linear the written PNG color-map will be converted to sRGB + * regardless of the convert_to_8_bit flag. + * + * With all APIs row_stride is handled as in the read APIs - it is the spacing + * from one row to the next in component sized units (1 or 2 bytes) and if + * negative indicates a bottom-up row layout in the buffer. If row_stride is + * zero, libpng will calculate it for you from the image width and number of + * channels. + * + * Note that the write API does not support interlacing, sub-8-bit pixels or + * most ancillary chunks. If you need to write text chunks (e.g. for copyright + * notices) you need to use one of the other APIs. + */ + +PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, + png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit, + const void *buffer, png_int_32 row_stride, const void *colormap)); + /* Write the image to the given memory buffer. The function both writes the + * whole PNG data stream to *memory and updates *memory_bytes with the count + * of bytes written. + * + * 'memory' may be NULL. In this case *memory_bytes is not read however on + * success the number of bytes which would have been written will still be + * stored in *memory_bytes. On failure *memory_bytes will contain 0. + * + * If 'memory' is not NULL it must point to memory[*memory_bytes] of + * writeable memory. + * + * If the function returns success memory[*memory_bytes] (if 'memory' is not + * NULL) contains the written PNG data. *memory_bytes will always be less + * than or equal to the original value. + * + * If the function returns false and *memory_bytes was not changed an error + * occurred during write. If *memory_bytes was changed, or is not 0 if + * 'memory' was NULL, the write would have succeeded but for the memory + * buffer being too small. *memory_bytes contains the required number of + * bytes and will be bigger that the original value. + */ + +#define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\ + row_stride, colormap)\ + png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\ + row_stride, colormap) + /* Return the amount of memory in 'size' required to compress this image. + * The png_image structure 'image' must be filled in as in the above + * function and must not be changed before the actual write call, the buffer + * and all other parameters must also be identical to that in the final + * write call. The 'size' variable need not be initialized. + * + * NOTE: the macro returns true/false, if false is returned 'size' will be + * set to zero and the write failed and probably will fail if tried again. + */ + +/* You can pre-allocate the buffer by making sure it is of sufficient size + * regardless of the amount of compression achieved. The buffer size will + * always be bigger than the original image and it will never be filled. The + * following macros are provided to assist in allocating the buffer. + */ +#define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height) + /* The number of uncompressed bytes in the PNG byte encoding of the image; + * uncompressing the PNG IDAT data will give this number of bytes. + * + * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this + * macro can because of the extra bytes used in the PNG byte encoding. You + * need to avoid this macro if your image size approaches 2^30 in width or + * height. The same goes for the remainder of these macros; they all produce + * bigger numbers than the actual in-memory image size. + */ +#ifndef PNG_ZLIB_MAX_SIZE +# define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U) + /* An upper bound on the number of compressed bytes given 'b' uncompressed + * bytes. This is based on deflateBounds() in zlib; different + * implementations of zlib compression may conceivably produce more data so + * if your zlib implementation is not zlib itself redefine this macro + * appropriately. + */ +#endif + +#define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\ + PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image)) + /* An upper bound on the size of the data in the PNG IDAT chunks. */ + +#define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\ + ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\ + (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\ + 12U+3U*(image).colormap_entries/*PLTE data*/+\ + (((image).format&PNG_FORMAT_FLAG_ALPHA)?\ + 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\ + 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size)) + /* A helper for the following macro; if your compiler cannot handle the + * following macro use this one with the result of + * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most + * compilers should handle this just fine.) + */ + +#define PNG_IMAGE_PNG_SIZE_MAX(image)\ + PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image)) + /* An upper bound on the total length of the PNG data stream for 'image'. + * The result is of type png_alloc_size_t, on 32-bit systems this may + * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will + * run out of buffer space but return a corrected size which should work. + */ +#endif /* SIMPLIFIED_WRITE */ +/******************************************************************************* + * END OF SIMPLIFIED API + ******************************************************************************/ +#endif /* SIMPLIFIED_{READ|WRITE} */ + +/******************************************************************************* + * Section 6: IMPLEMENTATION OPTIONS + ******************************************************************************* + * + * Support for arbitrary implementation-specific optimizations. The API allows + * particular options to be turned on or off. 'Option' is the number of the + * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given + * by the PNG_OPTION_ defines below. + * + * HARDWARE: normally hardware capabilities, such as the Intel SSE instructions, + * are detected at run time, however sometimes it may be impossible + * to do this in user mode, in which case it is necessary to discover + * the capabilities in an OS specific way. Such capabilities are + * listed here when libpng has support for them and must be turned + * ON by the application if present. + * + * SOFTWARE: sometimes software optimizations actually result in performance + * decrease on some architectures or systems, or with some sets of + * PNG images. 'Software' options allow such optimizations to be + * selected at run time. + */ +#ifdef PNG_SET_OPTION_SUPPORTED +#ifdef PNG_ARM_NEON_API_SUPPORTED +# define PNG_ARM_NEON 0 /* HARDWARE: ARM Neon SIMD instructions supported */ +#endif +#define PNG_MAXIMUM_INFLATE_WINDOW 2 /* SOFTWARE: force maximum window */ +#define PNG_SKIP_sRGB_CHECK_PROFILE 4 /* SOFTWARE: Check ICC profile for sRGB */ +#ifdef PNG_MIPS_MSA_API_SUPPORTED +# define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ +#endif +#define PNG_IGNORE_ADLER32 8 +#ifdef PNG_POWERPC_VSX_API_SUPPORTED +# define PNG_POWERPC_VSX 10 /* HARDWARE: PowerPC VSX SIMD instructions supported */ +#endif +#define PNG_OPTION_NEXT 12 /* Next option - numbers must be even */ + +/* Return values: NOTE: there are four values and 'off' is *not* zero */ +#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ +#define PNG_OPTION_INVALID 1 /* Option number out of range */ +#define PNG_OPTION_OFF 2 +#define PNG_OPTION_ON 3 + +PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, + int onoff)); +#endif /* SET_OPTION */ + +/******************************************************************************* + * END OF HARDWARE AND SOFTWARE OPTIONS + ******************************************************************************/ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, in project + * defs, and in scripts/symbols.def. + */ + +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) + */ +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(249); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* Do not put anything past this line */ +#endif /* PNG_H */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/pngconf.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/pngconf.h new file mode 100644 index 0000000000..fcb4b43069 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/pngconf.h @@ -0,0 +1,623 @@ + +/* pngconf.h - machine-configurable file for libpng + * + * libpng version 1.6.39 + * + * Copyright (c) 2018-2022 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */ + +/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C + * compiler for correct compilation. The following header files are required by + * the standard. If your compiler doesn't provide these header files, or they + * do not match the standard, you will need to provide/improve them. + */ +#include +#include + +/* Library header files. These header files are all defined by ISOC90; libpng + * expects conformant implementations, however, an ISOC90 conformant system need + * not provide these header files if the functionality cannot be implemented. + * In this case it will be necessary to disable the relevant parts of libpng in + * the build of pnglibconf.h. + * + * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not + * include this unnecessary header file. + */ + +#ifdef PNG_STDIO_SUPPORTED + /* Required for the definition of FILE: */ +# include +#endif + +#ifdef PNG_SETJMP_SUPPORTED + /* Required for the definition of jmp_buf and the declaration of longjmp: */ +# include +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED + /* Required for struct tm: */ +# include +#endif + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +/* Prior to 1.6.0, it was possible to turn off 'const' in declarations, + * using PNG_NO_CONST. This is no longer supported. + */ +#define PNG_CONST const /* backward compatibility only */ + +/* This controls optimization of the reading of 16-bit and 32-bit + * values from PNG files. It can be set on a per-app-file basis: it + * just changes whether a macro is used when the function is called. + * The library builder sets the default; if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect + * against legacy (pre ISOC90) compilers that did not understand function + * prototypes. It is not required for modern C compilers. + */ +#ifndef PNGARG +# define PNGARG(arglist) arglist +#endif + +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows systems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. + */ + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. Not used in the + * public header files; see pngpriv.h for how it is used + * in the libpng build. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \ + defined(__CYGWIN__) + /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or + * MinGW on any architecture currently supported by Windows. Also includes + * Watcom builds but these need special treatment because they are not + * compatible with GCC or Visual C because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 + /* If this line results in an error __stdcall is not understood and + * PNG_API_RULE should not have been set to '1'. + */ +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) +# error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed" +# endif + +# if (defined(_MSC_VER) && _MSC_VER < 800) ||\ + (defined(__BORLANDC__) && __BORLANDC__ < 0x500) + /* older Borland and MSC + * compilers used '__export' and required this to be after + * the type. + */ +# ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP +# endif +# define PNG_DLL_EXPORT __export +# else /* newer compiler */ +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif +# endif /* compiler */ + +#else /* !Windows */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* PNG_IMPEXP may be set on the compilation system command line or (if not set) + * then in an internal header file when building the library, otherwise (when + * using the library) it is set here. + */ +#ifndef PNG_IMPEXP +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP +# endif +#endif + +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) + */ +#ifndef PNG_FUNCTION +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args +#endif + +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type +#endif + + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ + +#ifndef PNG_EXPORTA +# define PNG_EXPORTA(ordinal, type, name, args, attributes) \ + PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \ + PNG_LINKAGE_API attributes) +#endif + +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + +#define PNG_EXPORT(ordinal, type, name, args) \ + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif + +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available, incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. Disabling these removes the warnings but may also produce + * less efficient code. + */ +# if defined(__clang__) && defined(__has_attribute) + /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ +# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__) +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__) +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__) +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# if !defined(PNG_PRIVATE) +# ifdef __has_extension +# if __has_extension(attribute_unavailable_with_message) +# define PNG_PRIVATE __attribute__((__unavailable__(\ + "This function is not exported by libpng."))) +# endif +# endif +# endif +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif + +# elif defined(__GNUC__) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if __GNUC__ >= 3 +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif +# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1)) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */ +# endif /* __GNUC__ >= 3 */ + +# elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* not supported */ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_ALLOCATED +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif +# ifndef PNG_RESTRICT +# if (_MSC_VER >= 1400) +# define PNG_RESTRICT __restrict +# endif +# endif + +# elif defined(__WATCOMC__) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif +#ifndef PNG_RESTRICT +# define PNG_RESTRICT /* The C99 "restrict" feature */ +#endif + +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif +#endif + +#ifndef PNG_BUILDING_SYMBOL_TABLE +/* Some typedefs to get us started. These should be safe on most of the common + * platforms. + * + * png_uint_32 and png_int_32 may, currently, be larger than required to hold a + * 32-bit value however this is not normally advisable. + * + * png_uint_16 and png_int_16 should always be two bytes in size - this is + * verified at library build time. + * + * png_byte must always be one byte in size. + * + * The checks below use constants from limits.h, as defined by the ISOC90 + * standard. + */ +#if CHAR_BIT == 8 && UCHAR_MAX == 255 + typedef unsigned char png_byte; +#else +# error "libpng requires 8-bit bytes" +#endif + +#if INT_MIN == -32768 && INT_MAX == 32767 + typedef int png_int_16; +#elif SHRT_MIN == -32768 && SHRT_MAX == 32767 + typedef short png_int_16; +#else +# error "libpng requires a signed 16-bit type" +#endif + +#if UINT_MAX == 65535 + typedef unsigned int png_uint_16; +#elif USHRT_MAX == 65535 + typedef unsigned short png_uint_16; +#else +# error "libpng requires an unsigned 16-bit type" +#endif + +#if INT_MIN < -2147483646 && INT_MAX > 2147483646 + typedef int png_int_32; +#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 + typedef long int png_int_32; +#else +# error "libpng requires a signed 32-bit (or more) type" +#endif + +#if UINT_MAX > 4294967294U + typedef unsigned int png_uint_32; +#elif ULONG_MAX > 4294967294U + typedef unsigned long int png_uint_32; +#else +# error "libpng requires an unsigned 32-bit (or more) type" +#endif + +/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t. + * From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant + * behavior of sizeof and ptrdiff_t are required. + * The legacy typedefs are provided here for backwards compatibility. + */ +typedef size_t png_size_t; +typedef ptrdiff_t png_ptrdiff_t; + +/* libpng needs to know the maximum value of 'size_t' and this controls the + * definition of png_alloc_size_t, below. This maximum value of size_t limits + * but does not control the maximum allocations the library makes - there is + * direct application control of this through png_set_user_limits(). + */ +#ifndef PNG_SMALL_SIZE_T + /* Compiler specific tests for systems where size_t is known to be less than + * 32 bits (some of these systems may no longer work because of the lack of + * 'far' support; see above.) + */ +# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\ + (defined(_MSC_VER) && defined(MAXSEG_64K)) +# define PNG_SMALL_SIZE_T +# endif +#endif + +/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller + * than png_uint_32. Casts from size_t or png_uint_32 to png_alloc_size_t are + * not necessary; in fact, it is recommended not to use them at all, so that + * the compiler can complain when something turns out to be problematic. + * + * Casts in the other direction (from png_alloc_size_t to size_t or + * png_uint_32) should be explicitly applied; however, we do not expect to + * encounter practical situations that require such conversions. + * + * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than + * 4294967295 - i.e. less than the maximum value of png_uint_32. + */ +#ifdef PNG_SMALL_SIZE_T + typedef png_uint_32 png_alloc_size_t; +#else + typedef size_t png_alloc_size_t; +#endif + +/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler + * implementations of Intel CPU specific support of user-mode segmented address + * spaces, where 16-bit pointers address more than 65536 bytes of memory using + * separate 'segment' registers. The implementation requires two different + * types of pointer (only one of which includes the segment value.) + * + * If required this support is available in version 1.2 of libpng and may be + * available in versions through 1.5, although the correctness of the code has + * not been verified recently. + */ + +/* Typedef for floating-point numbers that are converted to fixed-point with a + * multiple of 100,000, e.g., gamma + */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void * png_voidp; +typedef const void * png_const_voidp; +typedef png_byte * png_bytep; +typedef const png_byte * png_const_bytep; +typedef png_uint_32 * png_uint_32p; +typedef const png_uint_32 * png_const_uint_32p; +typedef png_int_32 * png_int_32p; +typedef const png_int_32 * png_const_int_32p; +typedef png_uint_16 * png_uint_16p; +typedef const png_uint_16 * png_const_uint_16p; +typedef png_int_16 * png_int_16p; +typedef const png_int_16 * png_const_int_16p; +typedef char * png_charp; +typedef const char * png_const_charp; +typedef png_fixed_point * png_fixed_point_p; +typedef const png_fixed_point * png_const_fixed_point_p; +typedef size_t * png_size_tp; +typedef const size_t * png_const_size_tp; + +#ifdef PNG_STDIO_SUPPORTED +typedef FILE * png_FILE_p; +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * png_doublep; +typedef const double * png_const_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte * * png_bytepp; +typedef png_uint_32 * * png_uint_32pp; +typedef png_int_32 * * png_int_32pp; +typedef png_uint_16 * * png_uint_16pp; +typedef png_int_16 * * png_int_16pp; +typedef const char * * png_const_charpp; +typedef char * * png_charpp; +typedef png_fixed_point * * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char * * * png_charppp; + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +#endif /* PNGCONF_H */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/pnglibconf.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/pnglibconf.h new file mode 100644 index 0000000000..76b09b4299 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/libpng16/pnglibconf.h @@ -0,0 +1,219 @@ +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.6.39 */ + +/* Copyright (c) 2018-2022 Cosmin Truta */ +/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Machine generated file: DO NOT EDIT */ +/* Derived from: scripts/pnglibconf.dfa */ +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGNED_MEMORY_SUPPORTED +/*#undef PNG_ARM_NEON_API_SUPPORTED*/ +/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_BENIGN_READ_ERRORS_SUPPORTED +/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ +#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_COLORSPACE_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_FORMAT_AFIRST_SUPPORTED +#define PNG_FORMAT_BGR_SUPPORTED +#define PNG_GAMMA_SUPPORTED +#define PNG_GET_PALETTE_MAX_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/ +/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/ +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_ALPHA_MODE_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_COMPRESSED_TEXT_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GET_PALETTE_MAX_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_SCALE_16_TO_8_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_eXIf_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_OPTION_SUPPORTED +#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED +#define PNG_SIMPLIFIED_READ_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_eXIf_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_eXIf_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_zTXt_SUPPORTED +/* end of options */ +/* settings */ +#define PNG_API_RULE 0 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE +#define PNG_INFLATE_BUF_SIZE 1024 +#define PNG_LINKAGE_API extern +#define PNG_LINKAGE_CALLBACK extern +#define PNG_LINKAGE_DATA extern +#define PNG_LINKAGE_FUNCTION extern +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) +#define PNG_TEXT_Z_DEFAULT_STRATEGY 0 +#define PNG_USER_CHUNK_CACHE_MAX 1000 +#define PNG_USER_CHUNK_MALLOC_MAX 8000000 +#define PNG_USER_HEIGHT_MAX 1000000 +#define PNG_USER_WIDTH_MAX 1000000 +#define PNG_ZBUF_SIZE 8192 +#define PNG_ZLIB_VERNUM 0x12d0 +#define PNG_Z_DEFAULT_COMPRESSION (-1) +#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 +#define PNG_Z_DEFAULT_STRATEGY 1 +#define PNG_sCAL_PRECISION 5 +#define PNG_sRGB_PROFILE_CHECKS 2 +/* end of settings */ +#endif /* PNGLCONF_H */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/png.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/png.h new file mode 120000 index 0000000000..bbca0e805b --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/png.h @@ -0,0 +1 @@ +libpng16/png.h \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/pngconf.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/pngconf.h new file mode 120000 index 0000000000..addd8a1456 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/pngconf.h @@ -0,0 +1 @@ +libpng16/pngconf.h \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/pnglibconf.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/pnglibconf.h new file mode 120000 index 0000000000..64d182ad49 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/pnglibconf.h @@ -0,0 +1 @@ +libpng16/pnglibconf.h \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/turbojpeg.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/turbojpeg.h new file mode 100644 index 0000000000..68b88a4104 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/turbojpeg.h @@ -0,0 +1,2328 @@ +/* + * Copyright (C)2009-2015, 2017, 2020-2023 D. R. Commander. + * All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * - Neither the name of the libjpeg-turbo Project nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __TURBOJPEG_H__ +#define __TURBOJPEG_H__ + +#include + +#if defined(_WIN32) && defined(DLLDEFINE) +#define DLLEXPORT __declspec(dllexport) +#else +#define DLLEXPORT +#endif +#define DLLCALL + + +/** + * @addtogroup TurboJPEG + * TurboJPEG API. This API provides an interface for generating, decoding, and + * transforming planar YUV and JPEG images in memory. + * + * @anchor YUVnotes + * YUV Image Format Notes + * ---------------------- + * Technically, the JPEG format uses the YCbCr colorspace (which is technically + * not a colorspace but a color transform), but per the convention of the + * digital video community, the TurboJPEG API uses "YUV" to refer to an image + * format consisting of Y, Cb, and Cr image planes. + * + * Each plane is simply a 2D array of bytes, each byte representing the value + * of one of the components (Y, Cb, or Cr) at a particular location in the + * image. The width and height of each plane are determined by the image + * width, height, and level of chrominance subsampling. The luminance plane + * width is the image width padded to the nearest multiple of the horizontal + * subsampling factor (1 in the case of 4:4:4, grayscale, 4:4:0, or 4:4:1; 2 in + * the case of 4:2:2 or 4:2:0; 4 in the case of 4:1:1.) Similarly, the + * luminance plane height is the image height padded to the nearest multiple of + * the vertical subsampling factor (1 in the case of 4:4:4, 4:2:2, grayscale, + * or 4:1:1; 2 in the case of 4:2:0 or 4:4:0; 4 in the case of 4:4:1.) This is + * irrespective of any additional padding that may be specified as an argument + * to the various YUV functions. The chrominance plane width is equal to the + * luminance plane width divided by the horizontal subsampling factor, and the + * chrominance plane height is equal to the luminance plane height divided by + * the vertical subsampling factor. + * + * For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is + * used, then the luminance plane would be 36 x 35 bytes, and each of the + * chrominance planes would be 18 x 35 bytes. If you specify a row alignment + * of 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, + * and each of the chrominance planes would be 20 x 35 bytes. + * + * @{ + */ + + +/** + * The number of initialization options + */ +#define TJ_NUMINIT 3 + +/** + * Initialization options. + */ +enum TJINIT { + /** + * Initialize the TurboJPEG instance for compression. + */ + TJINIT_COMPRESS, + /** + * Initialize the TurboJPEG instance for decompression. + */ + TJINIT_DECOMPRESS, + /** + * Initialize the TurboJPEG instance for lossless transformation (both + * compression and decompression.) + */ + TJINIT_TRANSFORM +}; + + +/** + * The number of chrominance subsampling options + */ +#define TJ_NUMSAMP 7 + +/** + * Chrominance subsampling options. + * When pixels are converted from RGB to YCbCr (see #TJCS_YCbCr) or from CMYK + * to YCCK (see #TJCS_YCCK) as part of the JPEG compression process, some of + * the Cb and Cr (chrominance) components can be discarded or averaged together + * to produce a smaller image with little perceptible loss of image clarity. + * (The human eye is more sensitive to small changes in brightness than to + * small changes in color.) This is called "chrominance subsampling". + */ +enum TJSAMP { + /** + * 4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG or + * YUV image will contain one chrominance component for every pixel in the + * source image. + */ + TJSAMP_444, + /** + * 4:2:2 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 2x1 block of pixels in the source image. + */ + TJSAMP_422, + /** + * 4:2:0 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 2x2 block of pixels in the source image. + */ + TJSAMP_420, + /** + * Grayscale. The JPEG or YUV image will contain no chrominance components. + */ + TJSAMP_GRAY, + /** + * 4:4:0 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 1x2 block of pixels in the source image. + * + * @note 4:4:0 subsampling is not fully accelerated in libjpeg-turbo. + */ + TJSAMP_440, + /** + * 4:1:1 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 4x1 block of pixels in the source image. + * JPEG images compressed with 4:1:1 subsampling will be almost exactly the + * same size as those compressed with 4:2:0 subsampling, and in the + * aggregate, both subsampling methods produce approximately the same + * perceptual quality. However, 4:1:1 is better able to reproduce sharp + * horizontal features. + * + * @note 4:1:1 subsampling is not fully accelerated in libjpeg-turbo. + */ + TJSAMP_411, + /** + * 4:4:1 chrominance subsampling. The JPEG or YUV image will contain one + * chrominance component for every 1x4 block of pixels in the source image. + * JPEG images compressed with 4:4:1 subsampling will be almost exactly the + * same size as those compressed with 4:2:0 subsampling, and in the + * aggregate, both subsampling methods produce approximately the same + * perceptual quality. However, 4:4:1 is better able to reproduce sharp + * vertical features. + * + * @note 4:4:1 subsampling is not fully accelerated in libjpeg-turbo. + */ + TJSAMP_441, + /** + * Unknown subsampling. The JPEG image uses an unusual type of chrominance + * subsampling. Such images can be decompressed into packed-pixel images, + * but they cannot be + * - decompressed into planar YUV images, + * - losslessly transformed if #TJXOPT_CROP is specified, or + * - partially decompressed using a cropping region. + */ + TJSAMP_UNKNOWN = -1 +}; + +/** + * MCU block width (in pixels) for a given level of chrominance subsampling. + * MCU block sizes: + * - 8x8 for no subsampling or grayscale + * - 16x8 for 4:2:2 + * - 8x16 for 4:4:0 + * - 16x16 for 4:2:0 + * - 32x8 for 4:1:1 + * - 8x32 for 4:4:1 + */ +static const int tjMCUWidth[TJ_NUMSAMP] = { 8, 16, 16, 8, 8, 32, 8 }; + +/** + * MCU block height (in pixels) for a given level of chrominance subsampling. + * MCU block sizes: + * - 8x8 for no subsampling or grayscale + * - 16x8 for 4:2:2 + * - 8x16 for 4:4:0 + * - 16x16 for 4:2:0 + * - 32x8 for 4:1:1 + * - 8x32 for 4:4:1 + */ +static const int tjMCUHeight[TJ_NUMSAMP] = { 8, 8, 16, 8, 16, 8, 32 }; + + +/** + * The number of pixel formats + */ +#define TJ_NUMPF 12 + +/** + * Pixel formats + */ +enum TJPF { + /** + * RGB pixel format. The red, green, and blue components in the image are + * stored in 3-sample pixels in the order R, G, B from lowest to highest + * memory address within each pixel. + */ + TJPF_RGB, + /** + * BGR pixel format. The red, green, and blue components in the image are + * stored in 3-sample pixels in the order B, G, R from lowest to highest + * memory address within each pixel. + */ + TJPF_BGR, + /** + * RGBX pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order R, G, B from lowest to highest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_RGBX, + /** + * BGRX pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order B, G, R from lowest to highest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_BGRX, + /** + * XBGR pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order R, G, B from highest to lowest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_XBGR, + /** + * XRGB pixel format. The red, green, and blue components in the image are + * stored in 4-sample pixels in the order B, G, R from highest to lowest + * memory address within each pixel. The X component is ignored when + * compressing and undefined when decompressing. + */ + TJPF_XRGB, + /** + * Grayscale pixel format. Each 1-sample pixel represents a luminance + * (brightness) level from 0 to the maximum sample value (255 for 8-bit + * samples, 4095 for 12-bit samples, and 65535 for 16-bit samples.) + */ + TJPF_GRAY, + /** + * RGBA pixel format. This is the same as @ref TJPF_RGBX, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_RGBA, + /** + * BGRA pixel format. This is the same as @ref TJPF_BGRX, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_BGRA, + /** + * ABGR pixel format. This is the same as @ref TJPF_XBGR, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_ABGR, + /** + * ARGB pixel format. This is the same as @ref TJPF_XRGB, except that when + * decompressing, the X component is guaranteed to be equal to the maximum + * sample value, which can be interpreted as an opaque alpha channel. + */ + TJPF_ARGB, + /** + * CMYK pixel format. Unlike RGB, which is an additive color model used + * primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive + * color model used primarily for printing. In the CMYK color model, the + * value of each color component typically corresponds to an amount of cyan, + * magenta, yellow, or black ink that is applied to a white background. In + * order to convert between CMYK and RGB, it is necessary to use a color + * management system (CMS.) A CMS will attempt to map colors within the + * printer's gamut to perceptually similar colors in the display's gamut and + * vice versa, but the mapping is typically not 1:1 or reversible, nor can it + * be defined with a simple formula. Thus, such a conversion is out of scope + * for a codec library. However, the TurboJPEG API allows for compressing + * packed-pixel CMYK images into YCCK JPEG images (see #TJCS_YCCK) and + * decompressing YCCK JPEG images into packed-pixel CMYK images. + */ + TJPF_CMYK, + /** + * Unknown pixel format. Currently this is only used by #tj3LoadImage8(), + * #tj3LoadImage12(), and #tj3LoadImage16(). + */ + TJPF_UNKNOWN = -1 +}; + +/** + * Red offset (in samples) for a given pixel format. This specifies the number + * of samples that the red component is offset from the start of the pixel. + * For instance, if an 8-bit-per-component pixel of format TJPF_BGRX is stored + * in `unsigned char pixel[]`, then the red component will be + * `pixel[tjRedOffset[TJPF_BGRX]]`. This will be -1 if the pixel format does + * not have a red component. + */ +static const int tjRedOffset[TJ_NUMPF] = { + 0, 2, 0, 2, 3, 1, -1, 0, 2, 3, 1, -1 +}; +/** + * Green offset (in samples) for a given pixel format. This specifies the + * number of samples that the green component is offset from the start of the + * pixel. For instance, if an 8-bit-per-component pixel of format TJPF_BGRX is + * stored in `unsigned char pixel[]`, then the green component will be + * `pixel[tjGreenOffset[TJPF_BGRX]]`. This will be -1 if the pixel format does + * not have a green component. + */ +static const int tjGreenOffset[TJ_NUMPF] = { + 1, 1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1 +}; +/** + * Blue offset (in samples) for a given pixel format. This specifies the + * number of samples that the blue component is offset from the start of the + * pixel. For instance, if an 8-bit-per-component pixel of format TJPF_BGRX is + * stored in `unsigned char pixel[]`, then the blue component will be + * `pixel[tjBlueOffset[TJPF_BGRX]]`. This will be -1 if the pixel format does + * not have a blue component. + */ +static const int tjBlueOffset[TJ_NUMPF] = { + 2, 0, 2, 0, 1, 3, -1, 2, 0, 1, 3, -1 +}; +/** + * Alpha offset (in samples) for a given pixel format. This specifies the + * number of samples that the alpha component is offset from the start of the + * pixel. For instance, if an 8-bit-per-component pixel of format TJPF_BGRA is + * stored in `unsigned char pixel[]`, then the alpha component will be + * `pixel[tjAlphaOffset[TJPF_BGRA]]`. This will be -1 if the pixel format does + * not have an alpha component. + */ +static const int tjAlphaOffset[TJ_NUMPF] = { + -1, -1, -1, -1, -1, -1, -1, 3, 3, 0, 0, -1 +}; +/** + * Pixel size (in samples) for a given pixel format + */ +static const int tjPixelSize[TJ_NUMPF] = { + 3, 3, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4 +}; + + +/** + * The number of JPEG colorspaces + */ +#define TJ_NUMCS 5 + +/** + * JPEG colorspaces + */ +enum TJCS { + /** + * RGB colorspace. When compressing the JPEG image, the R, G, and B + * components in the source image are reordered into image planes, but no + * colorspace conversion or subsampling is performed. RGB JPEG images can be + * compressed from and decompressed to packed-pixel images with any of the + * extended RGB or grayscale pixel formats, but they cannot be compressed + * from or decompressed to planar YUV images. + */ + TJCS_RGB, + /** + * YCbCr colorspace. YCbCr is not an absolute colorspace but rather a + * mathematical transformation of RGB designed solely for storage and + * transmission. YCbCr images must be converted to RGB before they can + * actually be displayed. In the YCbCr colorspace, the Y (luminance) + * component represents the black & white portion of the original image, and + * the Cb and Cr (chrominance) components represent the color portion of the + * original image. Originally, the analog equivalent of this transformation + * allowed the same signal to drive both black & white and color televisions, + * but JPEG images use YCbCr primarily because it allows the color data to be + * optionally subsampled for the purposes of reducing network or disk usage. + * YCbCr is the most common JPEG colorspace, and YCbCr JPEG images can be + * compressed from and decompressed to packed-pixel images with any of the + * extended RGB or grayscale pixel formats. YCbCr JPEG images can also be + * compressed from and decompressed to planar YUV images. + */ + TJCS_YCbCr, + /** + * Grayscale colorspace. The JPEG image retains only the luminance data (Y + * component), and any color data from the source image is discarded. + * Grayscale JPEG images can be compressed from and decompressed to + * packed-pixel images with any of the extended RGB or grayscale pixel + * formats, or they can be compressed from and decompressed to planar YUV + * images. + */ + TJCS_GRAY, + /** + * CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K + * components in the source image are reordered into image planes, but no + * colorspace conversion or subsampling is performed. CMYK JPEG images can + * only be compressed from and decompressed to packed-pixel images with the + * CMYK pixel format. + */ + TJCS_CMYK, + /** + * YCCK colorspace. YCCK (AKA "YCbCrK") is not an absolute colorspace but + * rather a mathematical transformation of CMYK designed solely for storage + * and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be + * reversibly transformed into YCCK, and as with YCbCr, the chrominance + * components in the YCCK pixels can be subsampled without incurring major + * perceptual loss. YCCK JPEG images can only be compressed from and + * decompressed to packed-pixel images with the CMYK pixel format. + */ + TJCS_YCCK +}; + + +/** + * Parameters + */ +enum TJPARAM { + /** + * Error handling behavior + * + * **Value** + * - `0` *[default]* Allow the current compression/decompression/transform + * operation to complete unless a fatal error is encountered. + * - `1` Immediately discontinue the current + * compression/decompression/transform operation if a warning (non-fatal + * error) occurs. + */ + TJPARAM_STOPONWARNING, + /** + * Row order in packed-pixel source/destination images + * + * **Value** + * - `0` *[default]* top-down (X11) order + * - `1` bottom-up (Windows, OpenGL) order + */ + TJPARAM_BOTTOMUP, + /** + * JPEG destination buffer (re)allocation [compression, lossless + * transformation] + * + * **Value** + * - `0` *[default]* Attempt to allocate or reallocate the JPEG destination + * buffer as needed. + * - `1` Generate an error if the JPEG destination buffer is invalid or too + * small. + */ + TJPARAM_NOREALLOC, + /** + * Perceptual quality of lossy JPEG images [compression only] + * + * **Value** + * - `1`-`100` (`1` = worst quality but best compression, `100` = best + * quality but worst compression) *[no default; must be explicitly + * specified]* + */ + TJPARAM_QUALITY, + /** + * Chrominance subsampling level + * + * The JPEG or YUV image uses (decompression, decoding) or will use (lossy + * compression, encoding) the specified level of chrominance subsampling. + * + * **Value** + * - One of the @ref TJSAMP "chrominance subsampling options" *[no default; + * must be explicitly specified for lossy compression, encoding, and + * decoding]* + */ + TJPARAM_SUBSAMP, + /** + * JPEG width (in pixels) [decompression only, read-only] + */ + TJPARAM_JPEGWIDTH, + /** + * JPEG height (in pixels) [decompression only, read-only] + */ + TJPARAM_JPEGHEIGHT, + /** + * JPEG data precision (bits per sample) [decompression only, read-only] + * + * The JPEG image uses the specified number of bits per sample. + * + * **Value** + * - `8`, `12`, or `16` + * + * 12-bit data precision implies #TJPARAM_OPTIMIZE unless #TJPARAM_ARITHMETIC + * is set. + */ + TJPARAM_PRECISION, + /** + * JPEG colorspace + * + * The JPEG image uses (decompression) or will use (lossy compression) the + * specified colorspace. + * + * **Value** + * - One of the @ref TJCS "JPEG colorspaces" *[default for lossy compression: + * automatically selected based on the subsampling level and pixel format]* + */ + TJPARAM_COLORSPACE, + /** + * Chrominance upsampling algorithm [lossy decompression only] + * + * **Value** + * - `0` *[default]* Use smooth upsampling when decompressing a JPEG image + * that was compressed using chrominance subsampling. This creates a smooth + * transition between neighboring chrominance components in order to reduce + * upsampling artifacts in the decompressed image. + * - `1` Use the fastest chrominance upsampling algorithm available, which + * may combine upsampling with color conversion. + */ + TJPARAM_FASTUPSAMPLE, + /** + * DCT/IDCT algorithm [lossy compression and decompression] + * + * **Value** + * - `0` *[default]* Use the most accurate DCT/IDCT algorithm available. + * - `1` Use the fastest DCT/IDCT algorithm available. + * + * This parameter is provided mainly for backward compatibility with libjpeg, + * which historically implemented several different DCT/IDCT algorithms + * because of performance limitations with 1990s CPUs. In the libjpeg-turbo + * implementation of the TurboJPEG API: + * - The "fast" and "accurate" DCT/IDCT algorithms perform similarly on + * modern x86/x86-64 CPUs that support AVX2 instructions. + * - The "fast" algorithm is generally only about 5-15% faster than the + * "accurate" algorithm on other types of CPUs. + * - The difference in accuracy between the "fast" and "accurate" algorithms + * is the most pronounced at JPEG quality levels above 90 and tends to be + * more pronounced with decompression than with compression. + * - The "fast" algorithm degrades and is not fully accelerated for JPEG + * quality levels above 97, so it will be slower than the "accurate" + * algorithm. + */ + TJPARAM_FASTDCT, + /** + * Optimized baseline entropy coding [lossy compression only] + * + * **Value** + * - `0` *[default]* The JPEG image will use the default Huffman tables. + * - `1` Optimal Huffman tables will be computed for the JPEG image. For + * lossless transformation, this can also be specified using + * #TJXOPT_OPTIMIZE. + * + * Optimized baseline entropy coding will improve compression slightly + * (generally 5% or less), but it will reduce compression performance + * considerably. + */ + TJPARAM_OPTIMIZE, + /** + * Progressive entropy coding + * + * **Value** + * - `0` *[default for compression, lossless transformation]* The lossy JPEG + * image uses (decompression) or will use (compression, lossless + * transformation) baseline entropy coding. + * - `1` The lossy JPEG image uses (decompression) or will use (compression, + * lossless transformation) progressive entropy coding. For lossless + * transformation, this can also be specified using #TJXOPT_PROGRESSIVE. + * + * Progressive entropy coding will generally improve compression relative to + * baseline entropy coding, but it will reduce compression and decompression + * performance considerably. Can be combined with #TJPARAM_ARITHMETIC. + * Implies #TJPARAM_OPTIMIZE unless #TJPARAM_ARITHMETIC is also set. + */ + TJPARAM_PROGRESSIVE, + /** + * Progressive JPEG scan limit for lossy JPEG images [decompression, lossless + * transformation] + * + * Setting this parameter will cause the decompression and transform + * functions to return an error if the number of scans in a progressive JPEG + * image exceeds the specified limit. The primary purpose of this is to + * allow security-critical applications to guard against an exploit of the + * progressive JPEG format described in + * this report. + * + * **Value** + * - maximum number of progressive JPEG scans that the decompression and + * transform functions will process *[default: `0` (no limit)]* + * + * @see #TJPARAM_PROGRESSIVE + */ + TJPARAM_SCANLIMIT, + /** + * Arithmetic entropy coding + * + * **Value** + * - `0` *[default for compression, lossless transformation]* The lossy JPEG + * image uses (decompression) or will use (compression, lossless + * transformation) Huffman entropy coding. + * - `1` The lossy JPEG image uses (decompression) or will use (compression, + * lossless transformation) arithmetic entropy coding. For lossless + * transformation, this can also be specified using #TJXOPT_ARITHMETIC. + * + * Arithmetic entropy coding will generally improve compression relative to + * Huffman entropy coding, but it will reduce compression and decompression + * performance considerably. Can be combined with #TJPARAM_PROGRESSIVE. + */ + TJPARAM_ARITHMETIC, + /** + * Lossless JPEG + * + * **Value** + * - `0` *[default for compression]* The JPEG image is (decompression) or + * will be (compression) lossy/DCT-based. + * - `1` The JPEG image is (decompression) or will be (compression) + * lossless/predictive. + * + * In most cases, compressing and decompressing lossless JPEG images is + * considerably slower than compressing and decompressing lossy JPEG images, + * and lossless JPEG images are much larger than lossy JPEG images. Thus, + * lossless JPEG images are typically used only for applications that require + * mathematically lossless compression. Also note that the following + * features are not available with lossless JPEG images: + * - Colorspace conversion (lossless JPEG images always use #TJCS_RGB, + * #TJCS_GRAY, or #TJCS_CMYK, depending on the pixel format of the source + * image) + * - Chrominance subsampling (lossless JPEG images always use #TJSAMP_444) + * - JPEG quality selection + * - DCT/IDCT algorithm selection + * - Progressive entropy coding + * - Arithmetic entropy coding + * - Compression from/decompression to planar YUV images + * - Decompression scaling + * - Lossless transformation + * + * @see #TJPARAM_LOSSLESSPSV, #TJPARAM_LOSSLESSPT + */ + TJPARAM_LOSSLESS, + /** + * Lossless JPEG predictor selection value (PSV) + * + * **Value** + * - `1`-`7` *[default for compression: `1`]* + * + * Lossless JPEG compression shares no algorithms with lossy JPEG + * compression. Instead, it uses differential pulse-code modulation (DPCM), + * an algorithm whereby each sample is encoded as the difference between the + * sample's value and a "predictor", which is based on the values of + * neighboring samples. If Ra is the sample immediately to the left of the + * current sample, Rb is the sample immediately above the current sample, and + * Rc is the sample diagonally to the left and above the current sample, then + * the relationship between the predictor selection value and the predictor + * is as follows: + * + * PSV | Predictor + * ----|---------- + * 1 | Ra + * 2 | Rb + * 3 | Rc + * 4 | Ra + Rb – Rc + * 5 | Ra + (Rb – Rc) / 2 + * 6 | Rb + (Ra – Rc) / 2 + * 7 | (Ra + Rb) / 2 + * + * Predictors 1-3 are 1-dimensional predictors, whereas Predictors 4-7 are + * 2-dimensional predictors. The best predictor for a particular image + * depends on the image. + * + * @see #TJPARAM_LOSSLESS + */ + TJPARAM_LOSSLESSPSV, + /** + * Lossless JPEG point transform (Pt) + * + * **Value** + * - `0` through ***precision*** *- 1*, where ***precision*** is the JPEG + * data precision in bits *[default for compression: `0`]* + * + * A point transform value of `0` is necessary in order to generate a fully + * lossless JPEG image. (A non-zero point transform value right-shifts the + * input samples by the specified number of bits, which is effectively a form + * of lossy color quantization.) + * + * @see #TJPARAM_LOSSLESS, #TJPARAM_PRECISION + */ + TJPARAM_LOSSLESSPT, + /** + * JPEG restart marker interval in MCU blocks (lossy) or samples (lossless) + * [compression only] + * + * The nature of entropy coding is such that a corrupt JPEG image cannot + * be decompressed beyond the point of corruption unless it contains restart + * markers. A restart marker stops and restarts the entropy coding algorithm + * so that, if a JPEG image is corrupted, decompression can resume at the + * next marker. Thus, adding more restart markers improves the fault + * tolerance of the JPEG image, but adding too many restart markers can + * adversely affect the compression ratio and performance. + * + * **Value** + * - the number of MCU blocks or samples between each restart marker + * *[default: `0` (no restart markers)]* + * + * Setting this parameter to a non-zero value sets #TJPARAM_RESTARTROWS to 0. + */ + TJPARAM_RESTARTBLOCKS, + /** + * JPEG restart marker interval in MCU rows (lossy) or sample rows (lossless) + * [compression only] + * + * See #TJPARAM_RESTARTBLOCKS for a description of restart markers. + * + * **Value** + * - the number of MCU rows or sample rows between each restart marker + * *[default: `0` (no restart markers)]* + * + * Setting this parameter to a non-zero value sets #TJPARAM_RESTARTBLOCKS to + * 0. + */ + TJPARAM_RESTARTROWS, + /** + * JPEG horizontal pixel density + * + * **Value** + * - The JPEG image has (decompression) or will have (compression) the + * specified horizontal pixel density *[default for compression: `1`]*. + * + * This value is stored in or read from the JPEG header. It does not affect + * the contents of the JPEG image. Note that this parameter is set by + * #tj3LoadImage8() when loading a Windows BMP file that contains pixel + * density information, and the value of this parameter is stored to a + * Windows BMP file by #tj3SaveImage8() if the value of #TJPARAM_DENSITYUNITS + * is `2`. + * + * @see TJPARAM_DENSITYUNITS + */ + TJPARAM_XDENSITY, + /** + * JPEG vertical pixel density + * + * **Value** + * - The JPEG image has (decompression) or will have (compression) the + * specified vertical pixel density *[default for compression: `1`]*. + * + * This value is stored in or read from the JPEG header. It does not affect + * the contents of the JPEG image. Note that this parameter is set by + * #tj3LoadImage8() when loading a Windows BMP file that contains pixel + * density information, and the value of this parameter is stored to a + * Windows BMP file by #tj3SaveImage8() if the value of #TJPARAM_DENSITYUNITS + * is `2`. + * + * @see TJPARAM_DENSITYUNITS + */ + TJPARAM_YDENSITY, + /** + * JPEG pixel density units + * + * **Value** + * - `0` *[default for compression]* The pixel density of the JPEG image is + * expressed (decompression) or will be expressed (compression) in unknown + * units. + * - `1` The pixel density of the JPEG image is expressed (decompression) or + * will be expressed (compression) in units of pixels/inch. + * - `2` The pixel density of the JPEG image is expressed (decompression) or + * will be expressed (compression) in units of pixels/cm. + * + * This value is stored in or read from the JPEG header. It does not affect + * the contents of the JPEG image. Note that this parameter is set by + * #tj3LoadImage8() when loading a Windows BMP file that contains pixel + * density information, and the value of this parameter is stored to a + * Windows BMP file by #tj3SaveImage8() if the value is `2`. + * + * @see TJPARAM_XDENSITY, TJPARAM_YDENSITY + */ + TJPARAM_DENSITYUNITS, + /** + * Memory limit for intermediate buffers + * + * **Value** + * - the maximum amount of memory (in megabytes) that will be allocated for + * intermediate buffers, which are used with progressive JPEG compression and + * decompression, optimized baseline entropy coding, lossless JPEG + * compression, and lossless transformation *[default: `0` (no limit)]* + */ + TJPARAM_MAXMEMORY, + /** + * Image size limit [decompression, lossless transformation, packed-pixel + * image loading] + * + * Setting this parameter will cause the decompression, transform, and image + * loading functions to return an error if the number of pixels in the source + * image exceeds the specified limit. This allows security-critical + * applications to guard against excessive memory consumption. + * + * **Value** + * - maximum number of pixels that the decompression, transform, and image + * loading functions will process *[default: `0` (no limit)]* + */ + TJPARAM_MAXPIXELS +}; + + +/** + * The number of error codes + */ +#define TJ_NUMERR 2 + +/** + * Error codes + */ +enum TJERR { + /** + * The error was non-fatal and recoverable, but the destination image may + * still be corrupt. + */ + TJERR_WARNING, + /** + * The error was fatal and non-recoverable. + */ + TJERR_FATAL +}; + + +/** + * The number of transform operations + */ +#define TJ_NUMXOP 8 + +/** + * Transform operations for #tj3Transform() + */ +enum TJXOP { + /** + * Do not transform the position of the image pixels + */ + TJXOP_NONE, + /** + * Flip (mirror) image horizontally. This transform is imperfect if there + * are any partial MCU blocks on the right edge (see #TJXOPT_PERFECT.) + */ + TJXOP_HFLIP, + /** + * Flip (mirror) image vertically. This transform is imperfect if there are + * any partial MCU blocks on the bottom edge (see #TJXOPT_PERFECT.) + */ + TJXOP_VFLIP, + /** + * Transpose image (flip/mirror along upper left to lower right axis.) This + * transform is always perfect. + */ + TJXOP_TRANSPOSE, + /** + * Transverse transpose image (flip/mirror along upper right to lower left + * axis.) This transform is imperfect if there are any partial MCU blocks in + * the image (see #TJXOPT_PERFECT.) + */ + TJXOP_TRANSVERSE, + /** + * Rotate image clockwise by 90 degrees. This transform is imperfect if + * there are any partial MCU blocks on the bottom edge (see + * #TJXOPT_PERFECT.) + */ + TJXOP_ROT90, + /** + * Rotate image 180 degrees. This transform is imperfect if there are any + * partial MCU blocks in the image (see #TJXOPT_PERFECT.) + */ + TJXOP_ROT180, + /** + * Rotate image counter-clockwise by 90 degrees. This transform is imperfect + * if there are any partial MCU blocks on the right edge (see + * #TJXOPT_PERFECT.) + */ + TJXOP_ROT270 +}; + + +/** + * This option will cause #tj3Transform() to return an error if the transform + * is not perfect. Lossless transforms operate on MCU blocks, whose size + * depends on the level of chrominance subsampling used (see #tjMCUWidth and + * #tjMCUHeight.) If the image's width or height is not evenly divisible by + * the MCU block size, then there will be partial MCU blocks on the right + * and/or bottom edges. It is not possible to move these partial MCU blocks to + * the top or left of the image, so any transform that would require that is + * "imperfect." If this option is not specified, then any partial MCU blocks + * that cannot be transformed will be left in place, which will create + * odd-looking strips on the right or bottom edge of the image. + */ +#define TJXOPT_PERFECT (1 << 0) +/** + * This option will cause #tj3Transform() to discard any partial MCU blocks + * that cannot be transformed. + */ +#define TJXOPT_TRIM (1 << 1) +/** + * This option will enable lossless cropping. See #tj3Transform() for more + * information. + */ +#define TJXOPT_CROP (1 << 2) +/** + * This option will discard the color data in the source image and produce a + * grayscale destination image. + */ +#define TJXOPT_GRAY (1 << 3) +/** + * This option will prevent #tj3Transform() from outputting a JPEG image for + * this particular transform. (This can be used in conjunction with a custom + * filter to capture the transformed DCT coefficients without transcoding + * them.) + */ +#define TJXOPT_NOOUTPUT (1 << 4) +/** + * This option will enable progressive entropy coding in the JPEG image + * generated by this particular transform. Progressive entropy coding will + * generally improve compression relative to baseline entropy coding (the + * default), but it will reduce decompression performance considerably. + * Can be combined with #TJXOPT_ARITHMETIC. Implies #TJXOPT_OPTIMIZE unless + * #TJXOPT_ARITHMETIC is also specified. + */ +#define TJXOPT_PROGRESSIVE (1 << 5) +/** + * This option will prevent #tj3Transform() from copying any extra markers + * (including EXIF and ICC profile data) from the source image to the + * destination image. + */ +#define TJXOPT_COPYNONE (1 << 6) +/** + * This option will enable arithmetic entropy coding in the JPEG image + * generated by this particular transform. Arithmetic entropy coding will + * generally improve compression relative to Huffman entropy coding (the + * default), but it will reduce decompression performance considerably. Can be + * combined with #TJXOPT_PROGRESSIVE. + */ +#define TJXOPT_ARITHMETIC (1 << 7) +/** + * This option will enable optimized baseline entropy coding in the JPEG image + * generated by this particular transform. Optimized baseline entropy coding + * will improve compression slightly (generally 5% or less.) + */ +#define TJXOPT_OPTIMIZE (1 << 8) + + +/** + * Scaling factor + */ +typedef struct { + /** + * Numerator + */ + int num; + /** + * Denominator + */ + int denom; +} tjscalingfactor; + +/** + * Cropping region + */ +typedef struct { + /** + * The left boundary of the cropping region. This must be evenly divisible + * by the MCU block width (see #tjMCUWidth.) + */ + int x; + /** + * The upper boundary of the cropping region. For lossless transformation, + * this must be evenly divisible by the MCU block height (see #tjMCUHeight.) + */ + int y; + /** + * The width of the cropping region. Setting this to 0 is the equivalent of + * setting it to the width of the source JPEG image - x. + */ + int w; + /** + * The height of the cropping region. Setting this to 0 is the equivalent of + * setting it to the height of the source JPEG image - y. + */ + int h; +} tjregion; + +/** + * A #tjregion structure that specifies no cropping + */ +static const tjregion TJUNCROPPED = { 0, 0, 0, 0 }; + +/** + * Lossless transform + */ +typedef struct tjtransform { + /** + * Cropping region + */ + tjregion r; + /** + * One of the @ref TJXOP "transform operations" + */ + int op; + /** + * The bitwise OR of one of more of the @ref TJXOPT_ARITHMETIC + * "transform options" + */ + int options; + /** + * Arbitrary data that can be accessed within the body of the callback + * function + */ + void *data; + /** + * A callback function that can be used to modify the DCT coefficients after + * they are losslessly transformed but before they are transcoded to a new + * JPEG image. This allows for custom filters or other transformations to be + * applied in the frequency domain. + * + * @param coeffs pointer to an array of transformed DCT coefficients. (NOTE: + * this pointer is not guaranteed to be valid once the callback returns, so + * applications wishing to hand off the DCT coefficients to another function + * or library should make a copy of them within the body of the callback.) + * + * @param arrayRegion #tjregion structure containing the width and height of + * the array pointed to by `coeffs` as well as its offset relative to the + * component plane. TurboJPEG implementations may choose to split each + * component plane into multiple DCT coefficient arrays and call the callback + * function once for each array. + * + * @param planeRegion #tjregion structure containing the width and height of + * the component plane to which `coeffs` belongs + * + * @param componentID ID number of the component plane to which `coeffs` + * belongs. (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in + * typical JPEG images.) + * + * @param transformID ID number of the transformed image to which `coeffs` + * belongs. This is the same as the index of the transform in the + * `transforms` array that was passed to #tj3Transform(). + * + * @param transform a pointer to a #tjtransform structure that specifies the + * parameters and/or cropping region for this transform + * + * @return 0 if the callback was successful, or -1 if an error occurred. + */ + int (*customFilter) (short *coeffs, tjregion arrayRegion, + tjregion planeRegion, int componentID, int transformID, + struct tjtransform *transform); +} tjtransform; + +/** + * TurboJPEG instance handle + */ +typedef void *tjhandle; + + +/** + * Compute the scaled value of `dimension` using the given scaling factor. + * This macro performs the integer equivalent of `ceil(dimension * + * scalingFactor)`. + */ +#define TJSCALED(dimension, scalingFactor) \ + (((dimension) * scalingFactor.num + scalingFactor.denom - 1) / \ + scalingFactor.denom) + +/** + * A #tjscalingfactor structure that specifies a scaling factor of 1/1 (no + * scaling) + */ +static const tjscalingfactor TJUNSCALED = { 1, 1 }; + + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * Create a new TurboJPEG instance. + * + * @param initType one of the @ref TJINIT "initialization options" + * + * @return a handle to the newly-created instance, or NULL if an error occurred + * (see #tj3GetErrorStr().) + */ +DLLEXPORT tjhandle tj3Init(int initType); + + +/** + * Set the value of a parameter. + * + * @param handle handle to a TurboJPEG instance + * + * @param param one of the @ref TJPARAM "parameters" + * + * @param value value of the parameter (refer to @ref TJPARAM + * "parameter documentation") + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3Set(tjhandle handle, int param, int value); + + +/** + * Get the value of a parameter. + * + * @param handle handle to a TurboJPEG instance + * + * @param param one of the @ref TJPARAM "parameters" + * + * @return the value of the specified parameter, or -1 if the value is unknown. + */ +DLLEXPORT int tj3Get(tjhandle handle, int param); + + +/** + * Compress an 8-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into + * an 8-bit-per-sample JPEG image. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a packed-pixel RGB, grayscale, + * or CMYK source image to be compressed. This buffer should normally be + * `pitch * height` samples in size. However, you can also use this parameter + * to compress from a specific region of a larger buffer. + * + * @param width width (in pixels) of the source image + * + * @param pitch samples per row in the source image. Normally this should be + * width * #tjPixelSize[pixelFormat], if the image is unpadded. + * (Setting this parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat].) However, you can also use this + * parameter to specify the row alignment/padding of the source image, to skip + * rows, or to compress from a specific region of a larger buffer. + * + * @param height height (in pixels) of the source image + * + * @param pixelFormat pixel format of the source image (see @ref TJPF + * "Pixel formats".) + * + * @param jpegBuf address of a pointer to a byte buffer that will receive the + * JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to + * accommodate the size of the JPEG image. Thus, you can choose to: + * -# pre-allocate the JPEG buffer with an arbitrary size using #tj3Alloc() and + * let TurboJPEG grow the buffer as needed, + * -# set `*jpegBuf` to NULL to tell TurboJPEG to allocate the buffer for you, + * or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize(). This should ensure that the buffer never has to be + * re-allocated. (Setting #TJPARAM_NOREALLOC guarantees that it won't be.) + * . + * If you choose option 1, then `*jpegSize` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `*jpegBuf` upon return from this function, as it may + * have changed. + * + * @param jpegSize pointer to a size_t variable that holds the size of the JPEG + * buffer. If `*jpegBuf` points to a pre-allocated buffer, then `*jpegSize` + * should be set to the size of the buffer. Upon return, `*jpegSize` will + * contain the size of the JPEG image (in bytes.) If `*jpegBuf` points to a + * JPEG buffer that is being reused from a previous call to one of the JPEG + * compression functions, then `*jpegSize` is ignored. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3Compress8(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, size_t *jpegSize); + +/** + * Compress a 12-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into + * a 12-bit-per-sample JPEG image. + * + * \details \copydetails tj3Compress8() + */ +DLLEXPORT int tj3Compress12(tjhandle handle, const short *srcBuf, int width, + int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, size_t *jpegSize); + +/** + * Compress a 16-bit-per-sample packed-pixel RGB, grayscale, or CMYK image into + * a 16-bit-per-sample lossless JPEG image. + * + * \details \copydetails tj3Compress8() + */ +DLLEXPORT int tj3Compress16(tjhandle handle, const unsigned short *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, size_t *jpegSize); + + +/** + * Compress an 8-bit-per-sample unified planar YUV image into an + * 8-bit-per-sample JPEG image. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a unified planar YUV source + * image to be compressed. The size of this buffer should match the value + * returned by #tj3YUVBufSize() for the given image width, height, row + * alignment, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) The + * Y, U (Cb), and V (Cr) image planes should be stored sequentially in the + * buffer. (Refer to @ref YUVnotes "YUV Image Format Notes".) + * + * @param width width (in pixels) of the source image. If the width is not an + * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate + * buffer copy will be performed. + * + * @param align row alignment (in bytes) of the source image (must be a power + * of 2.) Setting this parameter to n indicates that each row in each plane of + * the source image is padded to the nearest multiple of n bytes + * (1 = unpadded.) + * + * @param height height (in pixels) of the source image. If the height is not + * an even multiple of the MCU block height (see #tjMCUHeight), then an + * intermediate buffer copy will be performed. + * + * @param jpegBuf address of a pointer to a byte buffer that will receive the + * JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to + * accommodate the size of the JPEG image. Thus, you can choose to: + * -# pre-allocate the JPEG buffer with an arbitrary size using #tj3Alloc() and + * let TurboJPEG grow the buffer as needed, + * -# set `*jpegBuf` to NULL to tell TurboJPEG to allocate the buffer for you, + * or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize(). This should ensure that the buffer never has to be + * re-allocated. (Setting #TJPARAM_NOREALLOC guarantees that it won't be.) + * . + * If you choose option 1, then `*jpegSize` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `*jpegBuf` upon return from this function, as it may + * have changed. + * + * @param jpegSize pointer to a size_t variable that holds the size of the JPEG + * buffer. If `*jpegBuf` points to a pre-allocated buffer, then `*jpegSize` + * should be set to the size of the buffer. Upon return, `*jpegSize` will + * contain the size of the JPEG image (in bytes.) If `*jpegBuf` points to a + * JPEG buffer that is being reused from a previous call to one of the JPEG + * compression functions, then `*jpegSize` is ignored. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3CompressFromYUV8(tjhandle handle, + const unsigned char *srcBuf, int width, + int align, int height, + unsigned char **jpegBuf, size_t *jpegSize); + + +/** + * Compress a set of 8-bit-per-sample Y, U (Cb), and V (Cr) image planes into + * an 8-bit-per-sample JPEG image. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if compressing a grayscale image) that contain a YUV + * source image to be compressed. These planes can be contiguous or + * non-contiguous in memory. The size of each plane should match the value + * returned by #tj3YUVPlaneSize() for the given image width, height, strides, + * and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) Refer to + * @ref YUVnotes "YUV Image Format Notes" for more details. + * + * @param width width (in pixels) of the source image. If the width is not an + * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate + * buffer copy will be performed. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV source image. Setting the stride + * for any plane to 0 is the same as setting it to the plane width (see + * @ref YUVnotes "YUV Image Format Notes".) If `strides` is NULL, then the + * strides for all planes will be set to their respective plane widths. You + * can adjust the strides in order to specify an arbitrary amount of row + * padding in each plane or to create a JPEG image from a subregion of a larger + * planar YUV image. + * + * @param height height (in pixels) of the source image. If the height is not + * an even multiple of the MCU block height (see #tjMCUHeight), then an + * intermediate buffer copy will be performed. + * + * @param jpegBuf address of a pointer to a byte buffer that will receive the + * JPEG image. TurboJPEG has the ability to reallocate the JPEG buffer to + * accommodate the size of the JPEG image. Thus, you can choose to: + * -# pre-allocate the JPEG buffer with an arbitrary size using #tj3Alloc() and + * let TurboJPEG grow the buffer as needed, + * -# set `*jpegBuf` to NULL to tell TurboJPEG to allocate the buffer for you, + * or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize(). This should ensure that the buffer never has to be + * re-allocated. (Setting #TJPARAM_NOREALLOC guarantees that it won't be.) + * . + * If you choose option 1, then `*jpegSize` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `*jpegBuf` upon return from this function, as it may + * have changed. + * + * @param jpegSize pointer to a size_t variable that holds the size of the JPEG + * buffer. If `*jpegBuf` points to a pre-allocated buffer, then `*jpegSize` + * should be set to the size of the buffer. Upon return, `*jpegSize` will + * contain the size of the JPEG image (in bytes.) If `*jpegBuf` points to a + * JPEG buffer that is being reused from a previous call to one of the JPEG + * compression functions, then `*jpegSize` is ignored. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3CompressFromYUVPlanes8(tjhandle handle, + const unsigned char * const *srcPlanes, + int width, const int *strides, + int height, unsigned char **jpegBuf, + size_t *jpegSize); + + +/** + * The maximum size of the buffer (in bytes) required to hold a JPEG image with + * the given parameters. The number of bytes returned by this function is + * larger than the size of the uncompressed source image. The reason for this + * is that the JPEG format uses 16-bit coefficients, so it is possible for a + * very high-quality source image with very high-frequency content to expand + * rather than compress when converted to the JPEG format. Such images + * represent very rare corner cases, but since there is no way to predict the + * size of a JPEG image prior to compression, the corner cases have to be + * handled. + * + * @param width width (in pixels) of the image + * + * @param height height (in pixels) of the image + * + * @param jpegSubsamp the level of chrominance subsampling to be used when + * generating the JPEG image (see @ref TJSAMP + * "Chrominance subsampling options".) #TJSAMP_UNKNOWN is treated like + * #TJSAMP_444, since a buffer large enough to hold a JPEG image with no + * subsampling should also be large enough to hold a JPEG image with an + * arbitrary level of subsampling. Note that lossless JPEG images always + * use #TJSAMP_444. + * + * @return the maximum size of the buffer (in bytes) required to hold the + * image, or 0 if the arguments are out of bounds. + */ +DLLEXPORT size_t tj3JPEGBufSize(int width, int height, int jpegSubsamp); + + +/** + * The size of the buffer (in bytes) required to hold a unified planar YUV + * image with the given parameters. + * + * @param width width (in pixels) of the image + * + * @param align row alignment (in bytes) of the image (must be a power of 2.) + * Setting this parameter to n specifies that each row in each plane of the + * image will be padded to the nearest multiple of n bytes (1 = unpadded.) + * + * @param height height (in pixels) of the image + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the size of the buffer (in bytes) required to hold the image, or 0 + * if the arguments are out of bounds. + */ +DLLEXPORT size_t tj3YUVBufSize(int width, int align, int height, int subsamp); + + +/** + * The size of the buffer (in bytes) required to hold a YUV image plane with + * the given parameters. + * + * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr) + * + * @param width width (in pixels) of the YUV image. NOTE: this is the width of + * the whole image, not the plane width. + * + * @param stride bytes per row in the image plane. Setting this to 0 is the + * equivalent of setting it to the plane width. + * + * @param height height (in pixels) of the YUV image. NOTE: this is the height + * of the whole image, not the plane height. + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the size of the buffer (in bytes) required to hold the YUV image + * plane, or 0 if the arguments are out of bounds. + */ +DLLEXPORT size_t tj3YUVPlaneSize(int componentID, int width, int stride, + int height, int subsamp); + + +/** + * The plane width of a YUV image plane with the given parameters. Refer to + * @ref YUVnotes "YUV Image Format Notes" for a description of plane width. + * + * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr) + * + * @param width width (in pixels) of the YUV image + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the plane width of a YUV image plane with the given parameters, or 0 + * if the arguments are out of bounds. + */ +DLLEXPORT int tj3YUVPlaneWidth(int componentID, int width, int subsamp); + + +/** + * The plane height of a YUV image plane with the given parameters. Refer to + * @ref YUVnotes "YUV Image Format Notes" for a description of plane height. + * + * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr) + * + * @param height height (in pixels) of the YUV image + * + * @param subsamp level of chrominance subsampling in the image (see + * @ref TJSAMP "Chrominance subsampling options".) + * + * @return the plane height of a YUV image plane with the given parameters, or + * 0 if the arguments are out of bounds. + */ +DLLEXPORT int tj3YUVPlaneHeight(int componentID, int height, int subsamp); + + +/** + * Encode an 8-bit-per-sample packed-pixel RGB or grayscale image into an + * 8-bit-per-sample unified planar YUV image. This function performs color + * conversion (which is accelerated in the libjpeg-turbo implementation) but + * does not execute any of the other steps in the JPEG compression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a packed-pixel RGB or grayscale + * source image to be encoded. This buffer should normally be `pitch * height` + * bytes in size. However, you can also use this parameter to encode from a + * specific region of a larger buffer. + * + * @param width width (in pixels) of the source image + * + * @param pitch bytes per row in the source image. Normally this should be + * width * #tjPixelSize[pixelFormat], if the image is unpadded. + * (Setting this parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat].) However, you can also use this + * parameter to specify the row alignment/padding of the source image, to skip + * rows, or to encode from a specific region of a larger packed-pixel image. + * + * @param height height (in pixels) of the source image + * + * @param pixelFormat pixel format of the source image (see @ref TJPF + * "Pixel formats".) + * + * @param dstBuf pointer to a buffer that will receive the unified planar YUV + * image. Use #tj3YUVBufSize() to determine the appropriate size for this + * buffer based on the image width, height, row alignment, and level of + * chrominance subsampling (see #TJPARAM_SUBSAMP.) The Y, U (Cb), and V (Cr) + * image planes will be stored sequentially in the buffer. (Refer to + * @ref YUVnotes "YUV Image Format Notes".) + * + * @param align row alignment (in bytes) of the YUV image (must be a power of + * 2.) Setting this parameter to n will cause each row in each plane of the + * YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.) + * To generate images suitable for X Video, `align` should be set to 4. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3EncodeYUV8(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char *dstBuf, int align); + + +/** + * Encode an 8-bit-per-sample packed-pixel RGB or grayscale image into separate + * 8-bit-per-sample Y, U (Cb), and V (Cr) image planes. This function performs + * color conversion (which is accelerated in the libjpeg-turbo implementation) + * but does not execute any of the other steps in the JPEG compression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * compression + * + * @param srcBuf pointer to a buffer containing a packed-pixel RGB or grayscale + * source image to be encoded. This buffer should normally be `pitch * height` + * bytes in size. However, you can also use this parameter to encode from a + * specific region of a larger buffer. + * + * + * @param width width (in pixels) of the source image + * + * @param pitch bytes per row in the source image. Normally this should be + * width * #tjPixelSize[pixelFormat], if the image is unpadded. + * (Setting this parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat].) However, you can also use this + * parameter to specify the row alignment/padding of the source image, to skip + * rows, or to encode from a specific region of a larger packed-pixel image. + * + * @param height height (in pixels) of the source image + * + * @param pixelFormat pixel format of the source image (see @ref TJPF + * "Pixel formats".) + * + * @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if generating a grayscale image) that will receive the + * encoded image. These planes can be contiguous or non-contiguous in memory. + * Use #tj3YUVPlaneSize() to determine the appropriate size for each plane + * based on the image width, height, strides, and level of chrominance + * subsampling (see #TJPARAM_SUBSAMP.) Refer to @ref YUVnotes + * "YUV Image Format Notes" for more details. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV image. Setting the stride for any + * plane to 0 is the same as setting it to the plane width (see @ref YUVnotes + * "YUV Image Format Notes".) If `strides` is NULL, then the strides for all + * planes will be set to their respective plane widths. You can adjust the + * strides in order to add an arbitrary amount of row padding to each plane or + * to encode an RGB or grayscale image into a subregion of a larger planar YUV + * image. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3EncodeYUVPlanes8(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, + int pixelFormat, unsigned char **dstPlanes, + int *strides); + + +/** + * Retrieve information about a JPEG image without decompressing it, or prime + * the decompressor with quantization and Huffman tables. If a JPEG image is + * passed to this function, then the @ref TJPARAM "parameters" that describe + * the JPEG image will be set when the function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing a JPEG image or an + * "abbreviated table specification" (AKA "tables-only") datastream. Passing a + * tables-only datastream to this function primes the decompressor with + * quantization and Huffman tables that can be used when decompressing + * subsequent "abbreviated image" datastreams. This is useful, for instance, + * when decompressing video streams in which all frames share the same + * quantization and Huffman tables. + * + * @param jpegSize size of the JPEG image or tables-only datastream (in bytes) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecompressHeader(tjhandle handle, + const unsigned char *jpegBuf, + size_t jpegSize); + + +/** + * Returns a list of fractional scaling factors that the JPEG decompressor + * supports. + * + * @param numScalingFactors pointer to an integer variable that will receive + * the number of elements in the list + * + * @return a pointer to a list of fractional scaling factors, or NULL if an + * error is encountered (see #tj3GetErrorStr().) + */ +DLLEXPORT tjscalingfactor *tj3GetScalingFactors(int *numScalingFactors); + + +/** + * Set the scaling factor for subsequent lossy decompression operations. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param scalingFactor #tjscalingfactor structure that specifies a fractional + * scaling factor that the decompressor supports (see #tj3GetScalingFactors()), + * or #TJUNSCALED for no scaling. Decompression scaling is a function + * of the IDCT algorithm, so scaling factors are generally limited to multiples + * of 1/8. If the entire JPEG image will be decompressed, then the width and + * height of the scaled destination image can be determined by calling + * #TJSCALED() with the JPEG width and height (see #TJPARAM_JPEGWIDTH and + * #TJPARAM_JPEGHEIGHT) and the specified scaling factor. When decompressing + * into a planar YUV image, an intermediate buffer copy will be performed if + * the width or height of the scaled destination image is not an even multiple + * of the MCU block size (see #tjMCUWidth and #tjMCUHeight.) Note that + * decompression scaling is not available (and the specified scaling factor is + * ignored) when decompressing lossless JPEG images (see #TJPARAM_LOSSLESS), + * since the IDCT algorithm is not used with those images. Note also that + * #TJPARAM_FASTDCT is ignored when decompression scaling is enabled. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3SetScalingFactor(tjhandle handle, + tjscalingfactor scalingFactor); + + +/** + * Set the cropping region for partially decompressing a lossy JPEG image into + * a packed-pixel image + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param croppingRegion #tjregion structure that specifies a subregion of the + * JPEG image to decompress, or #TJUNCROPPED for no cropping. The + * left boundary of the cropping region must be evenly divisible by the scaled + * MCU block width (#TJSCALED(#tjMCUWidth[subsamp], scalingFactor), + * where `subsamp` is the level of chrominance subsampling in the JPEG image + * (see #TJPARAM_SUBSAMP) and `scalingFactor` is the decompression scaling + * factor (see #tj3SetScalingFactor().) The cropping region should be + * specified relative to the scaled image dimensions. Unless `croppingRegion` + * is #TJUNCROPPED, the JPEG header must be read (see + * #tj3DecompressHeader()) prior to calling this function. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3SetCroppingRegion(tjhandle handle, tjregion croppingRegion); + + +/** + * Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample + * packed-pixel RGB, grayscale, or CMYK image. The @ref TJPARAM "parameters" + * that describe the JPEG image will be set when this function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing the JPEG image to + * decompress + * + * @param jpegSize size of the JPEG image (in bytes) + * + * @param dstBuf pointer to a buffer that will receive the packed-pixel + * decompressed image. This buffer should normally be + * `pitch * destinationHeight` samples in size. However, you can also use this + * parameter to decompress into a specific region of a larger buffer. NOTE: + * If the JPEG image is lossy, then `destinationHeight` is either the scaled + * JPEG height (see #TJSCALED(), #TJPARAM_JPEGHEIGHT, and + * #tj3SetScalingFactor()) or the height of the cropping region (see + * #tj3SetCroppingRegion().) If the JPEG image is lossless, then + * `destinationHeight` is the JPEG height. + * + * @param pitch samples per row in the destination image. Normally this should + * be set to destinationWidth * #tjPixelSize[pixelFormat], if the + * destination image should be unpadded. (Setting this parameter to 0 is the + * equivalent of setting it to + * destinationWidth * #tjPixelSize[pixelFormat].) However, you can + * also use this parameter to specify the row alignment/padding of the + * destination image, to skip rows, or to decompress into a specific region of + * a larger buffer. NOTE: If the JPEG image is lossy, then `destinationWidth` + * is either the scaled JPEG width (see #TJSCALED(), #TJPARAM_JPEGWIDTH, and + * #tj3SetScalingFactor()) or the width of the cropping region (see + * #tj3SetCroppingRegion().) If the JPEG image is lossless, then + * `destinationWidth` is the JPEG width. + * + * @param pixelFormat pixel format of the destination image (see @ref + * TJPF "Pixel formats".) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3Decompress8(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, unsigned char *dstBuf, int pitch, + int pixelFormat); + +/** + * Decompress a 12-bit-per-sample JPEG image into a 12-bit-per-sample + * packed-pixel RGB, grayscale, or CMYK image. + * + * \details \copydetails tj3Decompress8() + */ +DLLEXPORT int tj3Decompress12(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, short *dstBuf, int pitch, + int pixelFormat); + +/** + * Decompress a 16-bit-per-sample lossless JPEG image into a 16-bit-per-sample + * packed-pixel RGB, grayscale, or CMYK image. + * + * \details \copydetails tj3Decompress8() + */ +DLLEXPORT int tj3Decompress16(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, unsigned short *dstBuf, + int pitch, int pixelFormat); + + +/** + * Decompress an 8-bit-per-sample JPEG image into an 8-bit-per-sample unified + * planar YUV image. This function performs JPEG decompression but leaves out + * the color conversion step, so a planar YUV image is generated instead of a + * packed-pixel image. The @ref TJPARAM "parameters" that describe the JPEG + * image will be set when this function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing the JPEG image to + * decompress + * + * @param jpegSize size of the JPEG image (in bytes) + * + * @param dstBuf pointer to a buffer that will receive the unified planar YUV + * decompressed image. Use #tj3YUVBufSize() to determine the appropriate size + * for this buffer based on the scaled JPEG width and height (see #TJSCALED(), + * #TJPARAM_JPEGWIDTH, #TJPARAM_JPEGHEIGHT, and #tj3SetScalingFactor()), row + * alignment, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) The + * Y, U (Cb), and V (Cr) image planes will be stored sequentially in the + * buffer. (Refer to @ref YUVnotes "YUV Image Format Notes".) + * + * @param align row alignment (in bytes) of the YUV image (must be a power of + * 2.) Setting this parameter to n will cause each row in each plane of the + * YUV image to be padded to the nearest multiple of n bytes (1 = unpadded.) + * To generate images suitable for X Video, `align` should be set to 4. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecompressToYUV8(tjhandle handle, + const unsigned char *jpegBuf, + size_t jpegSize, + unsigned char *dstBuf, int align); + + +/** + * Decompress an 8-bit-per-sample JPEG image into separate 8-bit-per-sample Y, + * U (Cb), and V (Cr) image planes. This function performs JPEG decompression + * but leaves out the color conversion step, so a planar YUV image is generated + * instead of a packed-pixel image. The @ref TJPARAM "parameters" that + * describe the JPEG image will be set when this function returns. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param jpegBuf pointer to a byte buffer containing the JPEG image to + * decompress + * + * @param jpegSize size of the JPEG image (in bytes) + * + * @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if decompressing a grayscale image) that will receive + * the decompressed image. These planes can be contiguous or non-contiguous in + * memory. Use #tj3YUVPlaneSize() to determine the appropriate size for each + * plane based on the scaled JPEG width and height (see #TJSCALED(), + * #TJPARAM_JPEGWIDTH, #TJPARAM_JPEGHEIGHT, and #tj3SetScalingFactor()), + * strides, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) Refer + * to @ref YUVnotes "YUV Image Format Notes" for more details. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV image. Setting the stride for any + * plane to 0 is the same as setting it to the scaled plane width (see + * @ref YUVnotes "YUV Image Format Notes".) If `strides` is NULL, then the + * strides for all planes will be set to their respective scaled plane widths. + * You can adjust the strides in order to add an arbitrary amount of row + * padding to each plane or to decompress the JPEG image into a subregion of a + * larger planar YUV image. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecompressToYUVPlanes8(tjhandle handle, + const unsigned char *jpegBuf, + size_t jpegSize, + unsigned char **dstPlanes, + int *strides); + + +/** + * Decode an 8-bit-per-sample unified planar YUV image into an 8-bit-per-sample + * packed-pixel RGB or grayscale image. This function performs color + * conversion (which is accelerated in the libjpeg-turbo implementation) but + * does not execute any of the other steps in the JPEG decompression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param srcBuf pointer to a buffer containing a unified planar YUV source + * image to be decoded. The size of this buffer should match the value + * returned by #tj3YUVBufSize() for the given image width, height, row + * alignment, and level of chrominance subsampling (see #TJPARAM_SUBSAMP.) The + * Y, U (Cb), and V (Cr) image planes should be stored sequentially in the + * source buffer. (Refer to @ref YUVnotes "YUV Image Format Notes".) + * + * @param align row alignment (in bytes) of the YUV source image (must be a + * power of 2.) Setting this parameter to n indicates that each row in each + * plane of the YUV source image is padded to the nearest multiple of n bytes + * (1 = unpadded.) + * + * @param dstBuf pointer to a buffer that will receive the packed-pixel decoded + * image. This buffer should normally be `pitch * height` bytes in size. + * However, you can also use this parameter to decode into a specific region of + * a larger buffer. + * + * @param width width (in pixels) of the source and destination images + * + * @param pitch bytes per row in the destination image. Normally this should + * be set to width * #tjPixelSize[pixelFormat], if the destination + * image should be unpadded. (Setting this parameter to 0 is the equivalent of + * setting it to width * #tjPixelSize[pixelFormat].) However, you can + * also use this parameter to specify the row alignment/padding of the + * destination image, to skip rows, or to decode into a specific region of a + * larger buffer. + * + * @param height height (in pixels) of the source and destination images + * + * @param pixelFormat pixel format of the destination image (see @ref TJPF + * "Pixel formats".) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecodeYUV8(tjhandle handle, const unsigned char *srcBuf, + int align, unsigned char *dstBuf, int width, + int pitch, int height, int pixelFormat); + + +/** + * Decode a set of 8-bit-per-sample Y, U (Cb), and V (Cr) image planes into an + * 8-bit-per-sample packed-pixel RGB or grayscale image. This function + * performs color conversion (which is accelerated in the libjpeg-turbo + * implementation) but does not execute any of the other steps in the JPEG + * decompression process. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * decompression + * + * @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes + * (or just a Y plane, if decoding a grayscale image) that contain a YUV image + * to be decoded. These planes can be contiguous or non-contiguous in memory. + * The size of each plane should match the value returned by #tj3YUVPlaneSize() + * for the given image width, height, strides, and level of chrominance + * subsampling (see #TJPARAM_SUBSAMP.) Refer to @ref YUVnotes + * "YUV Image Format Notes" for more details. + * + * @param strides an array of integers, each specifying the number of bytes per + * row in the corresponding plane of the YUV source image. Setting the stride + * for any plane to 0 is the same as setting it to the plane width (see + * @ref YUVnotes "YUV Image Format Notes".) If `strides` is NULL, then the + * strides for all planes will be set to their respective plane widths. You + * can adjust the strides in order to specify an arbitrary amount of row + * padding in each plane or to decode a subregion of a larger planar YUV image. + * + * @param dstBuf pointer to a buffer that will receive the packed-pixel decoded + * image. This buffer should normally be `pitch * height` bytes in size. + * However, you can also use this parameter to decode into a specific region of + * a larger buffer. + * + * @param width width (in pixels) of the source and destination images + * + * @param pitch bytes per row in the destination image. Normally this should + * be set to width * #tjPixelSize[pixelFormat], if the destination + * image should be unpadded. (Setting this parameter to 0 is the equivalent of + * setting it to width * #tjPixelSize[pixelFormat].) However, you can + * also use this parameter to specify the row alignment/padding of the + * destination image, to skip rows, or to decode into a specific region of a + * larger buffer. + * + * @param height height (in pixels) of the source and destination images + * + * @param pixelFormat pixel format of the destination image (see @ref TJPF + * "Pixel formats".) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3DecodeYUVPlanes8(tjhandle handle, + const unsigned char * const *srcPlanes, + const int *strides, unsigned char *dstBuf, + int width, int pitch, int height, + int pixelFormat); + + +/** + * Losslessly transform a JPEG image into another JPEG image. Lossless + * transforms work by moving the raw DCT coefficients from one JPEG image + * structure to another without altering the values of the coefficients. While + * this is typically faster than decompressing the image, transforming it, and + * re-compressing it, lossless transforms are not free. Each lossless + * transform requires reading and performing entropy decoding on all of the + * coefficients in the source image, regardless of the size of the destination + * image. Thus, this function provides a means of generating multiple + * transformed images from the same source or applying multiple transformations + * simultaneously, in order to eliminate the need to read the source + * coefficients multiple times. + * + * @param handle handle to a TurboJPEG instance that has been initialized for + * lossless transformation + * + * @param jpegBuf pointer to a byte buffer containing the JPEG source image to + * transform + * + * @param jpegSize size of the JPEG source image (in bytes) + * + * @param n the number of transformed JPEG images to generate + * + * @param dstBufs pointer to an array of n byte buffers. `dstBufs[i]` will + * receive a JPEG image that has been transformed using the parameters in + * `transforms[i]`. TurboJPEG has the ability to reallocate the JPEG + * destination buffer to accommodate the size of the transformed JPEG image. + * Thus, you can choose to: + * -# pre-allocate the JPEG destination buffer with an arbitrary size using + * #tj3Alloc() and let TurboJPEG grow the buffer as needed, + * -# set `dstBufs[i]` to NULL to tell TurboJPEG to allocate the buffer for + * you, or + * -# pre-allocate the buffer to a "worst case" size determined by calling + * #tj3JPEGBufSize() with the transformed or cropped width and height and the + * level of subsampling used in the source image. Under normal circumstances, + * this should ensure that the buffer never has to be re-allocated. (Setting + * #TJPARAM_NOREALLOC guarantees that it won't be.) Note, however, that there + * are some rare cases (such as transforming images with a large amount of + * embedded EXIF or ICC profile data) in which the transformed JPEG image will + * be larger than the worst-case size, and #TJPARAM_NOREALLOC cannot be used in + * those cases. + * . + * If you choose option 1, then `dstSizes[i]` should be set to the size of your + * pre-allocated buffer. In any case, unless you have set #TJPARAM_NOREALLOC, + * you should always check `dstBufs[i]` upon return from this function, as it + * may have changed. + * + * @param dstSizes pointer to an array of n size_t variables that will receive + * the actual sizes (in bytes) of each transformed JPEG image. If `dstBufs[i]` + * points to a pre-allocated buffer, then `dstSizes[i]` should be set to the + * size of the buffer. Upon return, `dstSizes[i]` will contain the size of the + * transformed JPEG image (in bytes.) + * + * @param transforms pointer to an array of n #tjtransform structures, each of + * which specifies the transform parameters and/or cropping region for the + * corresponding transformed JPEG image. + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr() + * and #tj3GetErrorCode().) + */ +DLLEXPORT int tj3Transform(tjhandle handle, const unsigned char *jpegBuf, + size_t jpegSize, int n, unsigned char **dstBufs, + size_t *dstSizes, const tjtransform *transforms); + + +/** + * Destroy a TurboJPEG instance. + * + * @param handle handle to a TurboJPEG instance. If the handle is NULL, then + * this function has no effect. + */ +DLLEXPORT void tj3Destroy(tjhandle handle); + + +/** + * Allocate a byte buffer for use with TurboJPEG. You should always use this + * function to allocate the JPEG destination buffer(s) for the compression and + * transform functions unless you are disabling automatic buffer (re)allocation + * (by setting #TJPARAM_NOREALLOC.) + * + * @param bytes the number of bytes to allocate + * + * @return a pointer to a newly-allocated buffer with the specified number of + * bytes. + * + * @see tj3Free() + */ +DLLEXPORT void *tj3Alloc(size_t bytes); + + +/** + * Load an 8-bit-per-sample packed-pixel image from disk into memory. + * + * @param handle handle to a TurboJPEG instance + * + * @param filename name of a file containing a packed-pixel image in Windows + * BMP or PBMPLUS (PPM/PGM) format. Windows BMP files require 8-bit-per-sample + * data precision. If the data precision of the PBMPLUS file does not match + * the target data precision, then upconverting or downconverting will be + * performed. + * + * @param width pointer to an integer variable that will receive the width (in + * pixels) of the packed-pixel image + * + * @param align row alignment (in samples) of the packed-pixel buffer to be + * returned (must be a power of 2.) Setting this parameter to n will cause all + * rows in the buffer to be padded to the nearest multiple of n samples + * (1 = unpadded.) + * + * @param height pointer to an integer variable that will receive the height + * (in pixels) of the packed-pixel image + * + * @param pixelFormat pointer to an integer variable that specifies or will + * receive the pixel format of the packed-pixel buffer. The behavior of this + * function will vary depending on the value of `*pixelFormat` passed to the + * function: + * - @ref TJPF_UNKNOWN : The packed-pixel buffer returned by this function will + * use the most optimal pixel format for the file type, and `*pixelFormat` will + * contain the ID of that pixel format upon successful return from this + * function. + * - @ref TJPF_GRAY : Only PGM files and 8-bit-per-pixel BMP files with a + * grayscale colormap can be loaded. + * - @ref TJPF_CMYK : The RGB or grayscale pixels stored in the file will be + * converted using a quick & dirty algorithm that is suitable only for testing + * purposes. (Proper conversion between CMYK and other formats requires a + * color management system.) + * - Other @ref TJPF "pixel formats" : The packed-pixel buffer will use the + * specified pixel format, and pixel format conversion will be performed if + * necessary. + * + * @return a pointer to a newly-allocated buffer containing the packed-pixel + * image, converted to the chosen pixel format and with the chosen row + * alignment, or NULL if an error occurred (see #tj3GetErrorStr().) This + * buffer should be freed using #tj3Free(). + */ +DLLEXPORT unsigned char *tj3LoadImage8(tjhandle handle, const char *filename, + int *width, int align, int *height, + int *pixelFormat); + +/** + * Load a 12-bit-per-sample packed-pixel image from disk into memory. + * + * \details \copydetails tj3LoadImage8() + */ +DLLEXPORT short *tj3LoadImage12(tjhandle handle, const char *filename, + int *width, int align, int *height, + int *pixelFormat); + +/** + * Load a 16-bit-per-sample packed-pixel image from disk into memory. + * + * \details \copydetails tj3LoadImage8() + */ +DLLEXPORT unsigned short *tj3LoadImage16(tjhandle handle, const char *filename, + int *width, int align, int *height, + int *pixelFormat); + + +/** + * Save an 8-bit-per-sample packed-pixel image from memory to disk. + * + * @param handle handle to a TurboJPEG instance + * + * @param filename name of a file to which to save the packed-pixel image. The + * image will be stored in Windows BMP or PBMPLUS (PPM/PGM) format, depending + * on the file extension. Windows BMP files require 8-bit-per-sample data + * precision. + * + * @param buffer pointer to a buffer containing a packed-pixel RGB, grayscale, + * or CMYK image to be saved + * + * @param width width (in pixels) of the packed-pixel image + * + * @param pitch samples per row in the packed-pixel image. Setting this + * parameter to 0 is the equivalent of setting it to + * width * #tjPixelSize[pixelFormat]. + * + * @param height height (in pixels) of the packed-pixel image + * + * @param pixelFormat pixel format of the packed-pixel image (see @ref TJPF + * "Pixel formats".) If this parameter is set to @ref TJPF_GRAY, then the + * image will be stored in PGM or 8-bit-per-pixel (indexed color) BMP format. + * Otherwise, the image will be stored in PPM or 24-bit-per-pixel BMP format. + * If this parameter is set to @ref TJPF_CMYK, then the CMYK pixels will be + * converted to RGB using a quick & dirty algorithm that is suitable only for + * testing purposes. (Proper conversion between CMYK and other formats + * requires a color management system.) + * + * @return 0 if successful, or -1 if an error occurred (see #tj3GetErrorStr().) + */ +DLLEXPORT int tj3SaveImage8(tjhandle handle, const char *filename, + const unsigned char *buffer, int width, int pitch, + int height, int pixelFormat); + +/** + * Save a 12-bit-per-sample packed-pixel image from memory to disk. + * + * \details \copydetails tj3SaveImage8() + */ +DLLEXPORT int tj3SaveImage12(tjhandle handle, const char *filename, + const short *buffer, int width, int pitch, + int height, int pixelFormat); + +/** + * Save a 16-bit-per-sample packed-pixel image from memory to disk. + * + * \details \copydetails tj3SaveImage8() + */ +DLLEXPORT int tj3SaveImage16(tjhandle handle, const char *filename, + const unsigned short *buffer, int width, + int pitch, int height, int pixelFormat); + + +/** + * Free a byte buffer previously allocated by TurboJPEG. You should always use + * this function to free JPEG destination buffer(s) that were automatically + * (re)allocated by the compression and transform functions or that were + * manually allocated using #tj3Alloc(). + * + * @param buffer address of the buffer to free. If the address is NULL, then + * this function has no effect. + * + * @see tj3Alloc() + */ +DLLEXPORT void tj3Free(void *buffer); + + +/** + * Returns a descriptive error message explaining why the last command failed. + * + * @param handle handle to a TurboJPEG instance, or NULL if the error was + * generated by a global function (but note that retrieving the error message + * for a global function is thread-safe only on platforms that support + * thread-local storage.) + * + * @return a descriptive error message explaining why the last command failed. + */ +DLLEXPORT char *tj3GetErrorStr(tjhandle handle); + + +/** + * Returns a code indicating the severity of the last error. See + * @ref TJERR "Error codes". + * + * @param handle handle to a TurboJPEG instance + * + * @return a code indicating the severity of the last error. See + * @ref TJERR "Error codes". + */ +DLLEXPORT int tj3GetErrorCode(tjhandle handle); + + +/* Backward compatibility functions and macros (nothing to see here) */ + +/* TurboJPEG 1.0+ */ + +#define NUMSUBOPT TJ_NUMSAMP +#define TJ_444 TJSAMP_444 +#define TJ_422 TJSAMP_422 +#define TJ_420 TJSAMP_420 +#define TJ_411 TJSAMP_420 +#define TJ_GRAYSCALE TJSAMP_GRAY + +#define TJ_BGR 1 +#define TJ_BOTTOMUP TJFLAG_BOTTOMUP +#define TJ_FORCEMMX TJFLAG_FORCEMMX +#define TJ_FORCESSE TJFLAG_FORCESSE +#define TJ_FORCESSE2 TJFLAG_FORCESSE2 +#define TJ_ALPHAFIRST 64 +#define TJ_FORCESSE3 TJFLAG_FORCESSE3 +#define TJ_FASTUPSAMPLE TJFLAG_FASTUPSAMPLE + +#define TJPAD(width) (((width) + 3) & (~3)) + +DLLEXPORT unsigned long TJBUFSIZE(int width, int height); + +DLLEXPORT int tjCompress(tjhandle handle, unsigned char *srcBuf, int width, + int pitch, int height, int pixelSize, + unsigned char *dstBuf, unsigned long *compressedSize, + int jpegSubsamp, int jpegQual, int flags); + +DLLEXPORT int tjDecompress(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int width, int pitch, int height, int pixelSize, + int flags); + +DLLEXPORT int tjDecompressHeader(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, int *width, + int *height); + +DLLEXPORT int tjDestroy(tjhandle handle); + +DLLEXPORT char *tjGetErrorStr(void); + +DLLEXPORT tjhandle tjInitCompress(void); + +DLLEXPORT tjhandle tjInitDecompress(void); + +/* TurboJPEG 1.1+ */ + +#define TJ_YUV 512 + +DLLEXPORT unsigned long TJBUFSIZEYUV(int width, int height, int jpegSubsamp); + +DLLEXPORT int tjDecompressHeader2(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, int *width, + int *height, int *jpegSubsamp); + +DLLEXPORT int tjDecompressToYUV(tjhandle handle, unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int flags); + +DLLEXPORT int tjEncodeYUV(tjhandle handle, unsigned char *srcBuf, int width, + int pitch, int height, int pixelSize, + unsigned char *dstBuf, int subsamp, int flags); + +/* TurboJPEG 1.2+ */ + +#define TJFLAG_BOTTOMUP 2 +#define TJFLAG_FORCEMMX 8 +#define TJFLAG_FORCESSE 16 +#define TJFLAG_FORCESSE2 32 +#define TJFLAG_FORCESSE3 128 +#define TJFLAG_FASTUPSAMPLE 256 +#define TJFLAG_NOREALLOC 1024 + +DLLEXPORT unsigned char *tjAlloc(int bytes); + +DLLEXPORT unsigned long tjBufSize(int width, int height, int jpegSubsamp); + +DLLEXPORT unsigned long tjBufSizeYUV(int width, int height, int subsamp); + +DLLEXPORT int tjCompress2(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char **jpegBuf, unsigned long *jpegSize, + int jpegSubsamp, int jpegQual, int flags); + +DLLEXPORT int tjDecompress2(tjhandle handle, const unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int width, int pitch, int height, int pixelFormat, + int flags); + +DLLEXPORT int tjEncodeYUV2(tjhandle handle, unsigned char *srcBuf, int width, + int pitch, int height, int pixelFormat, + unsigned char *dstBuf, int subsamp, int flags); + +DLLEXPORT void tjFree(unsigned char *buffer); + +DLLEXPORT tjscalingfactor *tjGetScalingFactors(int *numscalingfactors); + +DLLEXPORT tjhandle tjInitTransform(void); + +DLLEXPORT int tjTransform(tjhandle handle, const unsigned char *jpegBuf, + unsigned long jpegSize, int n, + unsigned char **dstBufs, unsigned long *dstSizes, + tjtransform *transforms, int flags); + +/* TurboJPEG 1.2.1+ */ + +#define TJFLAG_FASTDCT 2048 +#define TJFLAG_ACCURATEDCT 4096 + +/* TurboJPEG 1.4+ */ + +DLLEXPORT unsigned long tjBufSizeYUV2(int width, int align, int height, + int subsamp); + +DLLEXPORT int tjCompressFromYUV(tjhandle handle, const unsigned char *srcBuf, + int width, int align, int height, int subsamp, + unsigned char **jpegBuf, + unsigned long *jpegSize, int jpegQual, + int flags); + +DLLEXPORT int tjCompressFromYUVPlanes(tjhandle handle, + const unsigned char **srcPlanes, + int width, const int *strides, + int height, int subsamp, + unsigned char **jpegBuf, + unsigned long *jpegSize, int jpegQual, + int flags); + +DLLEXPORT int tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf, + int align, int subsamp, unsigned char *dstBuf, + int width, int pitch, int height, int pixelFormat, + int flags); + +DLLEXPORT int tjDecodeYUVPlanes(tjhandle handle, + const unsigned char **srcPlanes, + const int *strides, int subsamp, + unsigned char *dstBuf, int width, int pitch, + int height, int pixelFormat, int flags); + +DLLEXPORT int tjDecompressHeader3(tjhandle handle, + const unsigned char *jpegBuf, + unsigned long jpegSize, int *width, + int *height, int *jpegSubsamp, + int *jpegColorspace); + +DLLEXPORT int tjDecompressToYUV2(tjhandle handle, const unsigned char *jpegBuf, + unsigned long jpegSize, unsigned char *dstBuf, + int width, int align, int height, int flags); + +DLLEXPORT int tjDecompressToYUVPlanes(tjhandle handle, + const unsigned char *jpegBuf, + unsigned long jpegSize, + unsigned char **dstPlanes, int width, + int *strides, int height, int flags); + +DLLEXPORT int tjEncodeYUV3(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, int pixelFormat, + unsigned char *dstBuf, int align, int subsamp, + int flags); + +DLLEXPORT int tjEncodeYUVPlanes(tjhandle handle, const unsigned char *srcBuf, + int width, int pitch, int height, + int pixelFormat, unsigned char **dstPlanes, + int *strides, int subsamp, int flags); + +DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp); + +DLLEXPORT unsigned long tjPlaneSizeYUV(int componentID, int width, int stride, + int height, int subsamp); + +DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp); + +/* TurboJPEG 2.0+ */ + +#define TJFLAG_STOPONWARNING 8192 +#define TJFLAG_PROGRESSIVE 16384 + +DLLEXPORT int tjGetErrorCode(tjhandle handle); + +DLLEXPORT char *tjGetErrorStr2(tjhandle handle); + +DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width, + int align, int *height, int *pixelFormat, + int flags); + +DLLEXPORT int tjSaveImage(const char *filename, unsigned char *buffer, + int width, int pitch, int height, int pixelFormat, + int flags); + +/* TurboJPEG 2.1+ */ + +#define TJFLAG_LIMITSCANS 32768 + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/zconf.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/zconf.h new file mode 100644 index 0000000000..622afa0714 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/zconf.h @@ -0,0 +1,547 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_combine_gen z_crc32_combine_gen +# define crc32_combine_gen64 z_crc32_combine_gen64 +# define crc32_combine_op z_crc32_combine_op +# define crc32_z z_crc32_z +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +#ifndef Z_ARG /* function prototypes for stdarg */ +# if defined(STDC) || defined(Z_HAVE_STDARG_H) +# define Z_ARG(args) args +# else +# define Z_ARG(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#if 1 /* was set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#if 1 /* was set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#ifndef Z_HAVE_UNISTD_H +# ifdef __WATCOMC__ +# define Z_HAVE_UNISTD_H +# endif +#endif +#ifndef Z_HAVE_UNISTD_H +# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) +# define Z_HAVE_UNISTD_H +# endif +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/zlib.h b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/zlib.h new file mode 100644 index 0000000000..953cb5012d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/include/zlib.h @@ -0,0 +1,1935 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.13, October 13th, 2022 + + Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 + (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). +*/ + +#ifndef ZLIB_H +#define ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.2.13" +#define ZLIB_VERNUM 0x12d0 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 2 +#define ZLIB_VER_REVISION 13 +#define ZLIB_VER_SUBREVISION 0 + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. + + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output + (providing more output space) before each call. + + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip and raw deflate streams in + memory as well. + + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in the case of corrupted input. +*/ + +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +typedef struct z_stream_s { + z_const Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total number of input bytes read so far */ + + Bytef *next_out; /* next output byte will go here */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total number of bytes output so far */ + + z_const char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: binary or text + for deflate, or the decoding state for inflate */ + uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used + when writing a gzip file) */ +} gz_header; + +typedef gz_header FAR *gz_headerp; + +/* + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. In that case, zlib is thread-safe. When zalloc and zfree are + Z_NULL on entry to the initialization function, they are set to internal + routines that use the standard library functions malloc() and free(). + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use by the decompressor (particularly + if the decompressor wants to decompress everything in a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +#define Z_BLOCK 5 +#define Z_TREES 6 +/* Allowed flush values; see deflate() and inflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_RLE 3 +#define Z_FIXED 4 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_TEXT 1 +#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ +#define Z_UNKNOWN 2 +/* Possible values of the data_type field for deflate() */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary. Some output may be provided even if + flush is zero. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. See deflatePending(), + which can be used if desired to determine whether or not there is more output + in that case. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumulate before producing output, in order to + maximize compression. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed + codes block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six to avoid repeated flush markers due to + avail_out == 0 on return. + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this + function must be called again with Z_FINISH and more output space (updated + avail_out) but no more input data, until it returns with Z_STREAM_END or an + error. After deflate has returned Z_STREAM_END, the only possible operations + on the stream are deflateReset or deflateEnd. + + Z_FINISH can be used in the first deflate call after deflateInit if all the + compression is to be done in a single step. In order to complete in one + call, avail_out must be at least the value returned by deflateBound (see + below). Then deflate is guaranteed to return Z_STREAM_END. If not enough + output space is provided, deflate will not return Z_STREAM_END, and it must + be called again as described above. + + deflate() sets strm->adler to the Adler-32 checksum of all input read + so far (that is, total_in bytes). If a gzip stream is being generated, then + strm->adler will be the CRC-32 checksum of the input read so far. (See + deflateInit2 below.) + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is + considered binary. This field is only for information purposes and does not + affect the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was Z_NULL or the state was inadvertently written over + by the application), or Z_BUF_ERROR if no progress is possible (for example + avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and + deflate() can be called again with more input and more output space to + continue compressing. +*/ + + +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to Z_NULL, inflateInit updates + them to use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression. + Actual decompression will be done by inflate(). So next_in, and avail_in, + next_out, and avail_out are unused and unchanged. The current + implementation of inflateInit() does not process any header information -- + that is deferred until inflate() is called. +*/ + + +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), then next_in and avail_in are updated + accordingly, and processing will resume at this point for the next call of + inflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. If the + caller of inflate() does not provide both available input and available + output space, it is possible that there will be no progress made. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + To assist in this, on return inflate() always sets strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all of the uncompressed data for the + operation to complete. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The use of Z_FINISH is not + required to perform an inflation in one step. However it may be used to + inform inflate that a faster approach can be used for the single inflate() + call. Z_FINISH also informs inflate to not maintain a sliding window if the + stream completes, which reduces inflate's memory footprint. If the stream + does not complete, either because not all of the stream is provided or not + enough output space is provided, then a sliding window will be allocated and + inflate() can be called again to continue the operation as if Z_NO_FLUSH had + been used. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the effects of the flush parameter in this implementation are + on the return value of inflate() as noted below, when inflate() returns early + when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of + memory for a sliding window when Z_FINISH is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the Adler-32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the Adler-32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed Adler-32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained unless inflateGetHeader() is used. When processing + gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output + produced so far. The CRC-32 is checked against the gzip trailer, as is the + uncompressed length, modulo 2^32. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect check + value, in which case strm->msg points to a string with a more specific + error), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL, or the state was inadvertently written over + by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR + if no progress was possible or if there was not enough room in the output + buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is to be attempted. +*/ + + +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state + was inconsistent. +*/ + + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields zalloc, zfree and opaque must be initialized before by the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + For the current implementation of deflate(), a windowBits value of 8 (a + window size of 256 bytes) is not supported. As a result, a request for 8 + will result in 9 (a 512-byte window). In that case, providing 8 to + inflateInit2() will result in an error when the zlib header with 9 is + checked against the initialization of inflate(). The remedy is to not use 8 + with deflateInit2() with this initialization, or at least in that case use 9 + with inflateInit2(). + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute a check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to the appropriate value, + if the operating system was determined at compile time. If a gzip stream is + being written, strm->adler is a CRC-32 instead of an Adler-32. + + For raw deflate or gzip encoding, a request for a 256-byte window is + rejected as invalid, since only the zlib header provides a means of + transmitting the window size to the decompressor. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. When using the zlib format, this + function must be called immediately after deflateInit, deflateInit2 or + deflateReset, and before any call of deflate. When doing raw deflate, this + function must be called either before any call of deflate, or immediately + after the completion of a deflate block, i.e. after all input has been + consumed and all output has been delivered when using any of the flush + options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The + compressor and decompressor must use exactly the same dictionary (see + inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. + + Upon return of this function, strm->adler is set to the Adler-32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler-32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) If a raw deflate was requested, then the + Adler-32 value is not computed and strm->adler is not set. + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if not at a block boundary for raw deflate). deflateSetDictionary does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by deflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If deflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similarly, if dictLength is Z_NULL, then it is not set. + + deflateGetDictionary() may return a length less than the window size, even + when more than the window size in input has been provided. It may return up + to 258 bytes less in that case, due to how zlib's implementation of deflate + manages the sliding window and lookahead for matches, where matches can be + up to 258 bytes long. If the application needs the last window-size bytes of + input, then that would need to be saved by the application outside of zlib. + + deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); +/* + This function is equivalent to deflateEnd followed by deflateInit, but + does not free and reallocate the internal compression state. The stream + will leave the compression level and any other attributes that may have been + set unchanged. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2(). This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different strategy. + If the compression approach (which is a function of the level) or the + strategy is changed, and if there have been any deflate() calls since the + state was initialized or reset, then the input available so far is + compressed with the old level and strategy using deflate(strm, Z_BLOCK). + There are three approaches for the compression levels 0, 1..3, and 4..9 + respectively. The new level and strategy will take effect at the next call + of deflate(). + + If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does + not have enough output space to complete, then the parameter change will not + take effect. In this case, deflateParams() can be called again with the + same parameters and more output space to try again. + + In order to assure a change in the parameters on the first try, the + deflate stream should be flushed using deflate() with Z_BLOCK or other flush + request until strm.avail_out is not zero, before calling deflateParams(). + Then no more input data should be provided before the deflateParams() call. + If this is done, the old level and strategy will be applied to the data + compressed before deflateParams(), and the new level and strategy will be + applied to the the data compressed after deflateParams(). + + deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream + state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if + there was not enough output space to complete the compression of the + available input data before a change in the strategy or approach. Note that + in the case of a Z_BUF_ERROR, the parameters are not changed. A return + value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be + retried with more output space. +*/ + +ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain)); +/* + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2(), and + returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ + +ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, + uLong sourceLen)); +/* + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). If that first deflate() call is provided the + sourceLen input bytes, an output buffer allocated to the size returned by + deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed + to return Z_STREAM_END. Note that it is possible for the compressed size to + be larger than the value returned by deflateBound() if flush options other + than Z_FINISH or Z_NO_FLUSH are used. +*/ + +ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, + unsigned *pending, + int *bits)); +/* + deflatePending() returns the number of bytes and bits of output that have + been generated, but not yet provided in the available output. The bytes not + provided would be due to the available output space having being consumed. + The number of bits of output not provided are between 0 and 7, where they + await more bits to join them in order to fill out a full byte. If pending + or bits are Z_NULL, then those values are not set. + + deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. + */ + +ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. + + deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough + room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, + gz_headerp head)); +/* + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to 255, with no extra, name, or comment + fields. The gzip header is returned to the default state by deflateReset(). + + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an Adler-32 or a CRC-32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see + below), inflate() will *not* automatically decode concatenated gzip members. + inflate() will return Z_STREAM_END at the end of the gzip member. The state + would need to be reset to continue decoding a subsequent gzip member. This + *must* be done if there is more data after a gzip member, in order for the + decompression to be compliant with the gzip standard (RFC 1952). + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler-32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called at any + time to set the dictionary. If the provided dictionary is smaller than the + window and there is already data in the window, then the provided dictionary + will amend what's there. The application must insure that the dictionary + that was used for compression is provided. + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler-32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, + Bytef *dictionary, + uInt *dictLength)); +/* + Returns the sliding dictionary being maintained by inflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If inflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similarly, if dictLength is Z_NULL, then it is not set. + + inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); +/* + Skips invalid compressed data until a possible full flush point (see above + for the description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync searches for a 00 00 FF FF pattern in the compressed data. + All full flush points have this pattern, but not all occurrences of this + pattern are full flush points. + + inflateSync returns Z_OK if a possible full flush point has been found, + Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point + has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. + In the success case, the application may save the current current value of + total_in which indicates where valid compressed data was found. In the + error case, the application may repeatedly call inflateSync, providing more + input each time, until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, + z_streamp source)); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, + int windowBits)); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. If the window size is changed, then the + memory allocated for the window is freed, and the window will be reallocated + by inflate() if needed. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. +*/ + +ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, + int bits, + int value)); +/* + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above, or -65536 if the provided + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, + gz_headerp head)); +/* + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, + unsigned char FAR *window)); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the parameters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. +*/ + +typedef unsigned (*in_func) OF((void FAR *, + z_const unsigned char FAR * FAR *)); +typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); + +ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); +/* + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is potentially more efficient than + inflate() for file i/o applications, in that it avoids copying between the + output and the sliding window by simply making the window itself the output + buffer. inflate() can be faster on modern CPUs when used with large + buffers. inflateBack() trusts the application to not change the output + buffer passed by the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the default + behavior of inflate(), which expects a zlib header and trailer around the + deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero -- buf is ignored in that + case -- and inflateBack() will return a buffer error. inflateBack() will + call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. + out() should return zero on success, or non-zero on failure. If out() + returns non-zero, inflateBack() will return with an error. Neither in() nor + out() are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. +*/ + +ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); +/* + All memory allocated by inflateBackInit() is freed. + + inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ + +ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); +/* Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: ZLIB_DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + */ + +#ifndef Z_SOLO + + /* utility functions */ + +/* + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. +*/ + +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress() is equivalent to compress2() with a level + parameter of Z_DEFAULT_COMPRESSION. + + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); +/* + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. +*/ + +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed data. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In + the case where there is not enough room, uncompress() will fill the output + buffer with the uncompressed data up to that point. +*/ + +ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen)); +/* + Same as uncompress, except that sourceLen is a pointer, where the + length of the source is *sourceLen. On return, *sourceLen is the number of + source bytes consumed. +*/ + + /* gzip file access functions */ + +/* + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + + Open the gzip (.gz) file at path for reading and decompressing, or + compressing and writing. The mode parameter is as in fopen ("rb" or "wb") + but can also include a compression level ("wb9") or a strategy: 'f' for + filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h", + 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression + as in "wb9F". (See the description of deflateInit2 for more information + about the strategy parameter.) 'T' will request transparent writing or + appending with no compression and not using the gzip format. + + "a" can be used instead of "w" to request that the gzip stream that will + be written be appended to the file. "+" will result in an error, since + reading and writing to the same gzip file is not supported. The addition of + "x" when writing will create the file exclusively, which fails if the file + already exists. On systems that support it, the addition of "e" when + reading or writing will set the flag to close the file on an execve() call. + + These functions, as well as gzip, will read and decode a sequence of gzip + streams in a file. The append function of gzopen() can be used to create + such a file. (Also see gzflush() for another way to do this.) When + appending, gzopen does not test whether the file begins with a gzip stream, + nor does it look for the end of the gzip streams to begin appending. gzopen + will simply append a gzip stream to the existing file. + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. When + reading, this will be detected automatically by looking for the magic two- + byte gzip header. + + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ + +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); +/* + Associate a gzFile with the file descriptor fd. File descriptors are + obtained from calls like open, dup, creat, pipe or fileno (if the file has + been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. If you are using fileno() to get the + file descriptor from a FILE *, then you will have to use dup() to avoid + double-close()ing the file descriptor. Both gzclose() and fclose() will + close the associated file descriptor, so they need to have different file + descriptors. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ + +ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size)); +/* + Set the internal buffer size used by this library's functions for file to + size. The default buffer size is 8192 bytes. This function must be called + after gzopen() or gzdopen(), and before any other calls that read or write + the file. The buffer memory allocation is always deferred to the first read + or write. Three times that size in buffer space is allocated. A larger + buffer size of, for example, 64K or 128K bytes will noticeably increase the + speed of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. +*/ + +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); +/* + Dynamically update the compression level and strategy for file. See the + description of deflateInit2 for the meaning of these parameters. Previously + provided data is flushed before applying the parameter changes. + + gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not + opened for writing, Z_ERRNO if there is an error writing the flushed data, + or Z_MEM_ERROR if there is a memory allocation error. +*/ + +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); +/* + Read and decompress up to len uncompressed bytes from file into buf. If + the input file is not in gzip format, gzread copies the given number of + bytes into the buffer directly from the file. + + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream. Any number of gzip streams may be + concatenated in the input file, and will all be decompressed by gzread(). + If something other than a gzip stream is encountered after a gzip stream, + that remaining trailing garbage is ignored (and no error is returned). + + gzread can be used to read a gzip file that is being concurrently written. + Upon reaching the end of the input, gzread will return with the available + data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then + gzclearerr can be used to clear the end of file indicator in order to permit + gzread to be tried again. Z_OK indicates that a gzip stream was completed + on the last gzread. Z_BUF_ERROR indicates that the input file ended in the + middle of a gzip stream. Note that gzread does not return -1 in the event + of an incomplete gzip stream. This error is deferred until gzclose(), which + will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip + stream. Alternatively, gzerror can be used before gzclose to detect this + case. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. If len is too large to fit in an int, + then nothing is read, -1 is returned, and the error state is set to + Z_STREAM_ERROR. +*/ + +ZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, + gzFile file)); +/* + Read and decompress up to nitems items of size size from file into buf, + otherwise operating as gzread() does. This duplicates the interface of + stdio's fread(), with size_t request and return types. If the library + defines size_t, then z_size_t is identical to size_t. If not, then z_size_t + is an unsigned integer type that can contain a pointer. + + gzfread() returns the number of full items read of size size, or zero if + the end of the file was reached and a full item could not be read, or if + there was an error. gzerror() must be consulted if zero is returned in + order to determine if there was an error. If the multiplication of size and + nitems overflows, i.e. the product does not fit in a z_size_t, then nothing + is read, zero is returned, and the error state is set to Z_STREAM_ERROR. + + In the event that the end of file is reached and only a partial item is + available at the end, i.e. the remaining uncompressed data length is not a + multiple of size, then the final partial item is nevertheless read into buf + and the end-of-file flag is set. The length of the partial item read is not + provided, but could be inferred from the result of gztell(). This behavior + is the same as the behavior of fread() implementations in common libraries, + but it prevents the direct use of gzfread() to read a concurrently written + file, resetting and retrying on end-of-file, when size is not 1. +*/ + +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); +/* + Compress and write the len uncompressed bytes at buf to file. gzwrite + returns the number of uncompressed bytes written or 0 in case of error. +*/ + +ZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, + z_size_t nitems, gzFile file)); +/* + Compress and write nitems items of size size from buf to file, duplicating + the interface of stdio's fwrite(), with size_t request and return types. If + the library defines size_t, then z_size_t is identical to size_t. If not, + then z_size_t is an unsigned integer type that can contain a pointer. + + gzfwrite() returns the number of full items written of size size, or zero + if there was an error. If the multiplication of size and nitems overflows, + i.e. the product does not fit in a z_size_t, then nothing is written, zero + is returned, and the error state is set to Z_STREAM_ERROR. +*/ + +ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); +/* + Convert, format, compress, and write the arguments (...) to file under + control of the string format, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or a negative zlib error code in case + of error. The number of uncompressed bytes written is limited to 8191, or + one less than the buffer size given to gzbuffer(). The caller should assure + that this limit is not exceeded. If it is exceeded, then gzprintf() will + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf(), + because the secure snprintf() or vsnprintf() functions were not available. + This can be determined using zlibCompileFlags(). +*/ + +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); +/* + Compress and write the given null-terminated string s to file, excluding + the terminating null character. + + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); +/* + Read and decompress bytes from file into buf, until len-1 characters are + read, or until a newline character is read and transferred to buf, or an + end-of-file condition is encountered. If any characters are read or if len + is one, the string is terminated with a null character. If no characters + are read due to an end-of-file or len is less than one, then the buffer is + left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. +*/ + +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); +/* + Compress and write c, converted to an unsigned char, into file. gzputc + returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); +/* + Read and decompress one byte from file. gzgetc returns this byte or -1 + in case of end of file or error. This is implemented as a macro for speed. + As such, it does not do all of the checking the other functions do. I.e. + it does not check to see if file is NULL, nor whether the structure file + points to has been clobbered or not. +*/ + +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); +/* + Push c back onto the stream for file to be read as the first character on + the next read. At least one character of push-back is always allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). +*/ + +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); +/* + Flush all pending output to file. The parameter flush is as in the + deflate() function. The return value is the zlib error number (see function + gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatenated gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + + Set the starting position to offset relative to whence for the next gzread + or gzwrite on file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); +/* + Rewind file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET). +*/ + +/* +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); + + Return the starting position for the next gzread or gzwrite on file. + This position represents a number of bytes in the uncompressed data stream, + and is zero when starting, even if appending or reading a gzip stream from + the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file)); + + Return the current compressed (actual) read or write offset of file. This + offset includes the count of bytes that precede the gzip stream, for example + when appending or when using gzdopen() for reading. When reading, the + offset does not include as yet unused buffered input. This information can + be used for a progress indicator. On error, gzoffset() returns -1. +*/ + +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); +/* + Return true (1) if the end-of-file indicator for file has been set while + reading, false (0) otherwise. Note that the end-of-file indicator is set + only if the read tried to go past the end of the input, but came up short. + Therefore, just like feof(), gzeof() may return false even if there is no + more data to read, in the event that the last read request was for the exact + number of bytes remaining in the input file. This will happen if the input + file size is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. +*/ + +ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); +/* + Return true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). + + When writing, gzdirect() returns true (1) if transparent writing was + requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: + gzdirect() is not needed when writing. Transparent writing must be + explicitly requested, so the application already knows the answer. When + linking statically, using gzdirect() will include all of the zlib code for + gzip file reading and decompression, which may not be desired.) +*/ + +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); +/* + Flush all pending output for file, if necessary, close file and + deallocate the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the + last read ended in the middle of a gzip stream, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r OF((gzFile file)); +ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. +*/ + +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); +/* + Return the error message for the last error which occurred on file. + errnum is set to zlib error number. If an error occurred in the file system + and not in the compression library, errnum is set to Z_ERRNO and the + application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. +*/ + +ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); +/* + Clear the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. +*/ + +#endif /* !Z_SOLO */ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the compression + library. +*/ + +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. An Adler-32 value is in the range of a 32-bit + unsigned integer. If buf is Z_NULL, this function returns the required + initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed + much faster. + + Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, + z_size_t len)); +/* + Same as adler32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, + z_off_t len2)); + + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note + that the z_off_t type (like off_t) is a signed integer. If len2 is + negative, the result has no meaning or utility. +*/ + +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); +/* + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. + If buf is Z_NULL, this function returns the required initial value for the + crc. Pre- and post-conditioning (one's complement) is performed within this + function so it shouldn't be done by the application. + + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32_z OF((uLong crc, const Bytef *buf, + z_size_t len)); +/* + Same as crc32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); + + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 + check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and + len2. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t len2)); + + Return the operator corresponding to length len2, to be used with + crc32_combine_op(). +*/ + +ZEXTERN uLong ZEXPORT crc32_combine_op OF((uLong crc1, uLong crc2, uLong op)); +/* + Give the same result as crc32_combine(), using op in place of len2. op is + is generated from len2 by crc32_combine_gen(). This will be faster than + crc32_combine() if the generated op is used more than once. +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); +ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size)); +#ifdef Z_PREFIX_SET +# define z_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define z_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#else +# define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#endif + +#ifndef Z_SOLO + +/* gzgetc() macro and its supporting function and exposed data structure. Note + * that the real internal state is much larger than the exposed structure. + * This abbreviated structure exposes just enough for the gzgetc() macro. The + * user should not mess with these exposed elements, since their names or + * behavior could change in the future, perhaps even capriciously. They can + * only be used by the gzgetc() macro. You have been warned. + */ +struct gzFile_s { + unsigned have; + unsigned char *next; + z_off64_t pos; +}; +ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +# define z_gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#else +# define gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#endif + +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#ifdef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); + ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off64_t)); +#endif + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) +# ifdef Z_PREFIX_SET +# define z_gzopen z_gzopen64 +# define z_gzseek z_gzseek64 +# define z_gztell z_gztell64 +# define z_gzoffset z_gzoffset64 +# define z_adler32_combine z_adler32_combine64 +# define z_crc32_combine z_crc32_combine64 +# define z_crc32_combine_gen z_crc32_combine_gen64 +# else +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# define crc32_combine_gen crc32_combine_gen64 +# endif +# ifndef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen64 OF((z_off_t)); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); + ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); +#endif + +#else /* Z_SOLO */ + + ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); + ZEXTERN uLong ZEXPORT crc32_combine_gen OF((z_off_t)); + +#endif /* !Z_SOLO */ + +/* undocumented functions */ +ZEXTERN const char * ZEXPORT zError OF((int)); +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); +ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); +ZEXTERN int ZEXPORT inflateValidate OF((z_streamp, int)); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed OF((z_streamp)); +ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); +ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); +#if defined(_WIN32) && !defined(Z_SOLO) +ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, + const char *mode)); +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, + const char *format, + va_list va)); +# endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* ZLIB_H */ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/ImageMagick-7.1.1/config-Q16/configure.xml b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/ImageMagick-7.1.1/config-Q16/configure.xml new file mode 100644 index 0000000000..19693296f1 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/ImageMagick-7.1.1/config-Q16/configure.xml @@ -0,0 +1,52 @@ + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake new file mode 100644 index 0000000000..b637f86f0d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake @@ -0,0 +1,28 @@ + +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was Config.cmake.in ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### + +include("${CMAKE_CURRENT_LIST_DIR}/libjpeg-turboTargets.cmake") +check_required_components("libjpeg-turbo") diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake new file mode 100644 index 0000000000..1a6966843f --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake @@ -0,0 +1,43 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. +# The variable CVF_VERSION must be set before calling configure_file(). + +set(PACKAGE_VERSION "3.0.3") + +if (PACKAGE_FIND_VERSION_RANGE) + # Package version must be in the requested version range + if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + endif() +else() + if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "4" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "4") + math(EXPR installedBits "4 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake new file mode 100644 index 0000000000..1aa258ec86 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake @@ -0,0 +1,49 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "libjpeg-turbo::jpeg" for configuration "Release" +set_property(TARGET libjpeg-turbo::jpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::jpeg PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libjpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::jpeg ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::jpeg "${_IMPORT_PREFIX}/lib32/libjpeg.a" ) + +# Import target "libjpeg-turbo::turbojpeg" for configuration "Release" +set_property(TARGET libjpeg-turbo::turbojpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::turbojpeg PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::turbojpeg ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::turbojpeg "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" ) + +# Import target "libjpeg-turbo::turbojpeg-static" for configuration "Release" +set_property(TARGET libjpeg-turbo::turbojpeg-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::turbojpeg-static PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::turbojpeg-static ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::turbojpeg-static "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" ) + +# Import target "libjpeg-turbo::jpeg-static" for configuration "Release" +set_property(TARGET libjpeg-turbo::jpeg-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::jpeg-static PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libjpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::jpeg-static ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::jpeg-static "${_IMPORT_PREFIX}/lib32/libjpeg.a" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake new file mode 100644 index 0000000000..bff9dda653 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake @@ -0,0 +1,123 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.26) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS libjpeg-turbo::jpeg libjpeg-turbo::turbojpeg libjpeg-turbo::turbojpeg-static libjpeg-turbo::jpeg-static) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target libjpeg-turbo::jpeg +add_library(libjpeg-turbo::jpeg STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::jpeg PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Create imported target libjpeg-turbo::turbojpeg +add_library(libjpeg-turbo::turbojpeg STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::turbojpeg PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Create imported target libjpeg-turbo::turbojpeg-static +add_library(libjpeg-turbo::turbojpeg-static STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::turbojpeg-static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Create imported target libjpeg-turbo::jpeg-static +add_library(libjpeg-turbo::jpeg-static STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::jpeg-static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/libjpeg-turboTargets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake new file mode 100644 index 0000000000..b637f86f0d --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake @@ -0,0 +1,28 @@ + +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was Config.cmake.in ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### + +include("${CMAKE_CURRENT_LIST_DIR}/libjpeg-turboTargets.cmake") +check_required_components("libjpeg-turbo") diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake new file mode 100644 index 0000000000..1a6966843f --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake @@ -0,0 +1,43 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. +# The variable CVF_VERSION must be set before calling configure_file(). + +set(PACKAGE_VERSION "3.0.3") + +if (PACKAGE_FIND_VERSION_RANGE) + # Package version must be in the requested version range + if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + endif() +else() + if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "4" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "4") + math(EXPR installedBits "4 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake new file mode 100644 index 0000000000..1aa258ec86 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake @@ -0,0 +1,49 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "libjpeg-turbo::jpeg" for configuration "Release" +set_property(TARGET libjpeg-turbo::jpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::jpeg PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libjpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::jpeg ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::jpeg "${_IMPORT_PREFIX}/lib32/libjpeg.a" ) + +# Import target "libjpeg-turbo::turbojpeg" for configuration "Release" +set_property(TARGET libjpeg-turbo::turbojpeg APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::turbojpeg PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::turbojpeg ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::turbojpeg "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" ) + +# Import target "libjpeg-turbo::turbojpeg-static" for configuration "Release" +set_property(TARGET libjpeg-turbo::turbojpeg-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::turbojpeg-static PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::turbojpeg-static ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::turbojpeg-static "${_IMPORT_PREFIX}/lib32/libturbojpeg.a" ) + +# Import target "libjpeg-turbo::jpeg-static" for configuration "Release" +set_property(TARGET libjpeg-turbo::jpeg-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(libjpeg-turbo::jpeg-static PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib32/libjpeg.a" + ) + +list(APPEND _cmake_import_check_targets libjpeg-turbo::jpeg-static ) +list(APPEND _cmake_import_check_files_for_libjpeg-turbo::jpeg-static "${_IMPORT_PREFIX}/lib32/libjpeg.a" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake new file mode 100644 index 0000000000..bff9dda653 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake @@ -0,0 +1,123 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.26) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS libjpeg-turbo::jpeg libjpeg-turbo::turbojpeg libjpeg-turbo::turbojpeg-static libjpeg-turbo::jpeg-static) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target libjpeg-turbo::jpeg +add_library(libjpeg-turbo::jpeg STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::jpeg PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Create imported target libjpeg-turbo::turbojpeg +add_library(libjpeg-turbo::turbojpeg STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::turbojpeg PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Create imported target libjpeg-turbo::turbojpeg-static +add_library(libjpeg-turbo::turbojpeg-static STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::turbojpeg-static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Create imported target libjpeg-turbo::jpeg-static +add_library(libjpeg-turbo::jpeg-static STATIC IMPORTED) + +set_target_properties(libjpeg-turbo::jpeg-static PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/libjpeg-turboTargets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/libjpeg.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/libjpeg.a new file mode 100644 index 0000000000..53cef1264e Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/libjpeg.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/libturbojpeg.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/libturbojpeg.a new file mode 100644 index 0000000000..11b7b587ed Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/libturbojpeg.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/pkgconfig/libjpeg.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/pkgconfig/libjpeg.pc new file mode 100644 index 0000000000..80d68a829c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/pkgconfig/libjpeg.pc @@ -0,0 +1,10 @@ +prefix=/root/lib +exec_prefix=/root/lib +libdir=/root/lib/lib +includedir=/root/lib/include + +Name: libjpeg +Description: A SIMD-accelerated JPEG codec that provides the libjpeg API +Version: 3.0.3 +Libs: -L${libdir} -ljpeg +Cflags: -I${includedir} diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/pkgconfig/libturbojpeg.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/pkgconfig/libturbojpeg.pc new file mode 100644 index 0000000000..d1a8161363 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/lib32/pkgconfig/libturbojpeg.pc @@ -0,0 +1,10 @@ +prefix=/root/lib +exec_prefix=/root/lib +libdir=/root/lib/lib32 +includedir=/root/lib/include + +Name: libturbojpeg +Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API +Version: 3.0.3 +Libs: -L${libdir} -lturbojpeg +Cflags: -I${includedir} diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagick++-7.Q16.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagick++-7.Q16.a new file mode 100644 index 0000000000..e169030dda Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagick++-7.Q16.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagick++-7.Q16.la b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagick++-7.Q16.la new file mode 100755 index 0000000000..d5a50ba326 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagick++-7.Q16.la @@ -0,0 +1,41 @@ +# libMagick++-7.Q16.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.7 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='' + +# The name of the static archive. +old_library='libMagick++-7.Q16.a' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' /root/lib/lib/libMagickWand-7.Q16.la /root/lib/lib/libMagickCore-7.Q16.la -ljpeg -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libMagick++-7.Q16. +current=5 +age=0 +revision=0 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/root/lib/lib' diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickCore-7.Q16.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickCore-7.Q16.a new file mode 100644 index 0000000000..adf3be504e Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickCore-7.Q16.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickCore-7.Q16.la b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickCore-7.Q16.la new file mode 100755 index 0000000000..6795c2810e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickCore-7.Q16.la @@ -0,0 +1,41 @@ +# libMagickCore-7.Q16.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.7 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='' + +# The name of the static archive. +old_library='libMagickCore-7.Q16.a' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' -ljpeg -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libMagickCore-7.Q16. +current=10 +age=0 +revision=1 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/root/lib/lib' diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickWand-7.Q16.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickWand-7.Q16.a new file mode 100644 index 0000000000..3dd8dbc9cf Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickWand-7.Q16.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickWand-7.Q16.la b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickWand-7.Q16.la new file mode 100755 index 0000000000..6e4f67968c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libMagickWand-7.Q16.la @@ -0,0 +1,41 @@ +# libMagickWand-7.Q16.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.7 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='' + +# Names of this library. +library_names='' + +# The name of the static archive. +old_library='libMagickWand-7.Q16.a' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' /root/lib/lib/libMagickCore-7.Q16.la -ljpeg -lm' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libMagickWand-7.Q16. +current=10 +age=0 +revision=1 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/root/lib/lib' diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libjpeg.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libjpeg.a new file mode 100644 index 0000000000..53cef1264e Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libjpeg.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.a new file mode 120000 index 0000000000..5671875da3 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.a @@ -0,0 +1 @@ +libpng16.a \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.la b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.la new file mode 120000 index 0000000000..3a5dc3243f --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.la @@ -0,0 +1 @@ +libpng16.la \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.so b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.so new file mode 120000 index 0000000000..e41f2c37e7 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng.so @@ -0,0 +1 @@ +libpng16.so \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.a new file mode 100644 index 0000000000..2631158e01 Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.la b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.la new file mode 100755 index 0000000000..4d34d570c6 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.la @@ -0,0 +1,41 @@ +# libpng16.la - a libtool library file +# Generated by libtool (GNU libtool) 2.4.7 +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='libpng16.so.16' + +# Names of this library. +library_names='libpng16.so.16.39.0 libpng16.so.16 libpng16.so' + +# The name of the static archive. +old_library='libpng16.a' + +# Linker flags that cannot go in dependency_libs. +inherited_linker_flags='' + +# Libraries that this one depends upon. +dependency_libs=' -L/root/lib/lib -lz' + +# Names of additional weak libraries provided by this library +weak_library_names='' + +# Version information for libpng16. +current=55 +age=39 +revision=0 + +# Is this an already installed library? +installed=yes + +# Should we warn about portability when linking against -modules? +shouldnotlink=no + +# Files to dlopen/dlpreopen +dlopen='' +dlpreopen='' + +# Directory that this library needs to be installed in: +libdir='/root/install/lib' diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so new file mode 120000 index 0000000000..77cd49ef80 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so @@ -0,0 +1 @@ +libpng16.so.16.39.0 \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so.16 b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so.16 new file mode 120000 index 0000000000..77cd49ef80 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so.16 @@ -0,0 +1 @@ +libpng16.so.16.39.0 \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so.16.39.0 b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so.16.39.0 new file mode 100755 index 0000000000..7314e03445 Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libpng16.so.16.39.0 differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libturbojpeg.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libturbojpeg.a new file mode 100644 index 0000000000..11b7b587ed Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libturbojpeg.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.a b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.a new file mode 100644 index 0000000000..e91adcb798 Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.a differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so new file mode 120000 index 0000000000..997f52c4ad --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so @@ -0,0 +1 @@ +libz.so.1.2.13 \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so.1 b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so.1 new file mode 120000 index 0000000000..997f52c4ad --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so.1 @@ -0,0 +1 @@ +libz.so.1.2.13 \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so.1.2.13 b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so.1.2.13 new file mode 100755 index 0000000000..5424b2742f Binary files /dev/null and b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/libz.so.1.2.13 differ diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/ImageMagick-7.Q16.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/ImageMagick-7.Q16.pc new file mode 100644 index 0000000000..e93f407447 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/ImageMagick-7.Q16.pc @@ -0,0 +1,14 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=MagickCore-7.Q16 + +Name: ImageMagick +Description: ImageMagick - convert, edit, and compose images (ABI Q16) +URL: https://github.com/ImageMagick +Version: 7.1.1 +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -ljpeg -lm -lm diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/ImageMagick.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/ImageMagick.pc new file mode 100644 index 0000000000..e93f407447 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/ImageMagick.pc @@ -0,0 +1,14 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=MagickCore-7.Q16 + +Name: ImageMagick +Description: ImageMagick - convert, edit, and compose images (ABI Q16) +URL: https://github.com/ImageMagick +Version: 7.1.1 +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -ljpeg -lm -lm diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/Magick++-7.Q16.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/Magick++-7.Q16.pc new file mode 100644 index 0000000000..bdf4541139 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/Magick++-7.Q16.pc @@ -0,0 +1,14 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=Magick++-7.Q16 + +Name: Magick++ +Description: Magick++ - C++ API for ImageMagick (ABI Q16) +Version: 7.1.1 +Requires: MagickWand-7.Q16 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -lm +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/Magick++.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/Magick++.pc new file mode 100644 index 0000000000..bdf4541139 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/Magick++.pc @@ -0,0 +1,14 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=Magick++-7.Q16 + +Name: Magick++ +Description: Magick++ - C++ API for ImageMagick (ABI Q16) +Version: 7.1.1 +Requires: MagickWand-7.Q16 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -lm +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickCore-7.Q16.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickCore-7.Q16.pc new file mode 100644 index 0000000000..963eb0ff89 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickCore-7.Q16.pc @@ -0,0 +1,15 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=MagickCore-7.Q16 +moduledir=${exec_prefix}/lib/ImageMagick-7.1.1/modules-Q16 + +Name: MagickCore +Description: MagickCore - C API for ImageMagick (ABI Q16) +URL: https://github.com/ImageMagick +Version: 7.1.1 +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -ljpeg -lm -lm diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickCore.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickCore.pc new file mode 100644 index 0000000000..963eb0ff89 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickCore.pc @@ -0,0 +1,15 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=MagickCore-7.Q16 +moduledir=${exec_prefix}/lib/ImageMagick-7.1.1/modules-Q16 + +Name: MagickCore +Description: MagickCore - C API for ImageMagick (ABI Q16) +URL: https://github.com/ImageMagick +Version: 7.1.1 +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -ljpeg -lm -lm diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickWand-7.Q16.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickWand-7.Q16.pc new file mode 100644 index 0000000000..9f1ae10955 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickWand-7.Q16.pc @@ -0,0 +1,15 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=MagickWand-7.Q16 + +Name: MagickWand +Description: MagickWand - C API for ImageMagick (ABI Q16) +URL: https://github.com/ImageMagick +Version: 7.1.1 +Requires: MagickCore-7.Q16 +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -ljpeg -lm -lm diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickWand.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickWand.pc new file mode 100644 index 0000000000..9f1ae10955 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/MagickWand.pc @@ -0,0 +1,15 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/ImageMagick-7 +includearchdir=/root/lib/include/ImageMagick-7 +libname=MagickWand-7.Q16 + +Name: MagickWand +Description: MagickWand - C API for ImageMagick (ABI Q16) +URL: https://github.com/ImageMagick +Version: 7.1.1 +Requires: MagickCore-7.Q16 +Cflags: -I${includearchdir} -I${includedir} -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 +Libs: -L${libdir} -l${libname} +Libs.private: -L${libdir} -l${libname} -ljpeg -lm -lm diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libjpeg.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libjpeg.pc new file mode 100644 index 0000000000..80d68a829c --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libjpeg.pc @@ -0,0 +1,10 @@ +prefix=/root/lib +exec_prefix=/root/lib +libdir=/root/lib/lib +includedir=/root/lib/include + +Name: libjpeg +Description: A SIMD-accelerated JPEG codec that provides the libjpeg API +Version: 3.0.3 +Libs: -L${libdir} -ljpeg +Cflags: -I${includedir} diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libpng.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libpng.pc new file mode 120000 index 0000000000..02f0e6427b --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libpng.pc @@ -0,0 +1 @@ +libpng16.pc \ No newline at end of file diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libpng16.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libpng16.pc new file mode 100644 index 0000000000..3c83bd972e --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libpng16.pc @@ -0,0 +1,12 @@ +prefix=/root/install +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/libpng16 + +Name: libpng +Description: Loads and saves PNG files +Version: 1.6.39 +Requires.private: zlib +Libs: -L${libdir} -lpng16 +Libs.private: -lz +Cflags: -I${includedir} diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libturbojpeg.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libturbojpeg.pc new file mode 100644 index 0000000000..d1a8161363 --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/libturbojpeg.pc @@ -0,0 +1,10 @@ +prefix=/root/lib +exec_prefix=/root/lib +libdir=/root/lib/lib32 +includedir=/root/lib/include + +Name: libturbojpeg +Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API +Version: 3.0.3 +Libs: -L${libdir} -lturbojpeg +Cflags: -I${includedir} diff --git a/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/zlib.pc b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/zlib.pc new file mode 100644 index 0000000000..f4f8a20dab --- /dev/null +++ b/packages/php-wasm/compile/libimagick/jspi/dist/root/lib/lib/pkgconfig/zlib.pc @@ -0,0 +1,13 @@ +prefix=/root/lib +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +sharedlibdir=${libdir} +includedir=${prefix}/include + +Name: zlib +Description: zlib compression library +Version: 1.2.13 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -lz +Cflags: -I${includedir} diff --git a/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libjpeg.a b/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libjpeg.a index 53cef1264e..4c4bfc66a1 100644 Binary files a/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libjpeg.a and b/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libjpeg.a differ diff --git a/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libturbojpeg.a b/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libturbojpeg.a index 11b7b587ed..80f0f90bd8 100644 Binary files a/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libturbojpeg.a and b/packages/php-wasm/compile/libjpeg/jspi/dist/root/lib/lib32/libturbojpeg.a differ diff --git a/packages/php-wasm/compile/shared/imagick/Dockerfile b/packages/php-wasm/compile/shared/imagick/Dockerfile new file mode 100644 index 0000000000..9653f9db5f --- /dev/null +++ b/packages/php-wasm/compile/shared/imagick/Dockerfile @@ -0,0 +1,170 @@ +FROM playground-php-wasm:base + +# Build arguments +# JSPI: when set to 1, builds with JSPI flags, otherwise Asyncify +ARG JSPI +ARG WITH_JSPI +ARG WITH_DEBUG +ARG DEBUG_DWARF_COMPILATION_DIR +ARG PHP_VERSION + +# Prepare common lib directory and bring in prebuilt zlib/png/jpeg headers/libs +RUN mkdir -p /root/lib/include /root/lib/lib +COPY ./libz/ /root/libz +COPY ./libpng16/ /root/libpng16 +COPY ./libjpeg/ /root/libjpeg + +# Select JSPI or Asyncify variants of third-party libs (zlib, libpng, libjpeg) +RUN if [ "1" = "1" ] || [ "$JSPI" = "1" ] || [ "$WITH_JSPI" = "yes" ]; then \ + cp -r /root/libz/jspi/dist/root/lib/* /root/lib && \ + cp -r /root/libpng16/jspi/dist/root/lib/* /root/lib && \ + cp -r /root/libjpeg/jspi/dist/root/lib/* /root/lib; \ + else \ + cp -r /root/libz/asyncify/dist/root/lib/* /root/lib && \ + cp -r /root/libpng16/asyncify/dist/root/lib/* /root/lib && \ + cp -r /root/libjpeg/asyncify/dist/root/lib/* /root/lib; \ + fi + +ENV CFLAGS="-I/root/lib/include -O3" \ + CXXFLAGS="-I/root/lib/include -O3" \ + LDFLAGS="-L/root/lib/lib" \ + EM_PKG_CONFIG_PATH="/root/lib/lib/pkgconfig" + +# Build PHP (to obtain phpize and headers) +# Install Bison (PHP requires it) – use 2.7 for <=7.3, otherwise distro bison +RUN mkdir -p /libs +COPY ./bison2.7/dist/ /libs/bison2.7 +COPY ./bison2.7/bison27.patch /root/bison27.patch +RUN if [[ "${PHP_VERSION:0:1}" -le "7" && "${PHP_VERSION:2:1}" -le "3" ]]; then \ + if /libs/bison2.7/usr/local/bison/bin/bison -h >/dev/null; then \ + mv /libs/bison2.7/usr/local/bison /usr/local/bison && \ + ln -s /usr/local/bison/bin/bison /usr/bin/bison && \ + ln -s /usr/local/bison/bin/yacc /usr/bin/yacc; \ + else \ + wget https://ftp.gnu.org/gnu/bison/bison-2.7.tar.gz && \ + tar -xvf bison-2.7.tar.gz && \ + rm bison-2.7.tar.gz && \ + cd bison-2.7 && \ + git apply --no-index /root/bison27.patch && \ + ./configure --prefix=/usr/local && \ + make && \ + make install; \ + if [[ $? -ne 0 ]]; then \ + echo 'Failed to build Bison 2.7 dependency.'; \ + exit -1; \ + fi; \ + fi; \ + else \ + apt update && apt install -y bison; \ + fi; + +# Clone and build PHP with a minimal configuration +RUN git clone https://github.com/php/php-src.git php-src \ + --branch PHP-$PHP_VERSION \ + --single-branch \ + --depth 1; +RUN cd php-src && ./buildconf --force +COPY ./php/php*.patch /root/ +RUN cd /root && git apply --no-index /root/php${PHP_VERSION:0:3}*.patch -v || true +RUN source /root/emsdk/emsdk_env.sh && \ + cd php-src && \ + emconfigure ./configure \ + --disable-fiber-asm \ + --enable-embed \ + --disable-cgi \ + --disable-opcache \ + --disable-phpdbg \ + --without-pcre-jit \ + --disable-cli \ + --disable-libxml \ + --without-libxml \ + --disable-dom \ + --disable-xml \ + --disable-simplexml \ + --disable-xmlreader \ + --disable-xmlwriter \ + --without-sqlite3 \ + --without-pdo-sqlite \ + --without-iconv + +# Disable ASM arithmetic and GCC/Clang specific code paths for wasm +RUN if [[ ("${PHP_VERSION:0:1}" -eq "7" && "${PHP_VERSION:2:1}" -ge "4") || "${PHP_VERSION:0:1}" -ge "8" ]]; then \ + /root/replace.sh 's/ZEND_USE_ASM_ARITHMETIC 1/ZEND_USE_ASM_ARITHMETIC 0/g' /root/php-src/Zend/zend_operators.h; \ + elif [[ "${PHP_VERSION:0:1}" -eq "7" && "${PHP_VERSION:2:1}" -eq "3" ]]; then \ + /root/replace.sh 's/defined\(HAVE_ASM_GOTO\)/0/g' /root/php-src/Zend/zend_operators.h; \ + fi; +RUN /root/replace.sh 's/defined\(__GNUC__\)/0/g' /root/php-src/Zend/zend_multiply.h +RUN /root/replace.sh 's/defined\(__GNUC__\)/0/g' /root/php-src/Zend/zend_cpuinfo.c +RUN /root/replace.sh 's/defined\(__clang__\)/0/g' /root/php-src/Zend/zend_cpuinfo.c + +# PHP <= 7.3 workaround for readdir_r detection +RUN if [[ "${PHP_VERSION:0:1}" -le "7" && "${PHP_VERSION:2:1}" -le "3" ]]; then \ + echo '#define HAVE_POSIX_READDIR_R 1' >> /root/php-src/main/php_config.h; \ + fi; +RUN source /root/emsdk/emsdk_env.sh && \ + cd /root/php-src && \ + emmake make install + +COPY ./libimagick/ /root/libimagick + +# Select correct ImageMagick wasm variant (JSPI vs Asyncify) +RUN if [ "1" = "1" ] || [ "$JSPI" = "1" ] || [ "$WITH_JSPI" = "yes" ]; then \ + cp -r /root/libimagick/jspi/dist/root/lib/* /root/lib; \ + else \ + cp -r /root/libimagick/asyncify/dist/root/lib/* /root/lib; \ + fi + +# Ensure pkg-config can find our ImageMagick .pc files and provide a config-script fallback +ENV PKG_CONFIG_PATH="/root/lib/lib/pkgconfig" +RUN set -eux; \ + mkdir -p /root/lib/bin; \ + printf '%s\n' '#!/bin/sh' \ + 'set -e' \ + 'PC_NAME=MagickWand' \ + 'case "$1" in' \ + ' --version|-version|--modversion) exec pkg-config --modversion "$PC_NAME" ;;' \ + ' --cflags) exec pkg-config --cflags "$PC_NAME" ;;' \ + ' --libs|--ldflags) exec pkg-config --libs "$PC_NAME" ;;' \ + ' *) echo "Usage: $0 [--version|--cflags|--libs]" >&2; exit 1 ;;' \ + 'esac' \ + > /root/lib/bin/MagickWand-config; \ + chmod +x /root/lib/bin/MagickWand-config; \ + ln -sf /root/lib/bin/MagickWand-config /root/lib/bin/Wand-config; \ + pkg-config --modversion MagickWand; \ + pkg-config --cflags MagickWand; \ + pkg-config --libs MagickWand + +## Build the Imagick PHP extension using the wasm ImageMagick already in the container + +# Build Intl PHP extension +# https://github.com/Imagick/imagick is home of the PHP extension, not of +# the ImageMagick library. +RUN git clone https://github.com/Imagick/imagick + +RUN cd /root/imagick && phpize + +RUN source /root/emsdk/emsdk_env.sh && \ + cd /root/imagick && \ + export EMCC_CFLAGS="-sSIDE_MODULE -D__x86_64__ -I/root/lib/include/ImageMagick-7"; \ + export EMCC_LDFLAGS="-sSIDE_MODULE -D__x86_64__ -L/root/lib/lib"; \ + export CFLAGS="${EMCC_CFLAGS}"; \ + export CXXFLAGS="${EMCC_CFLAGS}"; \ + export LDFLAGS="${EMCC_LDFLAGS}"; \ + export PKG_CONFIG_PATH="/root/lib/lib/pkgconfig"; \ + export PKG_CONFIG_LIBDIR="/root/lib/lib/pkgconfig"; \ + export PKG_CONFIG_SYSROOT_DIR="/"; \ + WAND_CONFIG="/root/lib/bin/MagickWand-config" emconfigure ./configure \ + --host=i386-unknown-freebsd \ + --prefix=/root \ + --with-imagick=/root/lib \ + CFLAGS="${EMCC_CFLAGS}" CXXFLAGS="${EMCC_CFLAGS}" \ + LDFLAGS="${EMCC_LDFLAGS}" LIBS="" + + +RUN source /root/emsdk/emsdk_env.sh && \ + cd /root/imagick && \ + emmake make + +RUN source /root/emsdk/emsdk_env.sh && \ + cd /root/imagick && \ + emmake make install \ No newline at end of file diff --git a/packages/php-wasm/compile/shared/project.json b/packages/php-wasm/compile/shared/project.json index b8f0108cd7..844dc7a85a 100644 --- a/packages/php-wasm/compile/shared/project.json +++ b/packages/php-wasm/compile/shared/project.json @@ -11,6 +11,31 @@ "parallel": false } }, + "imagick:jspi": { + "executor": "nx:run-commands", + "options": { + "commands": [ + "node packages/php-wasm/compile/shared/build.js --LIBRARY_NAME=imagick --OUTPUT_DIR=packages/php-wasm/node/jspi --WITH_JSPI=yes" + ], + "parallel": false + } + }, + "imagick:jspi:all": { + "executor": "nx:run-commands", + "options": { + "commands": [ + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=8.4", + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=8.3", + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=8.2", + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=8.1", + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=8.0", + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=7.4", + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=7.3", + "nx run php-wasm-compile-shared:imagick:jspi --PHP_VERSION=7.2" + ], + "parallel": false + } + }, "intl:jspi:all": { "executor": "nx:run-commands", "options": { diff --git a/packages/php-wasm/node/project.json b/packages/php-wasm/node/project.json index 622deac767..fc32c179ba 100644 --- a/packages/php-wasm/node/project.json +++ b/packages/php-wasm/node/project.json @@ -163,6 +163,7 @@ "write-files.spec.ts", "php-networking.spec.ts", "php-dynamic-loading.spec.ts", + "php-imagick.spec.ts", "php-request-handler.spec.ts", "php.spec.ts", "file-lock-manager-for-node.spec.ts" @@ -187,6 +188,7 @@ "write-files.spec.ts", "php-networking.spec.ts", "php-dynamic-loading.spec.ts", + "php-imagick.spec.ts", "php-request-handler.spec.ts", "php.spec.ts", "file-lock-manager-for-node.spec.ts" diff --git a/packages/php-wasm/node/src/lib/extensions/imagick/get-imagick-extension-module.ts b/packages/php-wasm/node/src/lib/extensions/imagick/get-imagick-extension-module.ts new file mode 100644 index 0000000000..975fff1016 --- /dev/null +++ b/packages/php-wasm/node/src/lib/extensions/imagick/get-imagick-extension-module.ts @@ -0,0 +1,45 @@ +import { LatestSupportedPHPVersion } from '@php-wasm/universal'; +import type { SupportedPHPVersion } from '@php-wasm/universal'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import fs from 'fs'; + +/** + * Resolve the on-disk path to the imagick extension module for a given PHP version. + * + * This function avoids bundler-specific `?url` imports to keep tests working even + * when the imagick binaries are not present. The packaging step copies + * `packages/php-wasm/node/jspi` (and asyncify) into the dist, so direct + * filesystem paths work in both source and built packages. + */ +export async function getImagickExtensionModule( + version: SupportedPHPVersion = LatestSupportedPHPVersion +): Promise { + const versionUnderscored = version.replace('.', '_'); + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + + // Try JSPI first, then Asyncify as a fallback + const jspiPath = path.resolve( + __dirname, + '../../../../jspi/extensions/imagick', + versionUnderscored, + 'imagick.so' + ); + if (fs.existsSync(jspiPath)) { + return jspiPath; + } + + const asyncifyPath = path.resolve( + __dirname, + '../../../../asyncify/extensions/imagick', + versionUnderscored, + 'imagick.so' + ); + if (fs.existsSync(asyncifyPath)) { + return asyncifyPath; + } + + throw new Error( + `Imagick extension for PHP ${version} not found in JSPI or Asyncify folders.` + ); +} diff --git a/packages/php-wasm/node/src/lib/extensions/imagick/with-imagick.ts b/packages/php-wasm/node/src/lib/extensions/imagick/with-imagick.ts new file mode 100644 index 0000000000..9aa45e3797 --- /dev/null +++ b/packages/php-wasm/node/src/lib/extensions/imagick/with-imagick.ts @@ -0,0 +1,73 @@ +import type { + EmscriptenOptions, + PHPRuntime, + SupportedPHPVersion, +} from '@php-wasm/universal'; +import { LatestSupportedPHPVersion, FSHelpers } from '@php-wasm/universal'; +import fs from 'fs'; +import { getImagickExtensionModule } from './get-imagick-extension-module'; + +export async function withImagick( + version: SupportedPHPVersion = LatestSupportedPHPVersion, + options: EmscriptenOptions +): Promise { + const extensionName = 'imagick.so'; + let extension: Buffer | null = null; + try { + const extensionPath = await getImagickExtensionModule(version); + extension = fs.readFileSync(extensionPath); + } catch (e) { + // Surface a clear error at callsite if requested but not available + throw new Error( + 'Imagick extension requested but not found. Please build it via "nx run php-wasm-compile-shared:imagick:jspi".' + ); + } + + return { + ...options, + ENV: { + ...options.ENV, + PHP_INI_SCAN_DIR: '/internal/shared/extensions', + }, + onRuntimeInitialized: (phpRuntime: PHPRuntime) => { + if (options.onRuntimeInitialized) { + options.onRuntimeInitialized(phpRuntime); + } + // Ensure the extensions directory exists + if ( + !FSHelpers.fileExists( + phpRuntime.FS, + '/internal/shared/extensions' + ) + ) { + phpRuntime.FS.mkdirTree('/internal/shared/extensions'); + } + // Write the extension binary + if ( + !FSHelpers.fileExists( + phpRuntime.FS, + `/internal/shared/extensions/${extensionName}` + ) + ) { + phpRuntime.FS.writeFile( + `/internal/shared/extensions/${extensionName}`, + new Uint8Array(extension!) + ); + } + // Provide a minimal ini to load imagick + if ( + !FSHelpers.fileExists( + phpRuntime.FS, + '/internal/shared/extensions/imagick.ini' + ) + ) { + phpRuntime.FS.writeFile( + '/internal/shared/extensions/imagick.ini', + [ + `extension=/internal/shared/extensions/${extensionName}`, + ].join('\n') + ); + } + }, + }; +} diff --git a/packages/php-wasm/node/src/lib/load-runtime.ts b/packages/php-wasm/node/src/lib/load-runtime.ts index f312145f08..78085df0ac 100644 --- a/packages/php-wasm/node/src/lib/load-runtime.ts +++ b/packages/php-wasm/node/src/lib/load-runtime.ts @@ -11,6 +11,7 @@ import { withNetworking } from './networking/with-networking'; import type { FileLockManager } from './file-lock-manager'; import { withXdebug } from './xdebug/with-xdebug'; import { withIntl } from './extensions/intl/with-intl'; +import { withImagick } from './extensions/imagick/with-imagick'; import { joinPaths } from '@php-wasm/util'; import type { Promised } from '@php-wasm/util'; import { dirname } from 'path'; @@ -20,6 +21,7 @@ export interface PHPLoaderOptions { followSymlinks?: boolean; withXdebug?: boolean; withIntl?: boolean; + withImagick?: boolean; } type PHPLoaderOptionsForNode = PHPLoaderOptions & { @@ -194,6 +196,10 @@ export async function loadNodeRuntime( emscriptenOptions = await withIntl(phpVersion, emscriptenOptions); } + if (options?.withImagick === true) { + emscriptenOptions = await withImagick(phpVersion, emscriptenOptions); + } + emscriptenOptions = await withNetworking(emscriptenOptions); return await loadPHPRuntime(