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 */
439 ping, /* fast read image attributes, not image data */
440 verbose; /* verbose output enable/disable */
446 *options; /* splay tree of global options */
454 MagickProgressMonitor
474 magick[MagickPathExtent], /* image file format (file magick) */
475 unique[MagickPathExtent], /* unique tempory filename - delegates */
476 filename[MagickPathExtent]; /* filename when reading/writing image */
485 extern MagickExport ChannelType
486 SetImageChannelMask(Image *,const ChannelType);
488 extern MagickExport const char
489 DefaultTileGeometry[],
498 extern MagickExport const double
501 extern MagickExport ExceptionType
502 CatchImageException(Image *);
504 extern MagickExport FILE
505 *GetImageInfoFile(const ImageInfo *);
507 extern MagickExport Image
508 *AcquireImage(const ImageInfo *,ExceptionInfo *),
509 *AppendImages(const Image *,const MagickBooleanType,ExceptionInfo *),
510 *CloneImage(const Image *,const size_t,const size_t,const MagickBooleanType,
512 *DestroyImage(Image *),
513 *GetImageMask(const Image *,const PixelMask,ExceptionInfo *),
514 *NewMagickImage(const ImageInfo *,const size_t,const size_t,const PixelInfo *,
516 *ReferenceImage(Image *),
517 *SmushImages(const Image *,const MagickBooleanType,const ssize_t,
520 extern MagickExport ImageInfo
521 *AcquireImageInfo(void),
522 *CloneImageInfo(const ImageInfo *),
523 *DestroyImageInfo(ImageInfo *);
525 extern MagickExport MagickBooleanType
526 ClipImage(Image *,ExceptionInfo *),
527 ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
528 CopyImagePixels(Image *,const Image *,const RectangleInfo *,
529 const OffsetInfo *,ExceptionInfo *),
530 IsTaintImage(const Image *),
531 IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
532 IsImageObject(const Image *),
533 ListMagickInfo(FILE *,ExceptionInfo *),
534 ModifyImage(Image **,ExceptionInfo *),
535 ResetImagePage(Image *,const char *),
536 SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
537 SetImageBackgroundColor(Image *,ExceptionInfo *),
538 SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
539 SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
540 SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
541 SetImageMask(Image *,const PixelMask type,const Image *,ExceptionInfo *),
542 SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
543 StripImage(Image *,ExceptionInfo *),
544 SyncImage(Image *,ExceptionInfo *),
545 SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *),
546 SyncImagesSettings(ImageInfo *,Image *,ExceptionInfo *);
548 extern MagickExport size_t
549 InterpretImageFilename(const ImageInfo *,Image *,const char *,int,char *,
552 extern MagickExport ssize_t
553 GetImageReferenceCount(Image *);
555 extern MagickExport VirtualPixelMethod
556 GetImageVirtualPixelMethod(const Image *),
557 SetImageVirtualPixelMethod(Image *,const VirtualPixelMethod,ExceptionInfo *);
559 extern MagickExport void
560 AcquireNextImage(const ImageInfo *,Image *,ExceptionInfo *),
561 DestroyImagePixels(Image *),
562 DisassociateImageStream(Image *),
563 GetImageInfo(ImageInfo *),
564 SetImageInfoBlob(ImageInfo *,const void *,const size_t),
565 SetImageInfoFile(ImageInfo *,FILE *);
567 #if defined(__cplusplus) || defined(c_plusplus)