From: anthony Date: Thu, 22 Mar 2012 01:20:28 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5991 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30b912a2e6ab7573f58f0e532e47aff4bccfdaa9;p=imagemagick --- diff --git a/MagickCore/image.h b/MagickCore/image.h index bcc86dad9..6753323d3 100644 --- a/MagickCore/image.h +++ b/MagickCore/image.h @@ -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 diff --git a/MagickCore/option.c b/MagickCore/option.c index 478966c5c..50db725d5 100644 --- a/MagickCore/option.c +++ b/MagickCore/option.c @@ -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': diff --git a/MagickWand/operation.c b/MagickWand/operation.c index ef72e3c85..117f85a98 100644 --- a/MagickWand/operation.c +++ b/MagickWand/operation.c @@ -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) diff --git a/config/english.xml b/config/english.xml index 437b0f4b1..5e6e03ae5 100644 --- a/config/english.xml +++ b/config/english.xml @@ -660,10 +660,10 @@ no clip path defined - no images defined + no images defined for operation - pas d'images pour écriture finales + no images for final write no image vector graphics diff --git a/config/francais.xml b/config/francais.xml index 4c4549b35..32949f202 100644 --- a/config/francais.xml +++ b/config/francais.xml @@ -651,10 +651,10 @@ pas de chemin de coupe défini - pas d'images définies + pas d'images définies pour un fonctionnement - pas d'images for final write + pas d'images pour écriture finales pas de graphiques vectoriels