2 Copyright 1999-2012 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 resolution; /* image resolution/density */
208 page, /* virtual canvas size and offset of image */
212 bias, /* FUTURE: depreciated -- convolve bias */
213 blur, /* FUTURE: depreciated -- resize file blur */
214 fuzz; /* current color fuzz attribute - make image_info */
217 filter; /* resize/distort filter to apply */
223 endian; /* raw data integer ordering on read/write */
226 gravity; /* Gravity attribute for positioning in image */
229 compose; /* alpha composition method for layered images */
232 dispose; /* GIF animation disposal method */
238 scene, /* index of image in multi-image file */
239 delay; /* Animation delay time */
242 ticks_per_second; /* units for delay time, default 100 for GIF */
251 PixelInterpolateMethod
252 interpolate; /* Interpolation of color for between pixel lookups */
255 black_point_compensation;
258 transparent_color; /* color for 'transparent' color index in GIF */
267 *properties, /* per image properities */
268 *artifacts; /* per image sequence image artifacts */
274 dither; /* dithering on/off */
277 extent; /* Size of image read from disk */
284 number_meta_channels,
302 MagickProgressMonitor
315 filename[MaxTextExtent], /* images input filename */
316 magick_filename[MaxTextExtent], /* given image filename (with read mods) */
317 magick[MaxTextExtent]; /* images file format (file magic) */
324 *blob; /* image file as in-memory string of 'extent' */
327 debug; /* debug output attribute */
330 reference_count; /* image data sharing memory management */
336 *previous, /* Image sequence list links */
370 interlace; /* interlace for image write */
373 endian; /* integer endian order for raw image data */
376 units; /* denisty pixels/inch or pixel/cm */
379 quality; /* compression quality */
382 *sampling_factor, /* JPEG write sampling factor */
383 *server_name, /* X windows server name - display/animate */
384 *font, /* draw_info */
385 *texture, /* montage/display background tile */
386 *density; /* for image and draw_info */
390 fuzz; /* current color fuzz attribute */
398 dither, /* dither enable-disable */
399 monochrome; /* read/write pcl,pdf,ps,xps as monocrome image */
414 ping, /* fast read image attributes, not image data */
415 verbose; /* verbose output enable/disable */
419 /* authenticate -- moved to ImageOptions() */
425 *options; /* splay tree of use options */
428 virtual_pixel_method;
439 MagickProgressMonitor
459 magick[MaxTextExtent], /* image file format (file magick) */
460 unique[MaxTextExtent], /* unique tempory filename - delegates */
461 zero[MaxTextExtent], /* unique filename ? - delegates */
462 filename[MaxTextExtent]; /* filename when reading/writing image */
471 extern MagickExport const char
472 DefaultTileGeometry[],
481 extern MagickExport const double
484 extern MagickExport ExceptionType
485 CatchImageException(Image *);
487 extern MagickExport FILE
488 *GetImageInfoFile(const ImageInfo *);
490 extern MagickExport Image
491 *AcquireImage(const ImageInfo *,ExceptionInfo *),
492 *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
493 *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
495 *CombineImages(const Image *,ExceptionInfo *),
496 *DestroyImage(Image *),
497 *GetImageClipMask(const Image *,ExceptionInfo *),
498 *GetImageMask(const Image *,ExceptionInfo *),
499 *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *,
501 *ReferenceImage(Image *),
502 *SeparateImages(const Image *,ExceptionInfo *),
503 *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
506 extern MagickExport ImageInfo
507 *AcquireImageInfo(void),
508 *CloneImageInfo(const ImageInfo *),
509 *DestroyImageInfo(ImageInfo *);
511 extern MagickExport MagickBooleanType
512 ClipImage(Image *,ExceptionInfo *),
513 ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
514 GetImageAlphaChannel(const Image *),
515 IsTaintImage(const Image *),
516 IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
517 IsImageObject(const Image *),
518 ListMagickInfo(FILE *,ExceptionInfo *),
519 ModifyImage(Image **,ExceptionInfo *),
520 ResetImagePage(Image *,const char *),
521 SeparateImage(Image *,ExceptionInfo *),
522 SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
523 SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *),
524 SetImageBackgroundColor(Image *,ExceptionInfo *),
525 SetImageClipMask(Image *,const Image *,ExceptionInfo *),
526 SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
527 SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
528 SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
529 SetImageMask(Image *,const Image *,ExceptionInfo *),
530 SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
531 SetImageType(Image *,const ImageType,ExceptionInfo *),
532 StripImage(Image *,ExceptionInfo *),
533 SyncImage(Image *,ExceptionInfo *),
534 SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *),
535 SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *);
537 extern MagickExport size_t
538 InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *,
541 extern MagickExport ssize_t
542 GetImageReferenceCount(Image *);
544 extern MagickExport VirtualPixelMethod
545 GetImageVirtualPixelMethod(const Image *),
546 SetImageVirtualPixelMethod(const Image *,const VirtualPixelMethod);
548 extern MagickExport void
549 AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *),
550 DestroyImagePixels(Image *),
551 DisassociateImageStream(Image *),
552 GetImageInfo(ImageInfo *),
553 SetImageInfoBlob(ImageInfo *,const void *,const size_t),
554 SetImageInfoFile(ImageInfo *,FILE *);
556 #if defined(__cplusplus) || defined(c_plusplus)