]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/image.h
(no commit message)
[imagemagick] / MagickCore / image.h
index bcc86dad9eb4a3ab0c04031eed9d89e57178ca3a..87df70bc8d3fea23f8cf8bf4012190ad86fe041d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
+  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization
   dedicated to making software imaging solutions freely available.
 
   You may not use this file except in compliance with the License.
 #ifndef _MAGICKCORE_IMAGE_H
 #define _MAGICKCORE_IMAGE_H
 
+#include "MagickCore/color.h"
+#include "MagickCore/pixel.h"
+
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
 
-#include <MagickCore/color.h>
-
 #define OpaqueAlpha  ((Quantum) QuantumRange)
-#define TransparentAlpha  ((Quantum) 0UL)
+#define TransparentAlpha  ((Quantum) 0)
 
 typedef enum
 {
@@ -40,7 +41,7 @@ typedef enum
   SetAlphaChannel,
   ShapeAlphaChannel,
   TransparentAlphaChannel
-} AlphaChannelType;
+} AlphaChannelOption;
 
 typedef enum
 {
@@ -163,8 +164,7 @@ struct _Image
     orientation;        /* photo orientation of image */
 
   MagickBooleanType
-    taint,              /* has image been modified since reading */
-    matte;              /* is transparency channel defined and active */
+    taint;              /* has image been modified since reading */
 
   size_t
     columns,            /* physical size of image */
@@ -201,7 +201,7 @@ struct _Image
     *geometry;
 
   ssize_t
-    offset;
+    offset;         /* ??? */
 
   PointInfo
     resolution;     /* image resolution/density */
@@ -211,13 +211,14 @@ struct _Image
     extract_info;
 
   double
-    bias,           /* FUTURE: depreciated -- convolve bias */
-    blur,           /* FUTURE: depreciated -- resize file blur */
-    fuzz;           /* current color fuzz attribute - make image_info */
+    fuzz;           /* current color fuzz attribute - move to image_info */
 
   FilterTypes
     filter;         /* resize/distort filter to apply */
 
+  PixelIntensityMethod
+    intensity;      /* method to generate an intensity value from a pixel */
+
   InterlaceType
     interlace;
 
@@ -235,17 +236,18 @@ struct _Image
 
   size_t
     scene,          /* index of image in multi-image file */
-    delay;          /* Animation delay time */
+    delay,          /* Animation delay time */
+    duration;       /* Total animation duration sum(delay*iterations) */
 
   ssize_t
     ticks_per_second;  /* units for delay time, default 100 for GIF */
 
   size_t
-    iterations,
+    iterations,        /* number of interations for GIF animations */
     total_colors;
 
   ssize_t
-    start_loop;
+    start_loop;        /* ??? */
 
   PixelInterpolateMethod
     interpolate;       /* Interpolation of color for between pixel lookups */
@@ -256,10 +258,6 @@ struct _Image
   RectangleInfo
     tile_offset;
 
-  void
-    *properties,       /* per image properities */
-    *artifacts;        /* per image sequence image artifacts */
-
   ImageType
     type;
 
@@ -270,10 +268,14 @@ struct _Image
     extent;            /* Size of image read from disk */
 
   MagickBooleanType
-    ping;
+    ping;              /* no image data read, just attributes */
 
   MagickBooleanType
-    mask;
+    read_mask,
+    write_mask;
+
+  PixelTrait
+    alpha_trait;       /* is transparency channel defined and active */
 
   size_t
     number_channels,
@@ -307,18 +309,25 @@ struct _Image
   ProfileInfo
     *generic_profile;
 
+  void
+    *properties,       /* general settings, to save with image */
+    *artifacts;        /* general operational/coder settings, not saved */
+
   char
     filename[MaxTextExtent],        /* images input filename */
     magick_filename[MaxTextExtent], /* given image filename (with read mods) */
     magick[MaxTextExtent];          /* images file format (file magic) */
 
   size_t
-    magick_columns,
+    magick_columns,     /* size of image when read/created */
     magick_rows;
 
   BlobInfo
     *blob;             /* image file as in-memory string of 'extent' */
 
+  time_t
+    timestamp;
+
   MagickBooleanType
     debug;             /* debug output attribute */
 
@@ -328,15 +337,28 @@ struct _Image
   SemaphoreInfo
     *semaphore;
 
+  const struct _ImageInfo
+    *image_info;       /* (Optional) Image belongs to this ImageInfo 'list'
+                        * For access to 'global options' when no per-image
+                        * attribute, properity, or artifact has been set.
+                        * It may be set or unset as needed, but never freed.
+                        */
+
   struct _Image
-    *previous,         /* Image sequence list links */
-    *list,
+    *list,             /* Undo/Redo image processing list (for display) */
+    *previous,         /* Image list links */
     *next;
 
   size_t
     signature;
 };
 
+/* ImageInfo structure
+ * Stores an image list, as well as all global settings used by
+ * all images held, -- unless overridden for that specific image.
+ * See SyncImagesettings() which maps any global setting that always
+ * overrides specific image settings.
+ */
 struct _ImageInfo
 {
   CompressionType
@@ -346,7 +368,7 @@ struct _ImageInfo
     orientation;        /* orientation setting */
 
   MagickBooleanType
-    temporary,
+    temporary,          /* image file to be deleted after read "empemeral:" */
     adjoin,             /* save images to seperate scene files */
     affirm,
     antialias;
@@ -423,7 +445,7 @@ struct _ImageInfo
     channel;
 
   void
-    *options;                /* splay tree of use options */
+    *options;                /* splay tree of global options */
 
   void
     *profile;
@@ -463,6 +485,9 @@ struct _ImageInfo
     signature;
 };
 
+extern MagickExport ChannelType
+  SetImageChannelMask(Image *,const ChannelType);
+
 extern MagickExport const char
   DefaultTileGeometry[],
   DefaultTileLabel[],
@@ -504,7 +529,6 @@ extern MagickExport ImageInfo
 extern MagickExport MagickBooleanType
   ClipImage(Image *,ExceptionInfo *),
   ClipImagePath(Image *,const char *,const MagickBooleanType,ExceptionInfo *),
-  GetImageAlphaChannel(const Image *),
   IsTaintImage(const Image *),
   IsHighDynamicRangeImage(const Image *,ExceptionInfo *),
   IsImageObject(const Image *),
@@ -512,14 +536,12 @@ extern MagickExport MagickBooleanType
   ModifyImage(Image **,ExceptionInfo *),
   ResetImagePage(Image *,const char *),
   SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
-  SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *),
   SetImageBackgroundColor(Image *,ExceptionInfo *),
   SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
   SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),
   SetImageInfo(ImageInfo *,const unsigned int,ExceptionInfo *),
   SetImageMask(Image *,const Image *,ExceptionInfo *),
   SetImageStorageClass(Image *,const ClassType,ExceptionInfo *),
-  SetImageType(Image *,const ImageType,ExceptionInfo *),
   StripImage(Image *,ExceptionInfo *),
   SyncImage(Image *,ExceptionInfo *),
   SyncImageSettings(const ImageInfo *,Image *,ExceptionInfo *),