% Image Pixel Values for Debugging. %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% July 1992 %
% %
% %
-% Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
% obtain a copy of the License at %
% %
-% http://www.imagemagick.org/script/license.php %
+% https://www.imagemagick.org/script/license.php %
% %
% Unless required by applicable law or agreed to in writing, software %
% distributed under the License is distributed on an "AS IS" BASIS, %
MagickInfo
*entry;
- entry=SetMagickInfo("DEBUG");
+ entry=AcquireMagickInfo("DEBUG","DEBUG","Image pixel values for debugging");
entry->encoder=(EncodeImageHandler *) WriteDEBUGImage;
- entry->raw=MagickTrue;
- entry->stealth=MagickTrue;
- entry->description=ConstantString("Image pixel values for debugging");
- entry->module=ConstantString("DEBUG");
+ entry->flags|=CoderRawSupportFlag;
+ entry->flags|=CoderStealthFlag;
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
Image *image,ExceptionInfo *exception)
{
char
- buffer[MaxTextExtent],
- colorspace[MaxTextExtent],
- tuple[MaxTextExtent];
+ buffer[MagickPathExtent],
+ colorspace[MagickPathExtent],
+ tuple[MagickPathExtent];
ssize_t
y;
Open output image file.
*/
assert(image_info != (const ImageInfo *) NULL);
- assert(image_info->signature == MagickSignature);
+ assert(image_info->signature == MagickCoreSignature);
assert(image != (Image *) NULL);
- assert(image->signature == MagickSignature);
+ assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
status=OpenBlob(image_info,image,WriteBlobMode,exception);
do
{
(void) CopyMagickString(colorspace,CommandOptionToMnemonic(
- MagickColorspaceOptions,(ssize_t) image->colorspace),MaxTextExtent);
+ MagickColorspaceOptions,(ssize_t) image->colorspace),MagickPathExtent);
LocaleLower(colorspace);
image->depth=GetImageQuantumDepth(image,MagickTrue);
- if (image->alpha_trait == BlendPixelTrait)
- (void) ConcatenateMagickString(colorspace,"a",MaxTextExtent);
- (void) FormatLocaleString(buffer,MaxTextExtent,
+ if (image->alpha_trait != UndefinedPixelTrait)
+ (void) ConcatenateMagickString(colorspace,"a",MagickPathExtent);
+ (void) FormatLocaleString(buffer,MagickPathExtent,
"# ImageMagick pixel debugging: %.20g,%.20g,%.20g,%s\n",(double)
image->columns,(double) image->rows,(double) ((MagickOffsetType)
GetQuantumRange(image->depth)),colorspace);
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g,%.20g: ",(double)
+ (void) FormatLocaleString(buffer,MagickPathExtent,"%.20g,%.20g: ",(double)
x,(double) y);
(void) WriteBlobString(image,buffer);
GetPixelInfoPixel(image,p,&pixel);
- (void) FormatLocaleString(tuple,MaxTextExtent,"%.20g,%.20g,%.20g ",
+ (void) FormatLocaleString(tuple,MagickPathExtent,"%.20g,%.20g,%.20g ",
(double) pixel.red,(double) pixel.green,(double) pixel.blue);
if (pixel.colorspace == CMYKColorspace)
{
char
- black[MaxTextExtent];
+ black[MagickPathExtent];
- (void) FormatLocaleString(black,MaxTextExtent,",%.20g ",
+ (void) FormatLocaleString(black,MagickPathExtent,",%.20g ",
(double) pixel.black);
- (void) ConcatenateMagickString(tuple,black,MaxTextExtent);
+ (void) ConcatenateMagickString(tuple,black,MagickPathExtent);
}
- if (pixel.alpha_trait == BlendPixelTrait)
+ if (pixel.alpha_trait != UndefinedPixelTrait)
{
char
- alpha[MaxTextExtent];
+ alpha[MagickPathExtent];
- (void) FormatLocaleString(alpha,MaxTextExtent,",%.20g ",
+ (void) FormatLocaleString(alpha,MagickPathExtent,",%.20g ",
(double) pixel.alpha);
- (void) ConcatenateMagickString(tuple,alpha,MaxTextExtent);
+ (void) ConcatenateMagickString(tuple,alpha,MagickPathExtent);
}
(void) WriteBlobString(image,tuple);
(void) WriteBlobString(image,"\n");