WxExtLib - ImageMagickExtensions.h
00001: // -*- c -*-
00002: /*
00003: -------------------------------------------------------------------------
00004: This file is part of ImageMagickExtensions library.
00005: -------------------------------------------------------------------------
00006:
00007: ImageMagickExtensions library 0.0.1
00008: -----------------------------------
00009:
00010: COPYRIGHT NOTICE:
00011:
00012: ImageMagickExtensions library Copyright (c) 2004 Daniel Käps.
00013:
00014: The ImageMagickExtensions library and associated documentation files (the
00015: "Software") is provided "AS IS". The author(s) disclaim all
00016: warranties, expressed or implied, including, without limitation, the
00017: warranties of merchantability and of fitness for any purpose. The
00018: author(s) assume no liability for direct, indirect, incidental,
00019: special, exemplary, or consequential damages, which may result from
00020: the use of or other dealings in the Software, even if advised of the
00021: possibility of such damage.
00022:
00023: Permission is hereby granted, free of charge, to any person obtaining
00024: a copy of this Software, to deal in the Software without restriction,
00025: including without limitation the rights to use, copy, modify, merge,
00026: publish, distribute, sublicense, and/or sell copies of the Software,
00027: and to permit persons to whom the Software is furnished to do so,
00028: subject to the following conditions:
00029:
00030: 1. The origin of this source code must not be misrepresented.
00031: 2. Altered versions must be plainly marked as such and must not be
00032: misrepresented as being the original source.
00033: 3. This Copyright notice may not be removed or altered from any
00034: source or altered source distribution.
00035:
00036: End of ImageMagickExtensions library Copyright notice
00037:
00038: -------------------------------------------------------------------------
00039: */
00040:
00041: #ifndef _INCLUDED_ImageMagickExtensions_h
00042: #define _INCLUDED_ImageMagickExtensions_h
00043:
00044: #if defined(__cplusplus) || defined(c_plusplus)
00045: extern "C" {
00046: #endif
00047:
00048: #include "magick/studio.h"
00049:
00050: // #include "magick/hashmap.h"
00051:
00052: /*-----------------------------------------------------------------------*/
00053:
00054: typedef HGLOBAL HDIB;
00055:
00056: extern MagickExport int GetActualUsedColorCountInDIB (BITMAPINFOHEADER * BitmapInfoHeader);
00057: extern MagickExport int GetActualUsedColorCountInDIBHandle (HDIB DIBHandle);
00058:
00059: // NOTE expansion of 1-Bit images will make the expanded image 32 times
00060: // as big and thus may lead to really big images
00061: int ExpandDIBPixelRow (BITMAPINFOHEADER * BitmapInfoHeader,
00062: RGBQUAD * PaletteRGBAArray,
00063: unsigned long PixelCount,
00064: BYTE * DIBPixelDataPtr,
00065: BYTE * ExpandedPixelDataPtr);
00066:
00067: MagickExport int DIBPaletteToImage (HDIB DIBHandle, Image ** PaletteImage,
00068: ExceptionInfo * exceptionInfo);
00069:
00070: MagickExport int ImportExportColorPaletteIntoDIB (BYTE * ImportExportColorPaletteByteArray,
00071: int ImportExportColorPaletteEntryCount,
00072: HDIB DIBHandle,
00073: int IsImport);
00074:
00075: MagickExport int ImageToDIBPalette (Image* image, HDIB DIBHandle,
00076: ExceptionInfo * exceptionInfo);
00077:
00078: extern MagickExport Image * DIBToImage (HDIB DIB,
00079: ExceptionInfo * exceptionInfo);
00080: extern MagickExport HDIB ImageToDIB (Image * image, int DIBBitsPerPixel,
00081: ExceptionInfo * exceptionInfo);
00082:
00083: /*-----------------------------------------------------------------------*/
00084:
00085: #if defined(__cplusplus) || defined(c_plusplus)
00086: }
00087: #endif
00088:
00089: #endif // _INCLUDED_ImageMagickExtensions_h
00090:
00091: