2 Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
5 You may not use this file except in compliance with the License.
6 obtain a copy of the License at
8 http://www.imagemagick.org/script/license.php
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
16 MagickCore image methods.
18 #ifndef _MAGICKCORE_IMAGE_H
19 #define _MAGICKCORE_IMAGE_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #include <MagickCore/color.h>
27 #define OpaqueAlpha ((Quantum) QuantumRange)
28 #define TransparentAlpha ((Quantum) 0UL)
32 UndefinedAlphaChannel,
34 BackgroundAlphaChannel,
36 DeactivateAlphaChannel,
41 TransparentAlphaChannel
55 ColorSeparationMatteType,
57 PaletteBilevelMatteType
77 BottomRightOrientation,
78 BottomLeftOrientation,
81 RightBottomOrientation,
88 PixelsPerInchResolution,
89 PixelsPerCentimeterResolution
92 typedef struct _PrimaryInfo
100 typedef struct _SegmentInfo
111 UndefinedTransmitType,
118 typedef struct _ChromaticityInfo
127 #include "MagickCore/blob.h"
128 #include "MagickCore/colorspace.h"
129 #include "MagickCore/cache-view.h"
130 #include "MagickCore/color.h"
131 #include "MagickCore/composite.h"
132 #include "MagickCore/compress.h"
133 #include "MagickCore/effect.h"
134 #include "MagickCore/geometry.h"
135 #include "MagickCore/layer.h"
136 #include "MagickCore/locale_.h"
137 #include "MagickCore/monitor.h"
138 #include "MagickCore/pixel.h"
139 #include "MagickCore/profile.h"
140 #include "MagickCore/quantum.h"
141 #include "MagickCore/resample.h"
142 #include "MagickCore/resize.h"
143 #include "MagickCore/semaphore.h"
144 #include "MagickCore/stream.h"
145 #include "MagickCore/timer.h"
153 colorspace; /* colorspace of image data */
156 compression; /* compression of image when read/write */
159 quality; /* compression quality setting, meaning varies */
162 orientation; /* photo orientation of image */
165 taint, /* has image been modified since reading */
166 matte; /* is transparency channel defined and active */
169 columns, /* physical size of image */
171 depth, /* depth of image on read/write */
172 colors; /* Size of color table, or actual color count if known */
173 /* Only valid if image is not DirectClass */
177 background_color, /* current background color attribute */
178 border_color, /* current bordercolor attribute */
179 matte_color; /* current mattecolor attribute */
194 units; /* resolution/density ppi or ppc */
205 x_resolution, /* image resolution/density */
209 page, /* virtual canvas size and offset of image */
213 bias, /* FUTURE: depreciated -- convolve bias */
214 blur, /* FUTURE: depreciated -- resize file blur */
215 fuzz; /* current color fuzz attribute - make image_info */
218 filter; /* resize/distort filter to apply */
224 endian; /* raw data integer ordering on read/write */
227 gravity; /* Gravity attribute for positioning in image */
230 compose; /* alpha composition method for layered images */
233 dispose; /* GIF animation disposal method */
239 scene, /* index of image in multi-image file */
240 delay; /* Animation delay time */
243 ticks_per_second; /* units for delay time, default 100 for GIF */
252 PixelInterpolateMethod
253 interpolate; /* Interpolation of color for between pixel lookups */
256 black_point_compensation;
259 transparent_color; /* color for 'transparent' color index in GIF */
268 *properties, /* per image properities */
269 *artifacts; /* per image sequence image artifacts */
275 dither; /* dithering on/off */
278 extent; /* Size of image read from disk */
285 number_meta_channels,
306 MagickProgressMonitor
321 filename[MaxTextExtent], /* images input filename */
322 magick_filename[MaxTextExtent], /* given image filename (with read mods) */
323 magick[MaxTextExtent]; /* images file format (file magic) */
330 *blob; /* image file as in-memory string of 'extent' */
333 exception; /* Error handling report */
336 debug; /* debug output attribute */
339 reference_count; /* image data sharing memory management */
345 *previous, /* Image sequence list links */
379 interlace; /* interlace for image write */
382 endian; /* integer endian order for raw image data */
385 units; /* denisty pixels/inch or pixel/cm */
388 quality; /* compression quality */
391 *sampling_factor, /* JPEG write sampling factor */
392 *server_name, /* X windows server name - display/animate */
393 *font, /* draw_info */
394 *texture, /* montage/display background tile */
395 *density; /* for image and draw_info */
399 fuzz; /* current color fuzz attribute */
407 dither, /* dither enable-disable */
408 monochrome; /* read/write pcl,pdf,ps,xps as monocrome image */
423 ping, /* fast read image attributes, not image data */
424 verbose; /* verbose output enable/disable */
428 /* authenticate -- moved to ImageOptions() */
434 *options; /* splay tree of use options */
437 virtual_pixel_method;
448 MagickProgressMonitor
468 magick[MaxTextExtent], /* image file format (file magick) */
469 unique[MaxTextExtent], /* unique tempory filename - delegates */
470 zero[MaxTextExtent], /* unique filename ? - delegates */
471 filename[MaxTextExtent]; /* filename when reading/writing image */
480 extern MagickExport const char
481 DefaultTileGeometry[],
490 extern MagickExport const double
493 extern MagickExport ExceptionType
494 CatchImageException(Image *);
496 extern MagickExport FILE
497 *GetImageInfoFile(const ImageInfo *);
499 extern MagickExport Image
500 *AcquireImage(const ImageInfo *,ExceptionInfo *),
501 *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
502 *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
504 *CombineImages(const Image *,ExceptionInfo *),
505 *DestroyImage(Image *),
506 *GetImageClipMask(const Image *,ExceptionInfo *),
507 *GetImageMask(const Image *,ExceptionInfo *),
508 *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *,
510 *ReferenceImage(Image *),
511 *SeparateImages(const Image *,ExceptionInfo *),
512 *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
515 extern MagickExport ImageInfo
516 *AcquireImageInfo(void),
517 *CloneImageInfo(const ImageInfo *),
518 *DestroyImageInfo(ImageInfo *);
520 extern MagickExport MagickBooleanType
521 ClipImage(Image *,ExceptionInfo *),
522 ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
523 GetImageAlphaChannel(const Image *),
524 IsTaintImage(const Image *),
525 IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
526 IsImageObject(const Image *),
527 ListMagickInfo(FILE *,ExceptionInfo *),
528 ModifyImage(Image **,ExceptionInfo *),
529 ResetImagePage(Image *,const char *),
530 SeparateImage(Image *),
531 SetImageAlpha(Image *,const Quantum),
532 SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *),
533 SetImageBackgroundColor(Image *),
534 SetImageClipMask(Image *,const Image *,ExceptionInfo *),
535 SetImageColor(Image *,const PixelInfo *),
536 SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
537 SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
538 SetImageMask(Image *,const Image *,ExceptionInfo *),
539 SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
540 SetImageType(Image *,const ImageType,ExceptionInfo *),
543 SyncImageSettings(const ImageInfo *,Image *),
544 SyncImagesSettings(ImageInfo *,Image *);
546 extern MagickExport size_t
547 InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *);
549 extern MagickExport ssize_t
550 GetImageReferenceCount(Image *);
552 extern MagickExport VirtualPixelMethod
553 GetImageVirtualPixelMethod(const Image *),
554 SetImageVirtualPixelMethod(const Image *,const VirtualPixelMethod);
556 extern MagickExport void
557 AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *),
558 DestroyImagePixels(Image *),
559 DisassociateImageStream(Image *),
560 GetImageException(Image *,ExceptionInfo *),
561 GetImageInfo(ImageInfo *),
562 SetImageInfoBlob(ImageInfo *,const void *,const size_t),
563 SetImageInfoFile(ImageInfo *,FILE *);
565 #if defined(__cplusplus) || defined(c_plusplus)