]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/image.h
(no commit message)
[imagemagick] / MagickCore / image.h
index 107599553da55ece57c314014c9634ebdcc08201..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  (QuantumRange)
-#define TransparentAlpha  ((Quantum) 0UL)
+#define OpaqueAlpha  ((Quantum) QuantumRange)
+#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 */
@@ -211,11 +211,14 @@ struct _Image
     extract_info;
 
   double
-    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;
 
@@ -233,13 +236,14 @@ 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
@@ -254,10 +258,6 @@ struct _Image
   RectangleInfo
     tile_offset;
 
-  void
-    *properties,       /* per image properities */
-    *artifacts;        /* per image sequence image artifacts */
-
   ImageType
     type;
 
@@ -271,7 +271,11 @@ struct _Image
     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,
@@ -305,6 +309,10 @@ 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) */
@@ -317,6 +325,9 @@ struct _Image
   BlobInfo
     *blob;             /* image file as in-memory string of 'extent' */
 
+  time_t
+    timestamp;
+
   MagickBooleanType
     debug;             /* debug output attribute */
 
@@ -326,6 +337,12 @@ 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
     *list,             /* Undo/Redo image processing list (for display) */
@@ -336,6 +353,12 @@ struct _Image
     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
@@ -422,7 +445,7 @@ struct _ImageInfo
     channel;
 
   void
-    *options;                /* splay tree of use options */
+    *options;                /* splay tree of global options */
 
   void
     *profile;
@@ -506,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 *),
@@ -514,7 +536,6 @@ 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 *),