*string;
if (image != (Image *) NULL && IfMagickTrue(image->debug))
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
- image->filename);
-
- *value='\0'; /* formated string */
- string=(char *)NULL; /* constant string reference */
+ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
+ *value='\0'; /* formatted string */
+ string=(char *) NULL; /* constant string reference */
switch (letter)
{
-
case 'b': /* image size read in - in bytes */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
case 'g': /* Image geometry, canvas and offset %Wx%H+%X+%Y */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
- (double) image->page.width,(double) image->page.height,
- (double) image->page.x,(double) image->page.y);
+ (double) image->page.width,(double) image->page.height,
+ (double) image->page.x,(double) image->page.y);
break;
}
case 'h': /* Image height (current) */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",
- (double) (image->rows != 0 ? image->rows : image->magick_rows));
+ (double) (image->rows != 0 ? image->rows : image->magick_rows));
break;
}
case 'i': /* Filename last used for image (read or write) */
}
case 'k': /* Number of unique colors */
{
- /* FUTURE: ensure this does not generate the formated comment! */
+ /* FUTURE: ensure this does not generate the formatted comment! */
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- GetNumberColors(image,(FILE *) NULL,exception));
+ GetNumberColors(image,(FILE *) NULL,exception));
break;
}
case 'l': /* Image label properity - empty string by default */
case 'n': /* Number of images in the list. */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- GetImageListLength(image));
+ GetImageListLength(image));
break;
}
case 'o': /* Output Filename - for delegate use only */
case 'p': /* Image index in current image list -- As 'n' OBSOLETE */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- GetImageIndexInList(image));
+ GetImageIndexInList(image));
break;
}
case 'q': /* Quantum depth of image in memory */
if (IfMagickTrue(IsImageGray(image,exception)))
colorspace=GRAYColorspace;
(void) FormatLocaleString(value,MaxTextExtent,"%s %s %s",
- CommandOptionToMnemonic(MagickClassOptions,(ssize_t)image->storage_class),
+ CommandOptionToMnemonic(MagickClassOptions,(ssize_t) image->storage_class),
CommandOptionToMnemonic(MagickColorspaceOptions,(ssize_t) colorspace),
IfMagickTrue(image->matte)?"Matte":"");
break;
{
if (image_info->number_scenes != 0)
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image_info->scene);
+ image_info->scene);
else
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->scene);
+ image->scene);
break;
}
case 't': /* Base filename without directory or extention */
case 'w': /* Image width (current) */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- (image->columns != 0 ? image->columns : image->magick_columns));
+ (image->columns != 0 ? image->columns : image->magick_columns));
break;
}
case 'x': /* Image horizontal resolution (with units) */
{
(void) FormatLocaleString(value,MaxTextExtent,"%g %s",
- image->resolution.x,CommandOptionToMnemonic(
- MagickResolutionOptions,(ssize_t)image->units));
+ image->resolution.x,CommandOptionToMnemonic(
+ MagickResolutionOptions,(ssize_t)image->units));
break;
}
case 'y': /* Image vertical resolution (with units) */
{
(void) FormatLocaleString(value,MaxTextExtent,"%g %s",
- image->resolution.y,CommandOptionToMnemonic(
- MagickResolutionOptions,(ssize_t)image->units));
+ image->resolution.y,CommandOptionToMnemonic(MagickResolutionOptions,
+ (ssize_t) image->units));
break;
}
case 'z': /* Image depth as read in */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->depth);
+ image->depth);
break;
}
case 'A': /* Image alpha channel */
{
(void) FormatLocaleString(value,MaxTextExtent,"%s",
- CommandOptionToMnemonic(MagickBooleanOptions,(ssize_t)
- image->matte));
+ CommandOptionToMnemonic(MagickBooleanOptions,(ssize_t) image->matte));
break;
}
case 'C': /* Image compression method. */
case 'D': /* Image dispose method. */
{
(void) FormatLocaleString(value,MaxTextExtent,"%s",
- CommandOptionToMnemonic(MagickDisposeOptions,(ssize_t)
- image->dispose));
+ CommandOptionToMnemonic(MagickDisposeOptions,(ssize_t) image->dispose));
break;
}
case 'G': /* Image size as geometry = "%wx%h" */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20gx%.20g",
- (double)image->magick_columns,(double) image->magick_rows);
+ (double)image->magick_columns,(double) image->magick_rows);
break;
}
case 'H': /* layer canvas height */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->page.height);
+ image->page.height);
break;
}
case 'M': /* Magick filename - filename given incl. coder & read mods */
}
case 'O': /* layer canvas offset with sign = "+%X+%Y" */
{
- (void) FormatLocaleString(value,MaxTextExtent,"%+ld%+ld",
- (long) image->page.x,(long) image->page.y);
+ (void) FormatLocaleString(value,MaxTextExtent,"%+ld%+ld",(long)
+ image->page.x,(long) image->page.y);
break;
}
case 'P': /* layer canvas page size = "%Wx%H" */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20gx%.20g",
- (double) image->page.width,(double) image->page.height);
+ (double) image->page.width,(double) image->page.height);
break;
}
case 'Q': /* image compression quality */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->quality);
+ image->quality);
break;
}
case 'S': /* Image scenes ???? */
string="2147483647";
else
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image_info->scene+image_info->number_scenes);
+ image_info->scene+image_info->number_scenes);
break;
}
case 'T': /* image time delay for animations */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->delay);
+ image->delay);
break;
}
case 'W': /* layer canvas width */
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->page.width);
+ image->page.width);
break;
}
case 'X': /* layer canvas X offset */
{
- (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->page.x);
+ (void) FormatLocaleString(value,MaxTextExtent,"%+.20g",(double)
+ image->page.x);
break;
}
case 'Y': /* layer canvas Y offset */
{
- (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->page.y);
+ (void) FormatLocaleString(value,MaxTextExtent,"%+.20g",(double)
+ image->page.y);
break;
}
case 'Z': /* Zero filename ??? */
page=GetImageBoundingBox(image,exception);
(void) FormatLocaleString(value,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
- (double) page.width,(double) page.height,
- (double) page.x,(double) page.y);
+ (double) page.width,(double) page.height,(double) page.x,(double)
+ page.y);
break;
}
case '#': /* Image signature */
}
if (*value != '\0')
string=value;
- if (string != (char *)NULL) {
- (void) SetImageArtifact(image, "get-properity", string);
- return(GetImageArtifact(image, "get-properity"));
- }
+ if (string != (char *) NULL)
+ {
+ (void) SetImageArtifact(image, "get-property", string);
+ return(GetImageArtifact(image, "get-property"));
+ }
return((char *)NULL);
}
*string;
assert(property[0] != '\0');
- if ( property[1] == '\0') /* single letter properity request */
- return( GetMagickPropertyLetter(image_info,image,*property,exception) );
-
- if (image != (Image *) NULL && IfMagickTrue(image->debug))
- (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
- image->filename);
-
- *value='\0'; /* formated string */
- string=(char *)NULL; /* constant string reference */
+ if (property[1] == '\0') /* single letter property request */
+ return(GetMagickPropertyLetter(image_info,image,*property,exception));
+ if ((image != (Image *) NULL) && IfMagickTrue(image->debug))
+ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
+ *value='\0'; /* formated string */
+ string=(char *) NULL; /* constant string reference */
switch (*property)
{
case 'b':
if ( (image_info != (ImageInfo *) NULL) &&
(LocaleCompare("group",property) == 0) )
{
- (void) FormatLocaleString(value,MaxTextExtent,"0x%lx",
- (unsigned long) image_info->group);
+ (void) FormatLocaleString(value,MaxTextExtent,"0x%lx",(unsigned long)
+ image_info->group);
break;
}
break;
mean,
standard_deviation;
- (void) GetImageMean(image,&mean,&standard_deviation,
- exception);
+ (void) GetImageMean(image,&mean,&standard_deviation,exception);
(void) FormatLocaleString(value,MaxTextExtent,"%.*g",
GetMagickPrecision(),mean);
break;
image->orientation);
break;
}
- if ( (image_info != (ImageInfo *) NULL) &&
- (LocaleCompare("output",property) == 0) )
+ if ((image_info != (ImageInfo *) NULL) &&
+ (LocaleCompare("output",property) == 0))
{
(void) CopyMagickString(value,image_info->filename,MaxTextExtent);
break;
{
if (LocaleCompare("scene",property) == 0)
{
- if ( (image_info != (ImageInfo *) NULL) &&
- (image_info->number_scenes != 0) )
+ if ((image_info != (ImageInfo *) NULL) &&
+ (image_info->number_scenes != 0))
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image_info->scene);
+ image_info->scene);
else
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
- image->scene);
+ image->scene);
break;
}
if (LocaleCompare("scenes",property) == 0)
}
case 'u':
{
- if ( (image_info != (ImageInfo *) NULL) &&
- (LocaleCompare("unique",property) == 0) )
+ if ((image_info != (ImageInfo *) NULL) &&
+ (LocaleCompare("unique",property) == 0))
{
string=image_info->unique;
break;
(LocaleCompare("x-resolution",property) == 0) )
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",
- image->resolution.x);
+ image->resolution.x);
break;
}
break;
(LocaleCompare("y-resolution",property) == 0) )
{
(void) FormatLocaleString(value,MaxTextExtent,"%.20g",
- image->resolution.y);
+ image->resolution.y);
break;
}
break;
}
case 'z':
{
- if ( (image_info != (ImageInfo *) NULL) &&
- (LocaleCompare("zero",property) == 0) )
+ if ((image_info != (ImageInfo *) NULL) &&
+ (LocaleCompare("zero",property) == 0))
{
string=image_info->zero;
break;
}
if (*value != '\0')
string=value;
- if (string != (char *)NULL) {
- (void) SetImageArtifact(image, "get-properity", string);
- return(GetImageArtifact(image, "get-properity"));
- }
+ if (string != (char *)NULL)
+ {
+ (void) SetImageArtifact(image,"get-property", string);
+ return(GetImageArtifact(image,"get-property"));
+ }
return((char *)NULL);
}
\f