]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/image.h
(no commit message)
[imagemagick] / MagickCore / image.h
index 696a29f158e74d5ae45d2d32c74a71a5ed838871..349531443d3d76978e8eb2e5e8725a00c07a2d6a 100644 (file)
@@ -23,9 +23,10 @@ extern "C" {
 #endif
 
 #include <MagickCore/color.h>
+#include <MagickCore/pixel.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 */
@@ -239,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
@@ -254,10 +254,6 @@ struct _Image
   RectangleInfo
     tile_offset;
 
-  void
-    *properties,       /* per image properities */
-    *artifacts;        /* per image sequence image artifacts */
-
   ImageType
     type;
 
@@ -273,6 +269,9 @@ struct _Image
   MagickBooleanType
     mask;
 
+  PixelTrait
+    alpha_trait;       /* is transparency channel defined and active */
+
   size_t
     number_channels,
     number_meta_channels,
@@ -326,15 +325,32 @@ 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
-    *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
@@ -421,7 +437,7 @@ struct _ImageInfo
     channel;
 
   void
-    *options;                /* splay tree of use options */
+    *options;                /* splay tree of global options */
 
   void
     *profile;
@@ -461,6 +477,9 @@ struct _ImageInfo
     signature;
 };
 
+extern MagickExport ChannelType
+  SetImageChannelMask(Image *,const ChannelType);
+
 extern MagickExport const char
   DefaultTileGeometry[],
   DefaultTileLabel[],
@@ -510,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 *),