2 Copyright 1999-2016 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 #include "MagickCore/color.h"
22 #include "MagickCore/pixel.h"
24 #if defined(__cplusplus) || defined(c_plusplus)
28 #define OpaqueAlpha ((Quantum) QuantumRange)
29 #define TransparentAlpha ((Quantum) 0)
33 UndefinedAlphaChannel,
35 AssociateAlphaChannel,
36 BackgroundAlphaChannel,
38 DeactivateAlphaChannel,
40 DisassociateAlphaChannel,
48 TransparentAlphaChannel
62 ColorSeparationAlphaType,
64 PaletteBilevelAlphaType
84 BottomRightOrientation,
85 BottomLeftOrientation,
88 RightBottomOrientation,
95 PixelsPerInchResolution,
96 PixelsPerCentimeterResolution
99 typedef struct _PrimaryInfo
107 typedef struct _SegmentInfo
118 UndefinedTransmitType,
125 typedef struct _ChromaticityInfo
134 #include "MagickCore/blob.h"
135 #include "MagickCore/colorspace.h"
136 #include "MagickCore/cache-view.h"
137 #include "MagickCore/color.h"
138 #include "MagickCore/composite.h"
139 #include "MagickCore/compress.h"
140 #include "MagickCore/effect.h"
141 #include "MagickCore/geometry.h"
142 #include "MagickCore/layer.h"
143 #include "MagickCore/locale_.h"
144 #include "MagickCore/monitor.h"
145 #include "MagickCore/pixel.h"
146 #include "MagickCore/profile.h"
147 #include "MagickCore/quantum.h"
148 #include "MagickCore/resample.h"
149 #include "MagickCore/resize.h"
150 #include "MagickCore/semaphore.h"
151 #include "MagickCore/stream.h"
152 #include "MagickCore/timer.h"
160 colorspace; /* colorspace of image data */
163 compression; /* compression of image when read/write */
166 quality; /* compression quality setting, meaning varies */
169 orientation; /* photo orientation of image */
172 taint; /* has image been modified since reading */
175 columns, /* physical size of image */
177 depth, /* depth of image on read/write */
178 colors; /* Size of color table, or actual color count */
179 /* Only valid if image is not DirectClass */
183 alpha_color, /* current alphacolor attribute */
184 background_color, /* current background color attribute */
185 border_color, /* current bordercolor attribute */
186 transparent_color; /* color for 'transparent' color index in GIF */
201 units; /* resolution/density ppi or ppc */
212 resolution; /* image resolution/density */
215 page, /* virtual canvas size and offset of image */
219 fuzz; /* current color fuzz attribute - move to image_info */
222 filter; /* resize/distort filter to apply */
225 intensity; /* method to generate an intensity value from a pixel */
231 endian; /* raw data integer ordering on read/write */
234 gravity; /* Gravity attribute for positioning in image */
237 compose; /* alpha composition method for layered images */
240 dispose; /* GIF animation disposal method */
243 scene, /* index of image in multi-image file */
244 delay, /* Animation delay time */
245 duration; /* Total animation duration sum(delay*iterations) */
248 ticks_per_second; /* units for delay time, default 100 for GIF */
251 iterations, /* number of interations for GIF animations */
255 start_loop; /* ??? */
257 PixelInterpolateMethod
258 interpolate; /* Interpolation of color for between pixel lookups */
261 black_point_compensation;
270 dither; /* dithering on/off */
273 extent; /* Size of image read from disk */
276 ping; /* no image data read, just attributes */
283 alpha_trait; /* is transparency channel defined and active */
287 number_meta_channels,
305 MagickProgressMonitor
318 *properties, /* general settings, to save with image */
319 *artifacts; /* general operational/coder settings, not saved */
322 filename[MagickPathExtent], /* images input filename */
323 magick_filename[MagickPathExtent], /* given image filename (with read mods) */
324 magick[MagickPathExtent]; /* images file format (file magic) */
327 magick_columns, /* size of image when read/created */
331 *blob; /* image file as in-memory string of 'extent' */
337 debug; /* debug output attribute */
340 reference_count; /* image data sharing memory management */
346 *image_info; /* (Optional) Image belongs to this ImageInfo 'list'
347 * For access to 'global options' when no per-image
348 * attribute, properity, or artifact has been set.
352 *list, /* Undo/Redo image processing list (for display) */
353 *previous, /* Image list links */
362 Stores an image list, as well as all global settings used by all images
363 held, -- unless overridden for that specific image. See SyncImagesettings()
364 which maps any global setting that always overrides specific image settings.
369 compression; /* compression method when reading/saving image */
372 orientation; /* orientation setting */
375 temporary, /* image file to be deleted after read "empemeral:" */
376 adjoin, /* save images to separate scene files */
381 *size, /* image generation size */
382 *extract, /* crop/resize string on image read */
384 *scenes; /* scene numbers that is to be read in */
387 scene, /* starting value for image save numbering */
388 number_scenes, /* total number of images in list - for escapes */
389 depth; /* current read/save depth of images */
392 interlace; /* interlace for image write */
395 endian; /* integer endian order for raw image data */
398 units; /* denisty pixels/inch or pixel/cm */
401 quality; /* compression quality */
404 *sampling_factor, /* JPEG write sampling factor */
405 *server_name, /* X windows server name - display/animate */
406 *font, /* DUP for draw_info */
407 *texture, /* montage/display background tile */
408 *density; /* DUP for image and draw_info */
412 fuzz; /* current color fuzz attribute */
415 alpha_color, /* alpha (frame) color */
416 background_color, /* user set background color */
417 border_color, /* user set border color */
418 transparent_color; /* color for transparent index in color tables */
419 /* NB: fill color is only needed in draw_info! */
420 /* the same for undercolor (for font drawing) */
423 dither, /* dither enable-disable */
424 monochrome; /* read/write pcl,pdf,ps,xps as monocrome image */
442 ping, /* fast read image attributes, not image data */
443 verbose; /* verbose output enable/disable */
449 *options; /* splay tree of global options */
457 MagickProgressMonitor
477 magick[MagickPathExtent], /* image file format (file magick) */
478 unique[MagickPathExtent], /* unique tempory filename - delegates */
479 zero[MagickPathExtent], /* unique filename ? - delegates */
480 filename[MagickPathExtent]; /* filename when reading/writing image */
489 extern MagickExport ChannelType
490 SetImageChannelMask(Image *,const ChannelType);
492 extern MagickExport const char
493 DefaultTileGeometry[],
502 extern MagickExport const double
505 extern MagickExport ExceptionType
506 CatchImageException(Image *);
508 extern MagickExport FILE
509 *GetImageInfoFile(const ImageInfo *);
511 extern MagickExport Image
512 *AcquireImage(const ImageInfo *,ExceptionInfo *),
513 *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
514 *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
516 *DestroyImage(Image *),
517 *GetImageMask(const Image *,const PixelMask,ExceptionInfo *),
518 *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *,
520 *ReferenceImage(Image *),
521 *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
524 extern MagickExport ImageInfo
525 *AcquireImageInfo(void),
526 *CloneImageInfo(const ImageInfo *),
527 *DestroyImageInfo(ImageInfo *);
529 extern MagickExport MagickBooleanType
530 ClipImage(Image *,ExceptionInfo *),
531 ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
532 CopyImagePixels(Image *,const Image *,const RectangleInfo *,
533 const OffsetInfo *,ExceptionInfo *),
534 IsTaintImage(const Image *),
535 IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
536 IsImageObject(const Image *),
537 ListMagickInfo(FILE *,ExceptionInfo *),
538 ModifyImage(Image **,ExceptionInfo *),
539 ResetImagePage(Image *,const char *),
540 SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
541 SetImageBackgroundColor(Image *,ExceptionInfo *),
542 SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
543 SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
544 SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
545 SetImageMask(Image *,const PixelMask type,const Image *,ExceptionInfo *),
546 SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
547 StripImage(Image *,ExceptionInfo *),
548 SyncImage(Image *,ExceptionInfo *),
549 SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *),
550 SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *);
552 extern MagickExport size_t
553 InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *,
556 extern MagickExport ssize_t
557 GetImageReferenceCount(Image *);
559 extern MagickExport VirtualPixelMethod
560 GetImageVirtualPixelMethod(const Image *),
561 SetImageVirtualPixelMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
563 extern MagickExport void
564 AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *),
565 DestroyImagePixels(Image *),
566 DisassociateImageStream(Image *),
567 GetImageInfo(ImageInfo *),
568 SetImageInfoBlob(ImageInfo *,const void *,const size_t),
569 SetImageInfoFile(ImageInfo *,FILE *);
571 #if defined(__cplusplus) || defined(c_plusplus)