% July 1992 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2013 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 %
/*
Include declarations.
*/
-#include "magick/studio.h"
-#include "magick/annotate.h"
-#include "magick/attribute.h"
-#include "magick/blob.h"
-#include "magick/blob-private.h"
-#include "magick/cache.h"
-#include "magick/color.h"
-#include "magick/color-private.h"
-#include "magick/colorspace.h"
-#include "magick/constitute.h"
-#include "magick/draw.h"
-#include "magick/exception.h"
-#include "magick/exception-private.h"
-#include "magick/geometry.h"
-#include "magick/image.h"
-#include "magick/image-private.h"
-#include "magick/list.h"
-#include "magick/magick.h"
-#include "magick/memory_.h"
-#include "magick/monitor.h"
-#include "magick/monitor-private.h"
-#include "magick/option.h"
-#include "magick/pixel-private.h"
-#include "magick/quantum-private.h"
-#include "magick/static.h"
-#include "magick/statistic.h"
-#include "magick/string_.h"
-#include "magick/module.h"
+#include "MagickCore/studio.h"
+#include "MagickCore/annotate.h"
+#include "MagickCore/attribute.h"
+#include "MagickCore/blob.h"
+#include "MagickCore/blob-private.h"
+#include "MagickCore/cache.h"
+#include "MagickCore/color.h"
+#include "MagickCore/color-private.h"
+#include "MagickCore/colorspace.h"
+#include "MagickCore/constitute.h"
+#include "MagickCore/draw.h"
+#include "MagickCore/exception.h"
+#include "MagickCore/exception-private.h"
+#include "MagickCore/geometry.h"
+#include "MagickCore/image.h"
+#include "MagickCore/image-private.h"
+#include "MagickCore/list.h"
+#include "MagickCore/magick.h"
+#include "MagickCore/memory_.h"
+#include "MagickCore/monitor.h"
+#include "MagickCore/monitor-private.h"
+#include "MagickCore/option.h"
+#include "MagickCore/pixel-accessor.h"
+#include "MagickCore/quantum-private.h"
+#include "MagickCore/static.h"
+#include "MagickCore/statistic.h"
+#include "MagickCore/string_.h"
+#include "MagickCore/module.h"
\f
/*
Forward declarations.
*/
static MagickBooleanType
- WriteDEBUGImage(const ImageInfo *,Image *);
+ WriteDEBUGImage(const ImageInfo *,Image *,ExceptionInfo *);
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The format of the WriteDEBUGImage method is:
%
% MagickBooleanType WriteDEBUGImage(const ImageInfo *image_info,
-% Image *image)
+% Image *image,ExceptionInfo *exception)
%
% A description of each parameter follows.
%
%
% o image: The image.
%
+% o exception: return any errors or warnings in this structure.
+%
*/
static MagickBooleanType WriteDEBUGImage(const ImageInfo *image_info,
- Image *image)
+ Image *image,ExceptionInfo *exception)
{
char
buffer[MaxTextExtent],
MagickOffsetType
scene;
- MagickPixelPacket
+ PixelInfo
pixel;
- register const IndexPacket
- *indexes;
-
- register const PixelPacket
+ register const Quantum
*p;
register ssize_t
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- status=OpenBlob(image_info,image,WriteBlobMode,&image->exception);
+ status=OpenBlob(image_info,image,WriteBlobMode,exception);
if (status == MagickFalse)
return(status);
scene=0;
MagickColorspaceOptions,(ssize_t) image->colorspace),MaxTextExtent);
LocaleLower(colorspace);
image->depth=GetImageQuantumDepth(image,MagickTrue);
- if (image->matte != MagickFalse)
+ if (image->alpha_trait == BlendPixelTrait)
(void) ConcatenateMagickString(colorspace,"a",MaxTextExtent);
(void) FormatLocaleString(buffer,MaxTextExtent,
"# ImageMagick pixel debugging: %.20g,%.20g,%.20g,%s\n",(double)
- image->columns,(double) image->rows,(double)
- GetQuantumRange(image->depth),colorspace);
+ image->columns,(double) image->rows,(double) ((MagickOffsetType)
+ GetQuantumRange(image->depth)),colorspace);
(void) WriteBlobString(image,buffer);
- GetMagickPixelPacket(image,&pixel);
+ GetPixelInfo(image,&pixel);
for (y=0; y < (ssize_t) image->rows; y++)
{
- p=GetVirtualPixels(image,0,y,image->columns,1,&image->exception);
- if (p == (const PixelPacket *) NULL)
+ p=GetVirtualPixels(image,0,y,image->columns,1,exception);
+ if (p == (const Quantum *) NULL)
break;
- indexes=GetVirtualIndexQueue(image);
for (x=0; x < (ssize_t) image->columns; x++)
{
(void) FormatLocaleString(buffer,MaxTextExtent,"%.20g,%.20g: ",(double)
x,(double) y);
(void) WriteBlobString(image,buffer);
- SetMagickPixelPacket(image,p,indexes+x,&pixel);
+ GetPixelInfoPixel(image,p,&pixel);
(void) FormatLocaleString(tuple,MaxTextExtent,"%.20g,%.20g,%.20g ",
(double) pixel.red,(double) pixel.green,(double) pixel.blue);
if (pixel.colorspace == CMYKColorspace)
black[MaxTextExtent];
(void) FormatLocaleString(black,MaxTextExtent,",%.20g ",
- (double) pixel.index);
+ (double) pixel.black);
(void) ConcatenateMagickString(tuple,black,MaxTextExtent);
}
- if (pixel.matte != MagickFalse)
+ if (pixel.alpha_trait == BlendPixelTrait)
{
char
alpha[MaxTextExtent];
(void) FormatLocaleString(alpha,MaxTextExtent,",%.20g ",
- (double) (QuantumRange-pixel.opacity));
+ (double) pixel.alpha);
(void) ConcatenateMagickString(tuple,alpha,MaxTextExtent);
}
(void) WriteBlobString(image,tuple);
(void) WriteBlobString(image,"\n");
- p++;
+ p+=GetPixelChannels(image);
}
status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
image->rows);