]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authoranthony <anthony@git.imagemagick.org>
Thu, 22 Mar 2012 01:20:28 +0000 (01:20 +0000)
committeranthony <anthony@git.imagemagick.org>
Thu, 22 Mar 2012 01:20:28 +0000 (01:20 +0000)
MagickCore/image.h
MagickCore/option.c
MagickWand/operation.c
config/english.xml
config/francais.xml

index bcc86dad9eb4a3ab0c04031eed9d89e57178ca3a..6753323d30ed13ff892cd7621877dc89939b9ac0 100644 (file)
@@ -201,7 +201,7 @@ struct _Image
     *geometry;
 
   ssize_t
-    offset;
+    offset;         /* ??? */
 
   PointInfo
     resolution;     /* image resolution/density */
@@ -241,11 +241,11 @@ struct _Image
     ticks_per_second;  /* units for delay time, default 100 for GIF */
 
   size_t
-    iterations,
+    iterations,        /* ??? */
     total_colors;
 
   ssize_t
-    start_loop;
+    start_loop;        /* ??? */
 
   PixelInterpolateMethod
     interpolate;       /* Interpolation of color for between pixel lookups */
@@ -270,7 +270,7 @@ struct _Image
     extent;            /* Size of image read from disk */
 
   MagickBooleanType
-    ping;
+    ping;              /* no image data read, just attributes */
 
   MagickBooleanType
     mask;
@@ -313,7 +313,7 @@ struct _Image
     magick[MaxTextExtent];          /* images file format (file magic) */
 
   size_t
-    magick_columns,
+    magick_columns,     /* size of image when read/created */
     magick_rows;
 
   BlobInfo
