]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/image.h
(no commit message)
[imagemagick] / MagickCore / image.h
index 058645fe78ab04322e2e1f1a6dd0ebcde182fff8..349531443d3d76978e8eb2e5e8725a00c07a2d6a 100644 (file)
@@ -23,6 +23,7 @@ extern "C" {
 #endif
 
 #include <MagickCore/color.h>
+#include <MagickCore/pixel.h>
 
 #define OpaqueAlpha  ((Quantum) QuantumRange)
 #define TransparentAlpha  ((Quantum) 0)
@@ -40,14 +41,7 @@ typedef enum
   SetAlphaChannel,
   ShapeAlphaChannel,
   TransparentAlphaChannel
-} AlphaChannelType;
-
-typedef enum
-{
-  UndefinedAlpha,
-  InactiveAlpha,
-  ActiveAlpha
-} AlphaChannelState;
+} AlphaChannelOption;
 
 typedef enum
 {
@@ -170,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 */
@@ -246,7 +239,7 @@ struct _Image
     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
@@ -261,10 +254,6 @@ struct _Image
   RectangleInfo
     tile_offset;
 
-  void
-    *properties,       /* per image properities */
-    *artifacts;        /* per image sequence image artifacts */
-
   ImageType
     type;
 
@@ -280,8 +269,8 @@ struct _Image
   MagickBooleanType
     mask;
 
-  AlphaChannelState
-    alpha;
+  PixelTrait
+    alpha_trait;       /* is transparency channel defined and active */
 
   size_t
     number_channels,
@@ -336,6 +325,16 @@ struct _Image
   SemaphoreInfo
     *semaphore;
 
+  void
+    *properties,       /* general settings, to save with iamge */
+    *artifacts;        /* general operational/coder settings, not saved */
+
+  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) */
@@ -346,6 +345,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
@@ -432,7 +437,7 @@ struct _ImageInfo
     channel;
 
   void
-    *options;                /* splay tree of use options */
+    *options;                /* splay tree of global options */
 
   void
     *profile;
@@ -524,7 +529,7 @@ extern MagickExport MagickBooleanType
   ModifyImage(Image **,ExceptionInfo *),
   ResetImagePage(Image *,const char *),
   SetImageAlpha(Image *,const Quantum,ExceptionInfo *),
-  SetImageAlphaChannel(Image *,const AlphaChannelType,ExceptionInfo *),
+  SetImageAlphaChannel(Image *,const AlphaChannelOption,ExceptionInfo *),
   SetImageBackgroundColor(Image *,ExceptionInfo *),
   SetImageColor(Image *,const PixelInfo *,ExceptionInfo *),
   SetImageExtent(Image *,const size_t,const size_t,ExceptionInfo *),