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,
303 MagickProgressMonitor
316 filename[MaxTextExtent], /* images input filename */
317 magick_filename[MaxTextExtent], /* given image filename (with read mods) */
318 magick[MaxTextExtent]; /* images file format (file magic) */
325 *blob; /* image file as in-memory string of 'extent' */
328 debug; /* debug output attribute */
331 reference_count; /* image data sharing memory management */
337 *previous, /* Image sequence list links */
371 interlace; /* interlace for image write */
374 endian; /* integer endian order for raw image data */
377 units; /* denisty pixels/inch or pixel/cm */
380 quality; /* compression quality */
383 *sampling_factor, /* JPEG write sampling factor */
384 *server_name, /* X windows server name - display/animate */
385 *font, /* draw_info */
386 *texture, /* montage/display background tile */
387 *density; /* for image and draw_info */
391 fuzz; /* current color fuzz attribute */
399 dither, /* dither enable-disable */
400 monochrome; /* read/write pcl,pdf,ps,xps as monocrome image */
415 ping, /* fast read image attributes, not image data */
416 verbose; /* verbose output enable/disable */
420 /* authenticate -- moved to ImageOptions() */
426 *options; /* splay tree of use options */
429 virtual_pixel_method;
440 MagickProgressMonitor
460 magick[MaxTextExtent], /* image file format (file magick) */
461 unique[MaxTextExtent], /* unique tempory filename - delegates */
462 zero[MaxTextExtent], /* unique filename ? - delegates */
463 filename[MaxTextExtent]; /* filename when reading/writing image */
472 extern MagickExport const char
473 DefaultTileGeometry[],
482 extern MagickExport const double
485 extern MagickExport ExceptionType
486 CatchImageException(Image *);
488 extern MagickExport FILE
489 *GetImageInfoFile(const ImageInfo *);
491 extern MagickExport Image
492 *AcquireImage(const ImageInfo *,ExceptionInfo *),
493 *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
494 *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
496 *CombineImages(const Image *,ExceptionInfo *),
497 *DestroyImage(Image *),
498 *GetImageClipMask(const Image *,ExceptionInfo *),
499 *GetImageMask(const Image *,ExceptionInfo *),
500 *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *,
502 *ReferenceImage(Image *),
503 *SeparateImages(const Image *,ExceptionInfo *),
504 *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
507 extern MagickExport ImageInfo
508 *AcquireImageInfo(void),
509 *CloneImageInfo(const ImageInfo *),
510 *DestroyImageInfo(ImageInfo *);
512 extern MagickExport MagickBooleanType
513 ClipImage(Image *,ExceptionInfo *),
514 ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
515 GetImageAlphaChannel(const Image *),
516 IsTaintImage(const Image *),
517 IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
518 IsImageObject(const Image *),
519 ListMagickInfo(FILE *,ExceptionInfo *),
520 ModifyImage(Image **,ExceptionInfo *),
521 ResetImagePage(Image *,const char *),
522 SeparateImage(Image *,ExceptionInfo *),
523 SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
524 SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *),
525 SetImageBackgroundColor(Image *,ExceptionInfo *),
526 SetImageClipMask(Image *,const Image *,ExceptionInfo *),
527 SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
528 SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
529 SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
530 SetImageMask(Image *,const Image *,ExceptionInfo *),
531 SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
532 SetImageType(Image *,const ImageType,ExceptionInfo *),
533 StripImage(Image *,ExceptionInfo *),
534 SyncImage(Image *,ExceptionInfo *),
535 SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *),
536 SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *);
538 extern MagickExport size_t
539 InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *,
542 extern MagickExport ssize_t
543 GetImageReferenceCount(Image *);
545 extern MagickExport VirtualPixelMethod
546 GetImageVirtualPixelMethod(const Image *),
547 SetImageVirtualPixelMethod(const Image *,const VirtualPixelMethod);
549 extern MagickExport void
550 AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *),
551 DestroyImagePixels(Image *),
552 DisassociateImageStream(Image *),
553 GetImageInfo(ImageInfo *),
554 SetImageInfoBlob(ImageInfo *,const void *,const size_t),
555 SetImageInfoFile(ImageInfo *,FILE *);
557 #if defined(__cplusplus) || defined(c_plusplus)