index 478966c5c3c8a5d89ecde1341de113e90661db4d..50db725d594469ef99a550981320bd4095dc7be4 100644 (file)
@@ -119,25 +119,38 @@ static const OptionInfo
   ChannelOptions[] =
   {
     { "Undefined", UndefinedChannel, UndefinedOptionFlag, MagickTrue },
+    /* special */
     { "All", CompositeChannels, UndefinedOptionFlag, MagickFalse },
+    { "Sync", SyncChannels, UndefinedOptionFlag, MagickFalse },
+    { "Default", DefaultChannels, UndefinedOptionFlag, MagickFalse },
+    /* individual channel */
+    { "A", AlphaChannel, UndefinedOptionFlag, MagickFalse },
     { "Alpha", AlphaChannel, UndefinedOptionFlag, MagickFalse },
     { "Black", BlackChannel, UndefinedOptionFlag, MagickFalse },
+    { "B", BlueChannel, UndefinedOptionFlag, MagickFalse },
     { "Blue", BlueChannel, UndefinedOptionFlag, MagickFalse },
+    { "C", CyanChannel, UndefinedOptionFlag, MagickFalse },
     { "Cyan", CyanChannel, UndefinedOptionFlag, MagickFalse },
-    { "Default", DefaultChannels, UndefinedOptionFlag, MagickFalse },
     { "Gray", GrayChannel, UndefinedOptionFlag, MagickFalse },
+    { "G", GreenChannel, UndefinedOptionFlag, MagickFalse },
     { "Green", GreenChannel, UndefinedOptionFlag, MagickFalse },
+    { "H", RedChannel, UndefinedOptionFlag, MagickFalse },
     { "Hue", RedChannel, UndefinedOptionFlag, MagickFalse },
+    { "K", BlackChannel, UndefinedOptionFlag, MagickFalse },
+    { "L", BlueChannel, UndefinedOptionFlag, MagickFalse },
     { "Lightness", BlueChannel, UndefinedOptionFlag, MagickFalse },
     { "Luminance", BlueChannel, UndefinedOptionFlag, MagickFalse },
     { "Luminosity", BlueChannel, DeprecateOptionFlag, MagickTrue },
+    { "M", MagentaChannel, UndefinedOptionFlag, MagickFalse },
     { "Magenta", MagentaChannel, UndefinedOptionFlag, MagickFalse },
-    { "Matte", AlphaChannel, UndefinedOptionFlag, MagickFalse },
-    { "Opacity", AlphaChannel, UndefinedOptionFlag, MagickFalse },
+    { "Matte", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
+    { "Opacity", AlphaChannel, DeprecateOptionFlag, MagickTrue },/*depreciate*/
+    { "R", RedChannel, UndefinedOptionFlag, MagickFalse },
     { "Red", RedChannel, UndefinedOptionFlag, MagickFalse },
+    { "S", GreenChannel, UndefinedOptionFlag, MagickFalse },
     { "Saturation", GreenChannel, UndefinedOptionFlag, MagickFalse },
+    { "Y", YellowChannel, UndefinedOptionFlag, MagickFalse },
     { "Yellow", YellowChannel, UndefinedOptionFlag, MagickFalse },
-    { "Sync", SyncChannels, UndefinedOptionFlag, MagickFalse },
     { (char *) NULL, UndefinedChannel, UndefinedOptionFlag, MagickFalse }
   },
   ClassOptions[] =
@@ -1361,6 +1374,7 @@ static const OptionInfo
     { "A", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
     { "Alpha", AlphaPixelChannel, UndefinedOptionFlag, MagickFalse },
     { "B", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
+    { "Bk", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
     { "Black", BlackPixelChannel, UndefinedOptionFlag, MagickFalse },
     { "Blue", BluePixelChannel, UndefinedOptionFlag, MagickFalse },
     { "Cb", CbPixelChannel, UndefinedOptionFlag, MagickFalse },
@@ -2354,7 +2368,7 @@ MagickExport ssize_t ParseChannelOption(const char *channels)
       case 'o':
       case 'O':
       {
-        channel|=AlphaChannel;
+        channel|=AlphaChannel; /* depreciate */
         break;
       }
       case 'R':
index ef72e3c8502e5a9f680acaa2e87f4f7791b9502c..117f85a98b343349e6420375f2d03dab4f035f4d 100644 (file)
@@ -608,6 +608,9 @@ WandExport MagickBooleanType CLICatchException(MagickCLI *cli_wand,
 WandExport void CLISettingOptionInfo(MagickCLI *cli_wand,
      const char *option,const char *arg1)
 {
+  ssize_t
+    parse;     /* option argument parsing (string to value table lookup) */
+
   assert(cli_wand != (MagickCLI *) NULL);
   assert(cli_wand->signature == WandSignature);
   assert(cli_wand->wand.signature == WandSignature);
@@ -672,9 +675,12 @@ WandExport void CLISettingOptionInfo(MagickCLI *cli_wand,
              SyncImageSettings() used to set per-image attribute.
 
              FUTURE: if _image_info->background_color is not set then
-             we should fall back to image
-             Note that +background, means fall-back to image background
-             and only if not set fall back to BackgroundColor const.
+             we should fall back to per-image background_color
+
+             At this time -background will 'wipe out' the per-image
+             background color!
+
+             Better error handling of QueryColorCompliance() needed.
           */
           (void) SetImageOption(_image_info,option+1,ArgOption(NULL));
           (void) QueryColorCompliance(ArgOption(BackgroundColor),AllCompliance,
@@ -717,6 +723,7 @@ WandExport void CLISettingOptionInfo(MagickCLI *cli_wand,
         {
           /* FUTURE: both _image_info attribute & ImageOption in use!
              SyncImageSettings() used to set per-image attribute.
+             Better error checking of QueryColorCompliance().
           */
           if (IfSetOption)
             {
@@ -765,22 +772,13 @@ WandExport void CLISettingOptionInfo(MagickCLI *cli_wand,
         }
       if (LocaleCompare("channel",option+1) == 0)
         {
-          /* FUTURE:  -channel mask {vaules}
-             This is also applied to images in SimpleImageOperator!!!
-             Move it to SyncImageSettings() - or alternative
-          */
-          ssize_t
-            channel = DefaultChannels;
-          if ( IfSetOption ) {
-            channel=ParseChannelOption(arg1);
-            if (channel < 0)
-              CLIWandExceptArgBreak(OptionError,"UnrecognizedChannelType",
-                   option,arg1);
-            (void) SetImageOption(_image_info,option+1,arg1);
-          } else {
-            (void) SetImageOption(_image_info,option+1,"default");
-          }
-          _image_info->channel=(ChannelType) channel;
+          arg1=ArgOption("default");
+          parse=ParseChannelOption(arg1);
+          if (parse < 0)
+            CLIWandExceptArgBreak(OptionError,"UnrecognizedChannelType",
+                 option,arg1);
+          _image_info->channel=(ChannelType) parse;
+          (void) SetImageOption(_image_info,option+1,arg1);
           break;
         }
       if (LocaleCompare("colorspace",option+1) == 0)
@@ -789,13 +787,12 @@ WandExport void CLISettingOptionInfo(MagickCLI *cli_wand,
              But also used as a SimpleImageOperator
              Undefined colorspace means don't modify images on
              read or as a operation */
-          ssize_t
-            colorspace = ParseCommandOption(MagickColorspaceOptions,
-                 MagickFalse,ArgOption("undefined"));
-          if (colorspace < 0)
+          parse = ParseCommandOption(MagickColorspaceOptions,MagickFalse,
+                        ArgOption("undefined"));
+          if (parse < 0)
             CLIWandExceptArgBreak(OptionError,"UnrecognizedColorspace",
                                     option,arg1);
-          _image_info->colorspace=(ColorspaceType) colorspace;
+          _image_info->colorspace=(ColorspaceType) parse;
           break;
         }
       if (LocaleCompare("comment",option+1) == 0)
index 437b0f4b12fc6c850b8fd45680d695463d30f321..5e6e03ae55df858babddcebc989dcf8c237ed458 100644 (file)
           no clip path defined
         </message>
         <message name="NoImagesDefined">
-          no images defined
+          no images defined for operation
         </message>
         <message name="NoImagesForFinalWrite">
-          pas d'images pour écriture finales
+          no images for final write
         </message>
         <message name="NoImageVectorGraphics">
           no image vector graphics
index 4c4549b35dcee3f9fe0e98a433a750bbc1d72fe5..32949f202e47f4ba69b6ee6be7e2c335b19faf64 100644 (file)
           pas de chemin de coupe défini
         </message>
         <message name="NoImagesDefined">
-          pas d'images définies
+          pas d'images définies pour un fonctionnement
         </message>
         <message name="NoImagesForFinalWrite">
-          pas d'images for final write
+          pas d'images pour écriture finales
         </message>
         <message name="NoImageVectorGraphics">
           pas de graphiques vectoriels