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 (QuantumRange)
28 #define TransparentAlpha ((Quantum) 0UL)
32 UndefinedAlphaChannel,
34 BackgroundAlphaChannel,
36 DeactivateAlphaChannel,
42 TransparentAlphaChannel
56 ColorSeparationMatteType,
58 PaletteBilevelMatteType
78 BottomRightOrientation,
79 BottomLeftOrientation,
82 RightBottomOrientation,
89 PixelsPerInchResolution,
90 PixelsPerCentimeterResolution
93 typedef struct _PrimaryInfo
101 typedef struct _SegmentInfo
112 UndefinedTransmitType,
119 typedef struct _ChromaticityInfo
128 #include "MagickCore/blob.h"
129 #include "MagickCore/colorspace.h"
130 #include "MagickCore/cache-view.h"
131 #include "MagickCore/color.h"
132 #include "MagickCore/composite.h"
133 #include "MagickCore/compress.h"
134 #include "MagickCore/effect.h"
135 #include "MagickCore/geometry.h"
136 #include "MagickCore/layer.h"
137 #include "MagickCore/locale_.h"
138 #include "MagickCore/monitor.h"
139 #include "MagickCore/pixel.h"
140 #include "MagickCore/profile.h"
141 #include "MagickCore/quantum.h"
142 #include "MagickCore/resample.h"
143 #include "MagickCore/resize.h"
144 #include "MagickCore/semaphore.h"
145 #include "MagickCore/stream.h"
146 #include "MagickCore/timer.h"
154 colorspace; /* colorspace of image data */
157 compression; /* compression of image when read/write */
160 quality; /* compression quality setting, meaning varies */
163 orientation; /* photo orientation of image */
166 taint, /* has image been modified since reading */
167 matte; /* is transparency channel defined and active */
170 columns, /* physical size of image */
172 depth, /* depth of image on read/write */
173 colors; /* Size of color table, or actual color count */
174 /* Only valid if image is not DirectClass */
178 background_color, /* current background color attribute */
179 border_color, /* current bordercolor attribute */
180 matte_color, /* current mattecolor attribute */
181 transparent_color; /* color for 'transparent' color index in GIF */
196 units; /* resolution/density ppi or ppc */
207 resolution; /* image resolution/density */
210 page, /* virtual canvas size and offset of image */
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 */
235 scene, /* index of image in multi-image file */
236 delay; /* Animation delay time */
239 ticks_per_second; /* units for delay time, default 100 for GIF */
242 iterations, /* ??? */
246 start_loop; /* ??? */
248 PixelInterpolateMethod
249 interpolate; /* Interpolation of color for between pixel lookups */
252 black_point_compensation;
258 *properties, /* per image properities */
259 *artifacts; /* per image sequence image artifacts */
265 dither; /* dithering on/off */
268 extent; /* Size of image read from disk */
271 ping; /* no image data read, just attributes */
278 number_meta_channels,
296 MagickProgressMonitor
309 filename[MaxTextExtent], /* images input filename */
310 magick_filename[MaxTextExtent], /* given image filename (with read mods) */
311 magick[MaxTextExtent]; /* images file format (file magic) */
314 magick_columns, /* size of image when read/created */
318 *blob; /* image file as in-memory string of 'extent' */
321 debug; /* debug output attribute */
324 reference_count; /* image data sharing memory management */
331 *list, /* Undo/Redo image processing list (for display) */
332 *previous, /* Image list links */
342 compression; /* compression method when reading/saving image */
345 orientation; /* orientation setting */
348 temporary, /* image file to be deleted after read "empemeral:" */
349 adjoin, /* save images to seperate scene files */
354 *size, /* image generation size */
355 *extract, /* crop/resize string on image read */
357 *scenes; /* scene numbers that is to be read in */
360 scene, /* starting value for image save numbering */
361 number_scenes, /* total number of images in list - for escapes */
362 depth; /* current read/save depth of images */
365 interlace; /* interlace for image write */
368 endian; /* integer endian order for raw image data */
371 units; /* denisty pixels/inch or pixel/cm */
374 quality; /* compression quality */
377 *sampling_factor, /* JPEG write sampling factor */
378 *server_name, /* X windows server name - display/animate */
379 *font, /* DUP for draw_info */
380 *texture, /* montage/display background tile */
381 *density; /* DUP for image and draw_info */
385 fuzz; /* current color fuzz attribute */
388 background_color, /* user set background color */
389 border_color, /* user set border color */
390 matte_color, /* matte (frame) color */
391 transparent_color; /* color for transparent index in color tables */
392 /* NB: fill color is only needed in draw_info! */
393 /* the same for undercolor (for font drawing) */
396 dither, /* dither enable-disable */
397 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 */
425 *options; /* splay tree of use options */
433 MagickProgressMonitor
453 magick[MaxTextExtent], /* image file format (file magick) */
454 unique[MaxTextExtent], /* unique tempory filename - delegates */
455 zero[MaxTextExtent], /* unique filename ? - delegates */
456 filename[MaxTextExtent]; /* filename when reading/writing image */
465 extern MagickExport const char
466 DefaultTileGeometry[],
475 extern MagickExport const double
478 extern MagickExport ExceptionType
479 CatchImageException(Image *);
481 extern MagickExport FILE
482 *GetImageInfoFile(const ImageInfo *);
484 extern MagickExport Image
485 *AcquireImage(const ImageInfo *,ExceptionInfo *),
486 *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
487 *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
489 *DestroyImage(Image *),
490 *GetImageClipMask(const Image *,ExceptionInfo *),
491 *GetImageMask(const Image *,ExceptionInfo *),
492 *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *,
494 *ReferenceImage(Image *),
495 *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
498 extern MagickExport ImageInfo
499 *AcquireImageInfo(void),
500 *CloneImageInfo(const ImageInfo *),
501 *DestroyImageInfo(ImageInfo *);
503 extern MagickExport MagickBooleanType
504 ClipImage(Image *,ExceptionInfo *),
505 ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
506 GetImageAlphaChannel(const Image *),
507 IsTaintImage(const Image *),
508 IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
509 IsImageObject(const Image *),
510 ListMagickInfo(FILE *,ExceptionInfo *),
511 ModifyImage(Image **,ExceptionInfo *),
512 ResetImagePage(Image *,const char *),
513 SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
514 SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *),
515 SetImageBackgroundColor(Image *,ExceptionInfo *),
516 SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
517 SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
518 SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
519 SetImageMask(Image *,const Image *,ExceptionInfo *),
520 SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
521 StripImage(Image *,ExceptionInfo *),
522 SyncImage(Image *,ExceptionInfo *),
523 SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *),
524 SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *);
526 extern MagickExport size_t
527 InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *,
530 extern MagickExport ssize_t
531 GetImageReferenceCount(Image *);
533 extern MagickExport VirtualPixelMethod
534 GetImageVirtualPixelMethod(const Image *),
535 SetImageVirtualPixelMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
537 extern MagickExport void
538 AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *),
539 DestroyImagePixels(Image *),
540 DisassociateImageStream(Image *),
541 GetImageInfo(ImageInfo *),
542 SetImageInfoBlob(ImageInfo *,const void *,const size_t),
543 SetImageInfoFile(ImageInfo *,FILE *);
545 #if defined(__cplusplus) || defined(c_plusplus)