// Default constructor
Magick::Color::Color ( void )
- : _pixel(new PixelPacket),
+ : _pixel(new PixelInfo),
_pixelOwn(true),
_isValid(false),
_pixelType(RGBPixel)
Magick::Color::Color ( Quantum red_,
Quantum green_,
Quantum blue_ )
- : _pixel(new PixelPacket),
+ : _pixel(new PixelInfo),
_pixelOwn(true),
_isValid(true),
_pixelType(RGBPixel)
Quantum green_,
Quantum blue_,
Quantum alpha_ )
- : _pixel(new PixelPacket),
+ : _pixel(new PixelInfo),
_pixelOwn(true),
_isValid(true),
_pixelType(RGBAPixel)
// Copy constructor
Magick::Color::Color ( const Magick::Color & color_ )
- : _pixel( new PixelPacket ),
+ : _pixel( new PixelInfo ),
_pixelOwn( true ),
_isValid( color_._isValid ),
_pixelType( color_._pixelType )
// Construct from color expressed as C++ string
Magick::Color::Color ( const std::string &x11color_ )
- : _pixel(new PixelPacket),
+ : _pixel(new PixelInfo),
_pixelOwn(true),
_isValid(true),
_pixelType(RGBPixel)
// Construct from color expressed as C string
Magick::Color::Color ( const char * x11color_ )
- : _pixel(new PixelPacket),
+ : _pixel(new PixelInfo),
_pixelOwn(true),
_isValid(true),
_pixelType(RGBPixel)
*this = x11color_;
}
-// Construct color via ImageMagick PixelPacket
-Magick::Color::Color ( const PixelPacket &color_ )
- : _pixel(new PixelPacket),
+// Construct color via ImageMagick PixelInfo
+Magick::Color::Color ( const PixelInfo &color_ )
+ : _pixel(new PixelInfo),
_pixelOwn(true), // We allocated this pixel
_isValid(true),
_pixelType(RGBPixel) // RGB pixel by default
_pixelType = RGBAPixel;
}
-// Protected constructor to construct with PixelPacket*
+// Protected constructor to construct with PixelInfo*
// Used to point Color at a pixel.
-Magick::Color::Color ( PixelPacket* rep_, PixelType pixelType_ )
+Magick::Color::Color ( PixelInfo* rep_, PixelType pixelType_ )
: _pixel(rep_),
_pixelOwn(false),
_isValid(true),
const Magick::Color& Magick::Color::operator = ( const std::string &x11color_ )
{
initPixel();
- PixelPacket target_color;
+ PixelInfo target_color;
ExceptionInfo exception;
GetExceptionInfo( &exception );
if ( QueryColorCompliance( x11color_.c_str(), AllCompliance, &target_color, &exception ) )
return std::string(colorbuf);
}
-// Set color via ImageMagick PixelPacket
-const Magick::Color& Magick::Color::operator= ( const MagickCore::PixelPacket &color_ )
+// Set color via ImageMagick PixelInfo
+const Magick::Color& Magick::Color::operator= ( const MagickCore::PixelInfo &color_ )
{
*_pixel = color_;
if ( color_.alpha != OpaqueAlpha )
// Set pixel
// Used to point Color at a pixel in an image
-void Magick::Color::pixel ( PixelPacket* rep_, PixelType pixelType_ )
+void Magick::Color::pixel ( PixelInfo* rep_, PixelType pixelType_ )
{
if ( _pixelOwn )
delete _pixel;
if ( !_pixelOwn )
{
- _pixel = new PixelPacket;
+ _pixel = new PixelInfo;
_pixelOwn = true;
}
void Magick::DrawableFillColor::operator()
( MagickCore::DrawingWand * context_ ) const
{
- PixelPacket color = static_cast<PixelPacket>(_color);
+ PixelInfo color = static_cast<PixelInfo>(_color);
PixelWand *pixel_wand=NewPixelWand();
PixelSetQuantumPacket(pixel_wand,&color);
DrawSetFillColor(context_,pixel_wand);
void Magick::DrawableStrokeColor::operator()
( MagickCore::DrawingWand * context_ ) const
{
- PixelPacket color = static_cast<PixelPacket>(_color);
+ PixelInfo color = static_cast<PixelInfo>(_color);
PixelWand *pixel_wand=NewPixelWand();
PixelSetQuantumPacket(pixel_wand,&color);
DrawSetStrokeColor(context_,pixel_wand);
void Magick::DrawableTextUnderColor::operator()
( MagickCore::DrawingWand * context_ ) const
{
- PixelPacket color = static_cast<PixelPacket>(_color);
+ PixelInfo color = static_cast<PixelInfo>(_color);
PixelWand *pixel_wand=NewPixelWand();
PixelSetQuantumPacket(pixel_wand,&color);
DrawSetTextUnderColor(context_,pixel_wand);
GetExceptionInfo( &exceptionInfo );
PixelInfo target;
GetPixelInfo(image(),&target);
- PixelPacket pixel=static_cast<PixelPacket>(penColor_);
+ PixelInfo pixel=static_cast<PixelInfo>(penColor_);
target.red=pixel.red;
target.green=pixel.green;
target.blue=pixel.blue;
modifyImage();
PixelInfo target;
GetPixelInfo(image(),&target);
- PixelPacket pixel=static_cast<PixelPacket>(pixelColor(x_,y_));
+ PixelInfo pixel=static_cast<PixelInfo>(pixelColor(x_,y_));
target.red=pixel.red;
target.green=pixel.green;
target.blue=pixel.blue;
PixelInfo target;
GetPixelInfo(constImage(),&target);
- target.red=static_cast<PixelPacket>(borderColor_).red;
- target.green=static_cast<PixelPacket>(borderColor_).green;
- target.blue=static_cast<PixelPacket>(borderColor_).blue;
+ target.red=static_cast<PixelInfo>(borderColor_).red;
+ target.green=static_cast<PixelInfo>(borderColor_).green;
+ target.blue=static_cast<PixelInfo>(borderColor_).blue;
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
FloodfillPaintImage ( image(),
modifyImage();
PixelInfo target;
GetPixelInfo(constImage(),&target);
- target.red=static_cast<PixelPacket>(target_).red;
- target.green=static_cast<PixelPacket>(target_).green;
- target.blue=static_cast<PixelPacket>(target_).blue;
+ target.red=static_cast<PixelInfo>(target_).red;
+ target.green=static_cast<PixelInfo>(target_).green;
+ target.blue=static_cast<PixelInfo>(target_).blue;
target.alpha=alpha_;
ChannelType channel_mask = SetPixelChannelMask( image(), AlphaChannel );
ExceptionInfo exceptionInfo;
// color map and then set to DirectClass type.
modifyImage();
SyncImage( image() );
- image()->colormap = (PixelPacket *)
+ image()->colormap = (PixelInfo *)
RelinquishMagickMemory( image()->colormap );
image()->storage_class = static_cast<MagickCore::ClassType>(DirectClass);
return;
{
// Allocate colormap
imageptr->colormap =
- static_cast<PixelPacket*>(AcquireMagickMemory(entries_*sizeof(PixelPacket)));
+ static_cast<PixelInfo*>(AcquireMagickMemory(entries_*sizeof(PixelInfo)));
imageptr->colors = 0;
}
else if ( entries_ > imageptr->colors )
{
// Re-allocate colormap
- imageptr->colormap=(PixelPacket *)
- ResizeMagickMemory(imageptr->colormap,(entries_)*sizeof(PixelPacket));
+ imageptr->colormap=(PixelInfo *)
+ ResizeMagickMemory(imageptr->colormap,(entries_)*sizeof(PixelInfo));
}
// Initialize any new colormap entries as all black
Pixels pixels(*this);
// Set pixel value
Quantum *pixel = pixels.get(x_, y_, 1, 1 );
- PixelPacket packet = color_;
- MagickCore::SetPixelPacket(constImage(),&packet,pixel);
+ PixelInfo packet = color_;
+ MagickCore::SetPixelPixelInfo(constImage(),&packet,pixel);
// Tell ImageMagick that pixels have been updated
pixels.sync();
const Quantum* pixel = getConstPixels( x_, y_, 1, 1 );
if ( pixel )
{
- PixelPacket packet;
- MagickCore::GetPixelPacketPixel(constImage(),pixel,&packet);
+ PixelInfo packet;
+ MagickCore::GetPixelInfoPixel(constImage(),pixel,&packet);
return Color( packet );
}
// Return X11 color specification string
/* virtual */ operator std::string() const;
- // Return ImageMagick PixelPacket
- operator PixelPacket() const;
+ // Return ImageMagick PixelInfo
+ operator PixelInfo() const;
- // Construct color via ImageMagick PixelPacket
- Color ( const PixelPacket &color_ );
+ // Construct color via ImageMagick PixelInfo
+ Color ( const PixelInfo &color_ );
- // Set color via ImageMagick PixelPacket
- const Color& operator= ( const PixelPacket &color_ );
+ // Set color via ImageMagick PixelInfo
+ const Color& operator= ( const PixelInfo &color_ );
//
// Public methods beyond this point are for Magick++ use only.
protected:
- // PixelType specifies the interpretation of PixelPacket members
+ // PixelType specifies the interpretation of PixelInfo members
// RGBPixel:
// Red = red;
// Green = green;
CYMKPixel
};
- // Constructor to construct with PixelPacket*
+ // Constructor to construct with PixelInfo*
// Used to point Color at a pixel in an image
- Color ( PixelPacket* rep_, PixelType pixelType_ );
+ Color ( PixelInfo* rep_, PixelType pixelType_ );
// Set pixel
// Used to point Color at a pixel in an image
- void pixel ( PixelPacket* rep_, PixelType pixelType_ );
+ void pixel ( PixelInfo* rep_, PixelType pixelType_ );
- // PixelPacket represents a color pixel:
+ // PixelInfo represents a color pixel:
// red = red (range 0 to QuantumRange)
// green = green (range 0 to QuantumRange)
// blue = blue (range 0 to QuantumRange)
// alpha = alpha (range OpaqueAlpha=0 to TransparentAlpha=QuantumRange)
// index = PseudoColor colormap index
- PixelPacket* _pixel;
+ PixelInfo* _pixel;
private:
- // Common initializer for PixelPacket representation
+ // Common initializer for PixelInfo representation
void initPixel();
// Set true if we allocated pixel
ColorHSL& operator= ( const Color& color_ );
protected:
- // Constructor to construct with PixelPacket*
- ColorHSL ( PixelPacket* rep_, PixelType pixelType_ );
+ // Constructor to construct with PixelInfo*
+ ColorHSL ( PixelInfo* rep_, PixelType pixelType_ );
};
//
ColorGray& operator= ( const Color& color_ );
protected:
- // Constructor to construct with PixelPacket*
- ColorGray ( PixelPacket* rep_, PixelType pixelType_ );
+ // Constructor to construct with PixelInfo*
+ ColorGray ( PixelInfo* rep_, PixelType pixelType_ );
};
//
ColorMono& operator= ( const Color& color_ );
protected:
- // Constructor to construct with PixelPacket*
- ColorMono ( PixelPacket* rep_, PixelType pixelType_ );
+ // Constructor to construct with PixelInfo*
+ ColorMono ( PixelInfo* rep_, PixelType pixelType_ );
};
//
ColorRGB& operator= ( const Color& color_ );
protected:
- // Constructor to construct with PixelPacket*
- ColorRGB ( PixelPacket* rep_, PixelType pixelType_ );
+ // Constructor to construct with PixelInfo*
+ ColorRGB ( PixelInfo* rep_, PixelType pixelType_ );
};
//
ColorYUV& operator= ( const Color& color_ );
protected:
- // Constructor to construct with PixelPacket*
- ColorYUV ( PixelPacket* rep_, PixelType pixelType_ );
+ // Constructor to construct with PixelInfo*
+ ColorYUV ( PixelInfo* rep_, PixelType pixelType_ );
};
} // namespace Magick
// Color
//
-// Common initializer for PixelPacket representation
+// Common initializer for PixelInfo representation
// Initialized transparent black
inline void Magick::Color::initPixel()
{
return _pixel->alpha;
}
-// Return ImageMagick PixelPacket struct based on color.
-inline Magick::Color::operator MagickCore::PixelPacket () const
+// Return ImageMagick PixelInfo struct based on color.
+inline Magick::Color::operator MagickCore::PixelInfo () const
{
return *_pixel;
}
//
// ColorHSL
//
-inline Magick::ColorHSL::ColorHSL ( Magick::PixelPacket* rep_,
+inline Magick::ColorHSL::ColorHSL ( Magick::PixelInfo* rep_,
Magick::Color::PixelType pixelType_ )
: Color( rep_, pixelType_ )
{
//
// ColorGray
//
-inline Magick::ColorGray::ColorGray ( Magick::PixelPacket* rep_,
+inline Magick::ColorGray::ColorGray ( Magick::PixelInfo* rep_,
Magick::Color::PixelType pixelType_ )
: Color( rep_, pixelType_ )
{
//
// ColorMono
//
-inline Magick::ColorMono::ColorMono ( Magick::PixelPacket* rep_,
+inline Magick::ColorMono::ColorMono ( Magick::PixelInfo* rep_,
Magick::Color::PixelType pixelType_ )
: Color( rep_, pixelType_ )
{
//
// ColorRGB
//
-inline Magick::ColorRGB::ColorRGB ( Magick::PixelPacket* rep_,
+inline Magick::ColorRGB::ColorRGB ( Magick::PixelInfo* rep_,
Magick::Color::PixelType pixelType_ )
: Color( rep_, pixelType_ )
{
// ColorYUV
//
-inline Magick::ColorYUV::ColorYUV ( Magick::PixelPacket* rep_,
+inline Magick::ColorYUV::ColorYUV ( Magick::PixelInfo* rep_,
Magick::Color::PixelType pixelType_ )
: Color( rep_, pixelType_ )
{
using MagickCore::PixelsPerInchResolution;
using MagickCore::PixelsPerCentimeterResolution;
- // PixelPacket structure
- using MagickCore::PixelPacket;
+ // PixelInfo structure
+ using MagickCore::PixelInfo;
using MagickCore::Quantum;
// Sparse Color methods
// Obtain histogram array
size_t colors;
- MagickCore::PixelPacket *histogram_array =
+ MagickCore::PixelInfo *histogram_array =
MagickCore::GetImageHistogram( image.constImage(), &colors, &exceptionInfo );
throwException( exceptionInfo );
(void) MagickCore::DestroyExceptionInfo( &exceptionInfo );
}
// Deallocate histogram array
- histogram_array=(MagickCore::PixelPacket *)
+ histogram_array=(MagickCore::PixelInfo *)
MagickCore::RelinquishMagickMemory(histogram_array);
}
#if defined(MAGICKCORE_HDRI_SUPPORT)
#define CLOptions "-DMAGICKCORE_HDRI_SUPPORT=1 -DCLQuantum=float " \
"-DCLPixelType=float4 -DQuantumRange=%g -DMagickEpsilon=%g"
-#define CLPixelPacket cl_float4
+#define CLPixelInfo cl_float4
#else
#if (MAGICKCORE_QUANTUM_DEPTH == 8)
#define CLOptions "-DCLQuantum=uchar -DCLPixelType=uchar4 " \
"-DQuantumRange=%g -DMagickEpsilon=%g"
-#define CLPixelPacket cl_uchar4
+#define CLPixelInfo cl_uchar4
#elif (MAGICKCORE_QUANTUM_DEPTH == 16)
#define CLOptions "-DCLQuantum=ushort -DCLPixelType=ushort4 " \
"-DQuantumRange=%g -DMagickEpsilon=%g"
-#define CLPixelPacket cl_ushort4
+#define CLPixelInfo cl_ushort4
#elif (MAGICKCORE_QUANTUM_DEPTH == 32)
#define CLOptions "-DCLQuantum=uint -DCLPixelType=uint4 " \
"-DQuantumRange=%g -DMagickEpsilon=%g"
-#define CLPixelPacket cl_uint4
+#define CLPixelInfo cl_uint4
#elif (MAGICKCORE_QUANTUM_DEPTH == 64)
#define CLOptions "-DCLQuantum=ussize_t -DCLPixelType=ussize_t4 " \
"-DQuantumRange=%g -DMagickEpsilon=%g"
-#define CLPixelPacket cl_ulong4
+#define CLPixelInfo cl_ulong4
#endif
#endif
*/
length=image->columns*image->rows;
convolve_info->pixels=clCreateBuffer(convolve_info->context,(cl_mem_flags)
- (CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR),length*sizeof(CLPixelPacket),
+ (CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR),length*sizeof(CLPixelInfo),
(void *) pixels,&status);
if ((convolve_info->pixels == (cl_mem) NULL) || (status != CL_SUCCESS))
return(MagickFalse);
length=image->columns*image->rows;
convolve_info->convolve_pixels=clCreateBuffer(convolve_info->context,
(cl_mem_flags) (CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR),length*
- sizeof(CLPixelPacket),convolve_pixels,&status);
+ sizeof(CLPixelInfo),convolve_pixels,&status);
if ((convolve_info->convolve_pixels == (cl_mem) NULL) ||
(status != CL_SUCCESS))
return(MagickFalse);
length=image->columns*image->rows;
status=clEnqueueWriteBuffer(convolve_info->command_queue,
- convolve_info->pixels,CL_TRUE,0,length*sizeof(CLPixelPacket),pixels,0,NULL,
+ convolve_info->pixels,CL_TRUE,0,length*sizeof(CLPixelInfo),pixels,0,NULL,
NULL);
length=width*height;
status=clEnqueueWriteBuffer(convolve_info->command_queue,
return(MagickFalse);
length=image->columns*image->rows;
status=clEnqueueReadBuffer(convolve_info->command_queue,
- convolve_info->convolve_pixels,CL_TRUE,0,length*sizeof(CLPixelPacket),
+ convolve_info->convolve_pixels,CL_TRUE,0,length*sizeof(CLPixelInfo),
convolve_pixels,0,NULL,NULL);
if (status != CL_SUCCESS)
return(MagickFalse);
(next->colors > (size_t) visual_info->colormap_size))
break;
for (i=0; i < (ssize_t) images->colors; i++)
- if (IsPixelPacketEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
+ if (IsPixelInfoEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
break;
if (i < (ssize_t) images->colors)
break;
(next->colors > (size_t) visual_info->colormap_size))
break;
for (i=0; i < (ssize_t) images->colors; i++)
- if (IsPixelPacketEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
+ if (IsPixelInfoEquivalent(next->colormap+i,images->colormap+i) == MagickFalse)
break;
if (i < (ssize_t) images->colors)
break;
MagickRealType
fill_opacity;
- PixelPacket
+ PixelInfo
fill_color;
register Quantum
MagickBooleanType
sync;
- PixelPacket
+ PixelInfo
fill_color;
/*
current_depth[id]=1;
if ((image->storage_class == PseudoClass) && (image->matte == MagickFalse))
{
- register const PixelPacket
+ register const PixelInfo
*restrict p;
register ssize_t
image_view=DestroyCacheView(image_view);
if (image->storage_class == PseudoClass)
{
- register PixelPacket
+ register PixelInfo
*restrict p;
register ssize_t
%
% The format of the GetColorInfo method is:
%
-% const PixelPacket *GetColorInfo(const char *name,
+% const PixelInfo *GetColorInfo(const char *name,
% const ComplianceType compliance,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% The format of the GetColorInfo method is:
%
-% const PixelPacket *GetColorInfo(const char *name,
+% const PixelInfo *GetColorInfo(const char *name,
% ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% The format of the IsEquivalentAlpha method is:
%
-% void IsEquivalentAlpha(const Image *image,const PixelPacket *p,
-% const PixelPacket *q)
+% void IsEquivalentAlpha(const Image *image,const PixelInfo *p,
+% const PixelInfo *q)
%
% A description of each parameter follows:
%
}
MagickExport MagickBooleanType IsEquivalentAlpha(const Image *image,
- const PixelPacket *p,const PixelPacket *q)
+ const PixelInfo *p,const PixelInfo *q)
{
MagickRealType
fuzz,
% The format of the QueryColorCompliance method is:
%
% MagickBooleanType QueryColorCompliance(const char *name,
-% const ComplianceType compliance,PixelPacket *color,
+% const ComplianceType compliance,PixelInfo *color,
% ExceptionInfo *exception)
%
% A description of each parameter follows:
}
MagickExport MagickBooleanType QueryColorCompliance(const char *name,
- const ComplianceType compliance,PixelPacket *color,ExceptionInfo *exception)
+ const ComplianceType compliance,PixelInfo *color,ExceptionInfo *exception)
{
MagickBooleanType
status;
% The format of the QueryColorname method is:
%
% MagickBooleanType QueryColorname(const Image *image,
-% const PixelPacket *color,const ComplianceType compliance,char *name,
+% const PixelInfo *color,const ComplianceType compliance,char *name,
% ExceptionInfo *exception)
%
% A description of each parameter follows.
%
*/
MagickExport MagickBooleanType QueryColorname(const Image *image,
- const PixelPacket *color,const ComplianceType compliance,char *name,
+ const PixelInfo *color,const ComplianceType compliance,char *name,
ExceptionInfo *exception)
{
PixelInfo
char
c;
- PixelLongPacket
+ PixelPacket
pixel;
QuantumAny
(LocaleCompare(colorspace,"HSL") == 0) ||
(LocaleCompare(colorspace,"HWB") == 0))
{
- PixelPacket
+ PixelInfo
pixel;
scale=1.0/360.0;
% The format of the QueryMagickColorname method is:
%
% MagickBooleanType QueryMagickColorname(const Image *image,
-% const PixelPacket *color,const ComplianceType compliance,char *name,
+% const PixelInfo *color,const ComplianceType compliance,char *name,
% ExceptionInfo *exception)
%
% A description of each parameter follows.
**GetColorInfoList(const char *,size_t *,ExceptionInfo *);
extern MagickExport MagickBooleanType
- IsEquivalentAlpha(const Image *,const PixelPacket *,const PixelPacket *),
+ IsEquivalentAlpha(const Image *,const PixelInfo *,const PixelInfo *),
IsEquivalentImage(const Image *,const Image *,ssize_t *x,ssize_t *y,
ExceptionInfo *),
ListColorInfo(FILE *,ExceptionInfo *),
- QueryColorCompliance(const char *,const ComplianceType,PixelPacket *,
+ QueryColorCompliance(const char *,const ComplianceType,PixelInfo *,
ExceptionInfo *),
- QueryColorname(const Image *,const PixelPacket *,const ComplianceType,char *,
+ QueryColorname(const Image *,const PixelInfo *,const ComplianceType,char *,
ExceptionInfo *),
QueryMagickColorCompliance(const char *,const ComplianceType,PixelInfo *,
ExceptionInfo *),
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
image->colors=colors;
length=(size_t) colors;
- if (image->colormap == (PixelPacket *) NULL)
- image->colormap=(PixelPacket *) AcquireQuantumMemory(length,
+ if (image->colormap == (PixelInfo *) NULL)
+ image->colormap=(PixelInfo *) AcquireQuantumMemory(length,
sizeof(*image->colormap));
else
- image->colormap=(PixelPacket *) ResizeQuantumMemory(image->colormap,length,
+ image->colormap=(PixelInfo *) ResizeQuantumMemory(image->colormap,length,
sizeof(*image->colormap));
- if (image->colormap == (PixelPacket *) NULL)
+ if (image->colormap == (PixelInfo *) NULL)
ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
image->filename);
for (i=0; i < (ssize_t) image->colors; i++)
if (index < 0)
index+=(ssize_t) image->colors;
SetPixelIndex(image,(Quantum) index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
static int IntensityCompare(const void *x,const void *y)
{
- const PixelPacket
+ const PixelInfo
*color_1,
*color_2;
int
intensity;
- color_1=(const PixelPacket *) x;
- color_2=(const PixelPacket *) y;
- intensity=(int) GetPixelPacketIntensity(color_2)-(int)
- GetPixelPacketIntensity(color_1);
+ color_1=(const PixelInfo *) x;
+ color_2=(const PixelInfo *) y;
+ intensity=(int) GetPixelInfoIntensity(color_2)-(int)
+ GetPixelInfoIntensity(color_1);
return(intensity);
}
{
index=(Quantum) pixels[(ssize_t) GetPixelIndex(image,q)];
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
return(Sa*p-Sa*Da*q+Da*q);
}
-static inline void CompositePixelOver(const Image *image,const PixelPacket *p,
+static inline void CompositePixelOver(const Image *image,const PixelInfo *p,
const MagickRealType alpha,const Quantum *q,const MagickRealType beta,
Quantum *composite)
{
{
index=(Quantum) (*p++);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
}
case ReplaceMethod:
{
- PixelPacket
+ PixelInfo
pixel,
target;
break;
for (x=0; x < (int) (*image)->columns; x++)
{
- GetPixelPacketPixel(*image,q,&pixel);
- if (IsFuzzyEquivalencePixelPacket(*image,&pixel,&target))
+ GetPixelInfoPixel(*image,q,&pixel);
+ if (IsFuzzyEquivalencePixelInfo(&pixel,&target))
{
SetPixelRed(*image,ScaleShortToQuantum(
color.red),q);
else
{
for (i=0; i < (ssize_t) (*image)->colors; i++)
- if (IsFuzzyEquivalencePixelPacket(*image,(*image)->colormap+i,&target))
+ if (IsFuzzyEquivalencePixelInfo((*image)->colormap+i,&target))
{
(*image)->colormap[i].red=ScaleShortToQuantum(
color.red);
ssize_t
bytes;
- bytes=(ssize_t) ((*image)->columns*(*image)->rows*sizeof(PixelPacket));
+ bytes=(ssize_t) ((*image)->columns*(*image)->rows*sizeof(PixelInfo));
if (undo_image != (Image *) NULL)
{
/*
while (previous_image != (Image *) NULL)
{
bytes+=previous_image->list->columns*previous_image->list->rows*
- sizeof(PixelPacket);
+ sizeof(PixelInfo);
if (bytes <= (ssize_t) (resource_info->undo_cache << 20))
{
previous_image=GetPreviousImageInList(previous_image);
continue;
}
bytes-=previous_image->list->columns*previous_image->list->rows*
- sizeof(PixelPacket);
+ sizeof(PixelInfo);
if (previous_image == undo_image)
undo_image=NewImageList();
else
}
case ReplaceMethod:
{
- PixelPacket
+ PixelInfo
pixel,
target;
break;
for (x=0; x < (int) (*image)->columns; x++)
{
- GetPixelPacketPixel(*image,q,&pixel);
- if (IsFuzzyEquivalencePixelPacket(*image,&pixel,&target))
+ GetPixelInfoPixel(*image,q,&pixel);
+ if (IsFuzzyEquivalencePixelInfo(&pixel,&target))
SetPixelAlpha(*image,(Quantum) StringToLong(matte),q);
q+=GetPixelChannels(*image);
}
x_offset,
y_offset;
- PixelPacket
+ PixelInfo
pixel;
Quantum
Ensure all the images exist.
*/
tile=0;
+ GetPixelInfo(image,&pixel);
for (p=image->directory; *p != '\0'; p++)
{
CacheView
break;
for (j=0; j < (int) width; j++)
{
- SetPixelPacket(image,&pixel,s);
+ SetPixelPixelInfo(image,&pixel,s);
s+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
#include "MagickCore/memory_.h"
static inline MagickBooleanType GetFillColor(const DrawInfo *draw_info,
- const ssize_t x,const ssize_t y,PixelPacket *fill,ExceptionInfo *exception)
+ const ssize_t x,const ssize_t y,PixelInfo *fill,ExceptionInfo *exception)
{
if (draw_info->fill_pattern == (Image *) NULL)
{
}
static inline MagickBooleanType GetStrokeColor(const DrawInfo *draw_info,
- const ssize_t x,const ssize_t y,PixelPacket *stroke,ExceptionInfo *exception)
+ const ssize_t x,const ssize_t y,PixelInfo *stroke,ExceptionInfo *exception)
{
if (draw_info->stroke_pattern == (Image *) NULL)
{
PointInfo
point;
- PixelPacket
+ PixelInfo
start_color;
PrimitiveInfo
}
if (LocaleCompare("stop-color",keyword) == 0)
{
- PixelPacket
+ PixelInfo
stop_color;
GetMagickToken(q,&q,token);
MagickBooleanType
sync;
- PixelPacket
+ PixelInfo
pixel;
register ssize_t
status=MagickFalse;
continue;
}
+ GetPixelInfo(image,&pixel);
for ( ; x <= stop; x++)
{
if ((x == (ssize_t) ceil(primitive_info->point.x-0.5)) &&
(y == (ssize_t) ceil(primitive_info->point.y-0.5)))
{
(void) GetStrokeColor(draw_info,x,y,&pixel,exception);
- SetPixelPacket(image,&pixel,q);
+ SetPixelPixelInfo(image,&pixel,q);
}
q+=GetPixelChannels(image);
}
fill_opacity,
stroke_opacity;
- PixelPacket
+ PixelInfo
fill_color,
stroke_color;
{
case PointPrimitive:
{
- PixelPacket
+ PixelInfo
fill_color;
register Quantum
case PointMethod:
default:
{
- PixelPacket
+ PixelInfo
pixel;
register Quantum
q=GetCacheViewAuthenticPixels(image_view,x,y,1,1,exception);
if (q == (Quantum *) NULL)
break;
+ GetPixelInfo(image,&pixel);
(void) GetFillColor(draw_info,x,y,&pixel,exception);
- SetPixelPacket(image,&pixel,q);
+ SetPixelPixelInfo(image,&pixel,q);
(void) SyncCacheViewAuthenticPixels(image_view,exception);
break;
}
MagickBooleanType
sync;
- PixelPacket
+ PixelInfo
pixel,
target;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- GetPixelPacketPixel(image,q,&pixel);
- if (IsFuzzyEquivalencePixelPacket(image,&pixel,&target) == MagickFalse)
+ GetPixelInfoPixel(image,q,&pixel);
+ if (IsFuzzyEquivalencePixelInfo(&pixel,&target) == MagickFalse)
{
q+=GetPixelChannels(image);
continue;
}
(void) GetFillColor(draw_info,x,y,&pixel,exception);
- SetPixelPacket(image,&pixel,q);
+ SetPixelPixelInfo(image,&pixel,q);
q+=GetPixelChannels(image);
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
MagickBooleanType
sync;
- PixelPacket
+ PixelInfo
pixel;
+ GetPixelInfo(image,&pixel);
for (y=0; y < (ssize_t) image->rows; y++)
{
register Quantum
for (x=0; x < (ssize_t) image->columns; x++)
{
(void) GetFillColor(draw_info,x,y,&pixel,exception);
- SetPixelPacket(image,&pixel,q);
+ SetPixelPixelInfo(image,&pixel,q);
q+=GetPixelChannels(image);
}
sync=SyncCacheViewAuthenticPixels(image_view,exception);
case PointMethod:
default:
{
- PixelPacket
+ PixelInfo
pixel;
register Quantum
MagickBooleanType
sync;
- PixelPacket
+ PixelInfo
pixel,
target;
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- GetPixelPacketPixel(image,q,&pixel);
- if (IsFuzzyEquivalencePixelPacket(image,&pixel,&target) == MagickFalse)
+ GetPixelInfoPixel(image,q,&pixel);
+ if (IsFuzzyEquivalencePixelInfo(&pixel,&target) == MagickFalse)
{
q+=GetPixelChannels(image);
continue;
MagickBooleanType
sync;
- PixelPacket
+ PixelInfo
pixel;
for (y=0; y < (ssize_t) image->rows; y++)
GravityType
gravity;
- PixelPacket
+ PixelInfo
fill,
stroke;
AlignType
align;
- PixelPacket
+ PixelInfo
undercolor,
border_color;
MagickOffsetType
progress;
- PixelPacket
+ PixelInfo
*cdl_map;
register ssize_t
(void) LogMagickEvent(TransformEvent,GetMagickModule(),
" color_correction.saturation: %g",color_correction.saturation);
}
- cdl_map=(PixelPacket *) AcquireQuantumMemory(MaxMap+1UL,sizeof(*cdl_map));
- if (cdl_map == (PixelPacket *) NULL)
+ cdl_map=(PixelInfo *) AcquireQuantumMemory(MaxMap+1UL,sizeof(*cdl_map));
+ if (cdl_map == (PixelInfo *) NULL)
ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
image->filename);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
}
}
image_view=DestroyCacheView(image_view);
- cdl_map=(PixelPacket *) RelinquishMagickMemory(cdl_map);
+ cdl_map=(PixelInfo *) RelinquishMagickMemory(cdl_map);
return(status);
}
\f
{
typedef struct _ChannelStatistics
{
- PixelDoublePacket
+ PixelInfo
direction[4]; /* horizontal, vertical, left and right diagonals */
} ChannelStatistics;
sum_squares,
variance;
- PixelLongPacket
+ PixelPacket
gray,
*grays;
/*
Form grays.
*/
- grays=(PixelLongPacket *) AcquireQuantumMemory(MaxMap+1UL,sizeof(*grays));
- if (grays == (PixelLongPacket *) NULL)
+ grays=(PixelPacket *) AcquireQuantumMemory(MaxMap+1UL,sizeof(*grays));
+ if (grays == (PixelPacket *) NULL)
{
channel_features=(ChannelFeatures *) RelinquishMagickMemory(
channel_features);
image_view=DestroyCacheView(image_view);
if (status == MagickFalse)
{
- grays=(PixelLongPacket *) RelinquishMagickMemory(grays);
+ grays=(PixelPacket *) RelinquishMagickMemory(grays);
channel_features=(ChannelFeatures *) RelinquishMagickMemory(
channel_features);
return(channel_features);
cooccurrence=(ChannelStatistics **) RelinquishMagickMemory(
cooccurrence);
}
- grays=(PixelLongPacket *) RelinquishMagickMemory(grays);
+ grays=(PixelPacket *) RelinquishMagickMemory(grays);
channel_features=(ChannelFeatures *) RelinquishMagickMemory(
channel_features);
(void) ThrowMagickException(exception,GetMagickModule(),
density_y=(ChannelStatistics *) RelinquishMagickMemory(density_y);
density_xy=(ChannelStatistics *) RelinquishMagickMemory(density_xy);
density_x=(ChannelStatistics *) RelinquishMagickMemory(density_x);
- grays=(PixelLongPacket *) RelinquishMagickMemory(grays);
+ grays=(PixelPacket *) RelinquishMagickMemory(grays);
channel_features=(ChannelFeatures *) RelinquishMagickMemory(
channel_features);
(void) ThrowMagickException(exception,GetMagickModule(),
p+=GetPixelChannels(image);
}
}
- grays=(PixelLongPacket *) RelinquishMagickMemory(grays);
+ grays=(PixelPacket *) RelinquishMagickMemory(grays);
image_view=DestroyCacheView(image_view);
if (status == MagickFalse)
{
MagickBooleanType
status;
- PixelPacket
+ PixelInfo
pixel;
register Quantum
case 0:
{
SetPixelRed(image,SetBit(GetPixelRed(image,q),j,GetBit(
- GetPixelPacketIntensity(&pixel),i)),q);
+ GetPixelInfoIntensity(&pixel),i)),q);
break;
}
case 1:
{
SetPixelGreen(image,SetBit(GetPixelGreen(image,q),j,GetBit(
- GetPixelPacketIntensity(&pixel),i)),q);
+ GetPixelInfoIntensity(&pixel),i)),q);
break;
}
case 2:
{
SetPixelBlue(image,SetBit(GetPixelBlue(image,q),j,GetBit(
- GetPixelPacketIntensity(&pixel),i)),q);
+ GetPixelInfoIntensity(&pixel),i)),q);
break;
}
}
struct _NodeInfo
*child[16];
- PixelPacket
+ PixelInfo
*list;
MagickSizeType
else
{
if (node_info->number_unique == 0)
- node_info->list=(PixelPacket *) AcquireMagickMemory(
+ node_info->list=(PixelInfo *) AcquireMagickMemory(
sizeof(*node_info->list));
else
- node_info->list=(PixelPacket *) ResizeQuantumMemory(node_info->list,
+ node_info->list=(PixelInfo *) ResizeQuantumMemory(node_info->list,
(size_t) (i+1),sizeof(*node_info->list));
- if (node_info->list == (PixelPacket *) NULL)
+ if (node_info->list == (PixelInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",
% The format of the DefineImageHistogram method is:
%
% DefineImageHistogram(const Image *image,NodeInfo *node_info,
-% PixelPacket **unique_colors)
+% PixelInfo **unique_colors)
%
% A description of each parameter follows.
%
%
*/
static void DefineImageHistogram(const Image *image,NodeInfo *node_info,
- PixelPacket **histogram)
+ PixelInfo **histogram)
{
register ssize_t
i;
DefineImageHistogram(image,node_info->child[i],histogram);
if (node_info->level == (MaxTreeDepth-1))
{
- register PixelPacket
+ register PixelInfo
*p;
p=node_info->list;
for (i=0; i < (ssize_t) number_children; i++)
if (node_info->child[i] != (NodeInfo *) NULL)
DestroyColorCube(image,node_info->child[i]);
- if (node_info->list != (PixelPacket *) NULL)
- node_info->list=(PixelPacket *) RelinquishMagickMemory(node_info->list);
+ if (node_info->list != (PixelInfo *) NULL)
+ node_info->list=(PixelInfo *) RelinquishMagickMemory(node_info->list);
}
\f
/*
% o exception: return any errors or warnings in this structure.
%
*/
-MagickExport PixelPacket *GetImageHistogram(const Image *image,
+MagickExport PixelInfo *GetImageHistogram(const Image *image,
size_t *number_colors,ExceptionInfo *exception)
{
- PixelPacket
+ PixelInfo
*histogram;
CubeInfo
*cube_info;
*number_colors=0;
- histogram=(PixelPacket *) NULL;
+ histogram=(PixelInfo *) NULL;
cube_info=ClassifyImageColors(image,exception);
if (cube_info != (CubeInfo *) NULL)
{
- histogram=(PixelPacket *) AcquireQuantumMemory((size_t) cube_info->colors,
+ histogram=(PixelInfo *) AcquireQuantumMemory((size_t) cube_info->colors,
sizeof(*histogram));
- if (histogram == (PixelPacket *) NULL)
+ if (histogram == (PixelInfo *) NULL)
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename);
else
{
- PixelPacket
+ PixelInfo
*root;
*number_colors=cube_info->colors;
Add this unique color to the color list.
*/
if (node_info->number_unique == 0)
- node_info->list=(PixelPacket *) AcquireMagickMemory(
+ node_info->list=(PixelInfo *) AcquireMagickMemory(
sizeof(*node_info->list));
else
- node_info->list=(PixelPacket *) ResizeQuantumMemory(node_info->list,
+ node_info->list=(PixelInfo *) ResizeQuantumMemory(node_info->list,
(size_t) (i+1),sizeof(*node_info->list));
- if (node_info->list == (PixelPacket *) NULL)
+ if (node_info->list == (PixelInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",
Add this unique color to the color list.
*/
if (node_info->number_unique == 0)
- node_info->list=(PixelPacket *) AcquireMagickMemory(
+ node_info->list=(PixelInfo *) AcquireMagickMemory(
sizeof(*node_info->list));
else
- node_info->list=(PixelPacket *) ResizeQuantumMemory(node_info->list,
+ node_info->list=(PixelInfo *) ResizeQuantumMemory(node_info->list,
(size_t) (i+1),sizeof(*node_info->list));
- if (node_info->list == (PixelPacket *) NULL)
+ if (node_info->list == (PixelInfo *) NULL)
{
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",
static int HistogramCompare(const void *x,const void *y)
{
- const PixelPacket
+ const PixelInfo
*color_1,
*color_2;
- color_1=(const PixelPacket *) x;
- color_2=(const PixelPacket *) y;
+ color_1=(const PixelInfo *) x;
+ color_2=(const PixelInfo *) y;
if (color_2->red != color_1->red)
return((int) color_1->red-(int) color_2->red);
if (color_2->green != color_1->green)
hex[MaxTextExtent],
tuple[MaxTextExtent];
- PixelPacket
+ PixelInfo
*histogram;
MagickBooleanType
PixelInfo
pixel;
- register PixelPacket
+ register PixelInfo
*p;
register ssize_t
return(number_colors);
}
histogram=GetImageHistogram(image,&number_colors,exception);
- if (histogram == (PixelPacket *) NULL)
+ if (histogram == (PixelInfo *) NULL)
return(number_colors);
qsort((void *) histogram,(size_t) number_colors,sizeof(*histogram),
HistogramCompare);
p++;
}
(void) fflush(file);
- histogram=(PixelPacket *) RelinquishMagickMemory(histogram);
+ histogram=(PixelInfo *) RelinquishMagickMemory(histogram);
if (status == MagickFalse)
return(0);
return(number_colors);
node_info->child[i],exception);
if (node_info->level == (MaxTreeDepth-1))
{
- register PixelPacket
+ register PixelInfo
*p;
register Quantum
extern "C" {
#endif
-extern MagickExport PixelPacket
+extern MagickExport PixelInfo
*GetImageHistogram(const Image *,size_t *,ExceptionInfo *);
extern MagickExport Image
PixelInfo
pixel;
- register PixelPacket
+ register PixelInfo
*restrict p;
GetPixelInfo(image,&pixel);
clone_image->columns=image->columns;
clone_image->rows=image->rows;
clone_image->dither=image->dither;
- if (image->colormap != (PixelPacket *) NULL)
+ if (image->colormap != (PixelInfo *) NULL)
{
/*
Allocate and copy the image colormap.
*/
clone_image->colors=image->colors;
length=(size_t) image->colors;
- clone_image->colormap=(PixelPacket *) AcquireQuantumMemory(length,
+ clone_image->colormap=(PixelInfo *) AcquireQuantumMemory(length,
sizeof(*clone_image->colormap));
- if (clone_image->colormap == (PixelPacket *) NULL)
+ if (clone_image->colormap == (PixelInfo *) NULL)
ThrowImageException(ResourceLimitError,"MemoryAllocationFailed");
(void) CopyMagickMemory(clone_image->colormap,image->colormap,length*
sizeof(*clone_image->colormap));
image->montage=DestroyString(image->montage);
if (image->directory != (char *) NULL)
image->directory=DestroyString(image->directory);
- if (image->colormap != (PixelPacket *) NULL)
- image->colormap=(PixelPacket *) RelinquishMagickMemory(image->colormap);
+ if (image->colormap != (PixelInfo *) NULL)
+ image->colormap=(PixelInfo *) RelinquishMagickMemory(image->colormap);
if (image->geometry != (char *) NULL)
image->geometry=DestroyString(image->geometry);
DestroyImageProfiles(image);
PixelInfo
background;
- PixelPacket
+ PixelInfo
pixel;
ssize_t
PixelInfo
background;
- PixelPacket
+ PixelInfo
pixel;
ssize_t
{
index=PushColormapIndex(image,(size_t) GetPixelIndex(image,q),
&range_exception);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
colors; /* Size of color table, or actual color count if known */
/* Only valid if image is not DirectClass */
- PixelPacket
+ PixelInfo
*colormap,
background_color, /* current background color attribute */
border_color, /* current bordercolor attribute */
MagickBooleanType
black_point_compensation;
- PixelPacket
+ PixelInfo
transparent_color; /* color for 'transparent' color index in GIF */
struct _Image
pointsize,
fuzz; /* current color fuzz attribute */
- PixelPacket
+ PixelInfo
background_color,
border_color,
matte_color;
VirtualPixelMethod
virtual_pixel_method;
- PixelPacket
+ PixelInfo
transparent_color;
void
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-/* #undef BUILD_MODULES */
+#ifndef MAGICKCORE_BUILD_MODULES
+#define MAGICKCORE_BUILD_MODULES 1
+#endif
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
#endif
/* Define if you have FFTW library */
-/* #undef FFTW_DELEGATE */
+#ifndef MAGICKCORE_FFTW_DELEGATE
+#define MAGICKCORE_FFTW_DELEGATE 1
+#endif
/* Location of filter modules */
#ifndef MAGICKCORE_FILTER_PATH
#endif
/* Define to 1 if you have the <CL/cl.h> header file. */
-/* #undef HAVE_CL_CL_H */
+#ifndef MAGICKCORE_HAVE_CL_CL_H
+#define MAGICKCORE_HAVE_CL_CL_H 1
+#endif
/* Define to 1 if you have the <complex.h> header file. */
#ifndef MAGICKCORE_HAVE_COMPLEX_H
#endif
/* Define if you have JBIG library */
-/* #undef JBIG_DELEGATE */
+#ifndef MAGICKCORE_JBIG_DELEGATE
+#define MAGICKCORE_JBIG_DELEGATE 1
+#endif
/* Define if you have JPEG version 2 "Jasper" library */
#ifndef MAGICKCORE_JP2_DELEGATE
/* Define to the system default library search path. */
#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/alliance/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/lib64/kicad:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mpich2/lib/:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/octave/3.4.2:/usr/lib64/openmotif:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
#endif
/* The archive extension */
/* #undef NO_MINUS_C_MINUS_O */
/* Define if you have OPENEXR library */
-/* #undef OPENEXR_DELEGATE */
+#ifndef MAGICKCORE_OPENEXR_DELEGATE
+#define MAGICKCORE_OPENEXR_DELEGATE 1
+#endif
/* Define to the address where bug reports for this package should be sent. */
#ifndef MAGICKCORE_PACKAGE_BUGREPORT
#endif
/* Define if you have RSVG library */
-/* #undef RSVG_DELEGATE */
+#ifndef MAGICKCORE_RSVG_DELEGATE
+#define MAGICKCORE_RSVG_DELEGATE 1
+#endif
/* Define to the type of arg 1 for `select'. */
#ifndef MAGICKCORE_SELECT_TYPE_ARG1
/* #undef WITH_DMALLOC */
/* Define if you have WMF library */
-/* #undef WMF_DELEGATE */
+#ifndef MAGICKCORE_WMF_DELEGATE
+#define MAGICKCORE_WMF_DELEGATE 1
+#endif
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
/* #undef _MINIX */
/* Define this for the OpenCL Accelerator */
-/* #undef _OPENCL */
+#ifndef MAGICKCORE__OPENCL
+#define MAGICKCORE__OPENCL 1
+#endif
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#define IsBlobExempt PrependMagickMethod(IsBlobExempt)
#define IsBlobSeekable PrependMagickMethod(IsBlobSeekable)
#define IsBlobTemporary PrependMagickMethod(IsBlobTemporary)
-#define IsFuzzyEquivalencePixelPacket PrependMagickMethod(IsFuzzyEquivalencePixelPacket)
+#define IsFuzzyEquivalencePixelInfo PrependMagickMethod(IsFuzzyEquivalencePixelInfo)
#define IsEventLogging PrependMagickMethod(IsEventLogging)
#define IsGeometry PrependMagickMethod(IsGeometry)
#define IsGlob PrependMagickMethod(IsGlob)
MagickBooleanType
shadow;
- PixelPacket
+ PixelInfo
fill,
stroke,
background_color,
break;
#if MAGICKCORE_QUANTUM_DEPTH == 8
- /* Form of PixelPacket is identical to RGBQUAD when MAGICKCORE_QUANTUM_DEPTH==8 */
- CopyMagickMemory((void*)q,(const void*)p,page.width*sizeof(PixelPacket));
+ /* Form of PixelInfo is identical to RGBQUAD when MAGICKCORE_QUANTUM_DEPTH==8 */
+ CopyMagickMemory((void*)q,(const void*)p,page.width*sizeof(PixelInfo));
q += page.width;
#else /* 16 or 32 bit Quantum */
fill,
pixel;
- PixelPacket
+ PixelInfo
fill_color;
register SegmentInfo
% The format of the GradientImage method is:
%
% MagickBooleanType GradientImage(Image *image,const GradientType type,
-% const SpreadMethod method,const PixelPacket *start_color,
-% const PixelPacket *stop_color,ExceptionInfo *exception)
+% const SpreadMethod method,const PixelInfo *start_color,
+% const PixelInfo *stop_color,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
MagickExport MagickBooleanType GradientImage(Image *image,
const GradientType type,const SpreadMethod method,
- const PixelPacket *start_color,const PixelPacket *stop_color,
+ const PixelInfo *start_color,const PixelInfo *stop_color,
ExceptionInfo *exception)
{
DrawInfo
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- assert(start_color != (const PixelPacket *) NULL);
- assert(stop_color != (const PixelPacket *) NULL);
+ assert(start_color != (const PixelInfo *) NULL);
+ assert(stop_color != (const PixelInfo *) NULL);
draw_info=AcquireDrawInfo();
gradient=(&draw_info->gradient);
gradient->type=type;
draw_info=DestroyDrawInfo(draw_info);
if ((start_color->alpha == OpaqueAlpha) && (stop_color->alpha == OpaqueAlpha))
image->matte=MagickFalse;
- if ((IsPixelPacketGray(start_color) != MagickFalse) &&
- (IsPixelPacketGray(stop_color) != MagickFalse))
+ if ((IsPixelInfoGray(start_color) != MagickFalse) &&
+ (IsPixelInfoGray(stop_color) != MagickFalse))
image->type=GrayscaleType;
return(status);
}
% The format of the OpaquePaintImage method is:
%
% MagickBooleanType OpaquePaintImage(Image *image,
-% const PixelPacket *target,const PixelPacket *fill,
+% const PixelInfo *target,const PixelInfo *fill,
% const MagickBooleanType invert,ExceptionInfo *exception)
%
% A description of each parameter follows:
FloodfillPaintImage(Image *,const DrawInfo *,const PixelInfo *,const ssize_t,
const ssize_t,const MagickBooleanType,ExceptionInfo *),
GradientImage(Image *,const GradientType,const SpreadMethod,
- const PixelPacket *,const PixelPacket *,ExceptionInfo *),
+ const PixelInfo *,const PixelInfo *,ExceptionInfo *),
OpaquePaintImage(Image *,const PixelInfo *,const PixelInfo *,
const MagickBooleanType,ExceptionInfo *),
TransparentPaintImage(Image *,const PixelInfo *,
return(image->channel_map[RedPixelChannel].traits);
}
-static inline void GetPixelPacketPixel(const Image *image,const Quantum *pixel,
- PixelPacket *packet)
+static inline void GetPixelInfoPixel(const Image *image,const Quantum *pixel,
+ PixelInfo *packet)
{
packet->red=(double) pixel[image->channel_map[RedPixelChannel].channel];
packet->green=(double) pixel[image->channel_map[GreenPixelChannel].channel];
packet->alpha=(double) pixel[image->channel_map[AlphaPixelChannel].channel];
}
-static inline Quantum GetPixelPacketIntensity(const PixelPacket *pixel)
-{
-#if !defined(MAGICKCORE_HDRI_SUPPORT)
- if ((pixel->red == pixel->green) && (pixel->green == pixel->blue))
- return((Quantum) pixel->red);
- return((Quantum) (0.299*pixel->red+0.587*pixel->green+0.114*pixel->blue+0.5));
-#else
- {
- double
- alpha,
- beta;
-
- alpha=pixel->red-pixel->green;
- beta=pixel->green-pixel->blue;
- if ((fabs(alpha) <= MagickEpsilon) && (fabs(beta) <= MagickEpsilon))
- return((Quantum) pixel->red);
- return((Quantum) (0.299*pixel->red+0.587*pixel->green+0.114*pixel->blue));
- }
-#endif
-}
-
static inline PixelTrait GetPixelTraits(const Image *image,
const PixelChannel channel)
{
}
static inline MagickBooleanType IsPixelEquivalent(const Image *image,
- const Quantum *p,const PixelPacket *q)
+ const Quantum *p,const PixelInfo *q)
{
if (((double) p[image->channel_map[RedPixelChannel].channel] == q->red) &&
((double) p[image->channel_map[GreenPixelChannel].channel] == q->green) &&
return(MagickFalse);
}
-static inline MagickBooleanType IsPixelPacketEquivalent(const PixelPacket *p,
- const PixelPacket *q)
-{
- if ((p->red == q->red) && (p->green == q->green) && (p->blue == q->blue))
- return(MagickTrue);
- return(MagickFalse);
-}
-
-static inline MagickBooleanType IsPixelPacketGray(const PixelPacket *pixel)
+static inline MagickBooleanType IsPixelInfoGray(const PixelInfo *pixel)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
if ((pixel->red == pixel->green) && (pixel->green == pixel->blue))
return(MagickFalse);
}
-static inline MagickBooleanType IsPixelPacketMonochrome(
- const PixelPacket *pixel)
+static inline MagickBooleanType IsPixelInfoMonochrome(
+ const PixelInfo *pixel)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
if (((pixel->red == 0) || (pixel->red == (Quantum) QuantumRange)) &&
}
static inline void SetPacketPixelInfo(const Image *image,
- const PixelInfo *pixel_info,PixelPacket *packet)
+ const PixelInfo *pixel_info,PixelInfo *packet)
{
packet->red=pixel_info->red;
packet->green=pixel_info->green;
pixel[image->channel_map[IndexPixelChannel].channel];
}
-static inline void SetPixelInfoBias(const Image *image,PixelInfo *pixel_info)
-{
- /*
- Obsoleted by MorphologyApply().
- */
- pixel_info->red=image->bias;
- pixel_info->green=image->bias;
- pixel_info->blue=image->bias;
- pixel_info->alpha=image->bias;
- pixel_info->black=image->bias;
-}
-
static inline void SetPixelInfoPacket(const Image *image,
- const PixelPacket *pixel,PixelInfo *pixel_info)
+ const PixelInfo *pixel,PixelInfo *pixel_info)
{
pixel_info->red=(MagickRealType) pixel->red;
pixel_info->green=(MagickRealType) pixel->green;
image->channel_map[RedPixelChannel].traits=traits;
}
-static inline void SetPixelPacket(const Image *image,const PixelPacket *packet,
- Quantum *pixel)
-{
- pixel[image->channel_map[RedPixelChannel].channel]=
- ClampToQuantum(packet->red);
- pixel[image->channel_map[GreenPixelChannel].channel]=
- ClampToQuantum(packet->green);
- pixel[image->channel_map[BluePixelChannel].channel]=
- ClampToQuantum(packet->blue);
- pixel[image->channel_map[AlphaPixelChannel].channel]=
- ClampToQuantum(packet->alpha);
-}
-
static inline void SetPixelPixelInfo(const Image *image,
const PixelInfo *pixel_info,Quantum *pixel)
{
%
% o image: the image.
%
-% o pixel: Specifies a pointer to a PixelPacket structure.
+% o pixel: Specifies a pointer to a PixelInfo structure.
%
*/
MagickExport void GetPixelInfo(const Image *image,PixelInfo *pixel)
% %
% %
% %
-+ I s F u z z y E q u i v a l e n c e P i x e l P a c k e t %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% IsFuzzyEquivalencePixelPacket() returns MagickTrue if the distance between
-% two pixels is less than the specified distance in a linear three (or four)
-% dimensional color space.
-%
-% The format of the IsFuzzyEquivalencePixelPacket method is:
-%
-% void IsFuzzyEquivalencePixelPacket(const Image *image,
-% const PixelPacket *p,const PixelPacket *q)
-%
-% A description of each parameter follows:
-%
-% o image: the image.
-%
-% o p: Pixel p.
-%
-% o q: Pixel q.
-%
-*/
-MagickExport MagickBooleanType IsFuzzyEquivalencePixelPacket(const Image *image,
- const PixelPacket *p,const PixelPacket *q)
-{
- MagickRealType
- fuzz,
- pixel;
-
- register MagickRealType
- distance,
- scale;
-
- if ((image->fuzz == 0.0) && (image->matte == MagickFalse))
- return(IsPixelPacketEquivalent(p,q));
- fuzz=MagickMax(image->fuzz,(MagickRealType) MagickSQ1_2)*
- MagickMax(image->fuzz,(MagickRealType) MagickSQ1_2);
- scale=1.0;
- distance=0.0;
- if (image->matte != MagickFalse)
- {
- /*
- Transparencies are involved - set alpha distance
- */
- pixel=(MagickRealType) ((image->matte != MagickFalse ? p->alpha :
- OpaqueAlpha)-(image->matte != MagickFalse ? q->alpha : OpaqueAlpha));
- distance=pixel*pixel;
- if (distance > fuzz)
- return(MagickFalse);
- /*
- Generate a alpha scaling factor to generate a 4D cone on colorspace
- Note that if one color is transparent, distance has no color component.
- */
- scale=QuantumScale*p->alpha;
- scale*=QuantumScale*q->alpha;
- if (scale <= MagickEpsilon)
- return(MagickTrue);
- }
- /*
- RGB or CMY color cube
- */
- distance*=3.0; /* rescale appropriately */
- fuzz*=3.0;
- pixel=p->red-(MagickRealType) q->red;
- if ((image->colorspace == HSLColorspace) ||
- (image->colorspace == HSBColorspace) ||
- (image->colorspace == HWBColorspace))
- {
- /*
- Compute an arc distance for hue. It should be a vector angle of
- 'S'/'W' length with 'L'/'B' forming appropriate cones.
- */
- if (fabs((double) pixel) > (QuantumRange/2))
- pixel-=QuantumRange;
- pixel*=2;
- }
- distance+=scale*pixel*pixel;
- if (distance > fuzz)
- return(MagickFalse);
- pixel=(MagickRealType) p->green-q->green;
- distance+=scale*pixel*pixel;
- if (distance > fuzz)
- return(MagickFalse);
- pixel=(MagickRealType) p->blue-q->blue;
- distance+=scale*pixel*pixel;
- if (distance > fuzz)
- return(MagickFalse);
- return(MagickTrue);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
% S e t P i x e l C h a n n e l M a p %
% %
% %
traits;
} PixelChannelMap;
-typedef struct _PixelDoublePacket
-{
- double
- red,
- green,
- blue,
- alpha,
- black;
-} PixelDoublePacket;
-
typedef struct _PixelInfo
{
ClassType
index;
} PixelInfo;
-typedef struct _PixelLongPacket
+typedef struct _PixelPacket
{
unsigned int
red,
blue,
alpha,
black;
-} PixelLongPacket;
-
-typedef struct _PixelPacket
-{
- ClassType
- storage_class;
-
- ColorspaceType
- colorspace;
-
- MagickBooleanType
- matte;
-
- double
- fuzz;
-
- size_t
- depth;
-
- MagickSizeType
- count;
-
- double
- red,
- green,
- blue,
- black,
- alpha,
- index;
} PixelPacket;
typedef struct _CacheView
ExceptionInfo *),
IsFuzzyEquivalencePixel(const Image *,const Quantum *,
const Quantum *),
- IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *),
- IsFuzzyEquivalencePixelPacket(const Image *,const PixelPacket *,
- const PixelPacket *);
+ IsFuzzyEquivalencePixelInfo(const PixelInfo *,const PixelInfo *);
extern MagickExport PixelChannelMap
*AcquirePixelChannelMap(void),
/*
Typdef declarations.
*/
-typedef struct _RealPixelPacket
+typedef struct _RealPixelInfo
{
MagickRealType
red,
green,
blue,
alpha;
-} RealPixelPacket;
+} RealPixelInfo;
typedef struct _NodeInfo
{
MagickSizeType
number_unique;
- RealPixelPacket
+ RealPixelInfo
total_color;
MagickRealType
MagickSizeType
transparent_pixels;
- RealPixelPacket
+ RealPixelInfo
target;
MagickRealType
ssize_t
*cache;
- RealPixelPacket
+ RealPixelInfo
error[ErrorQueueLength];
MagickRealType
*/
static inline void AssociateAlphaPixel(const Image *image,
- const CubeInfo *cube_info,const Quantum *pixel,RealPixelPacket *alpha_pixel)
+ const CubeInfo *cube_info,const Quantum *pixel,RealPixelInfo *alpha_pixel)
{
MagickRealType
alpha;
alpha_pixel->alpha=(MagickRealType) GetPixelAlpha(image,pixel);
}
-static inline void AssociateAlphaPixelPacket(const Image *image,
- const CubeInfo *cube_info,const PixelPacket *pixel,
- RealPixelPacket *alpha_pixel)
+static inline void AssociateAlphaPixelInfo(const Image *image,
+ const CubeInfo *cube_info,const PixelInfo *pixel,
+ RealPixelInfo *alpha_pixel)
{
MagickRealType
alpha;
}
static inline size_t ColorToNodeId(const CubeInfo *cube_info,
- const RealPixelPacket *pixel,size_t index)
+ const RealPixelInfo *pixel,size_t index)
{
size_t
id;
cube=(*cube_info);
for (x=0; x < (ssize_t) image->columns; x+=count)
{
- RealPixelPacket
+ RealPixelInfo
pixel;
register const NodeInfo
*/
for (count=1; (x+count) < (ssize_t) image->columns; count++)
{
- PixelPacket
+ PixelInfo
packet;
- GetPixelPacketPixel(image,q+count*GetPixelChannels(image),&packet);
+ GetPixelInfoPixel(image,q+count*GetPixelChannels(image),&packet);
if (IsPixelEquivalent(image,q,&packet) == MagickFalse)
break;
}
Quantum
intensity;
- register PixelPacket
+ register PixelInfo
*restrict q;
register ssize_t
q=image->colormap;
for (i=0; i < (ssize_t) image->colors; i++)
{
- intensity=(Quantum) ((MagickRealType) GetPixelPacketIntensity(q) <
+ intensity=(Quantum) ((MagickRealType) GetPixelInfoIntensity(q) <
((MagickRealType) QuantumRange/2.0) ? 0 : QuantumRange);
q->red=intensity;
q->green=intensity;
NodeInfo
*node_info;
- RealPixelPacket
+ RealPixelInfo
error,
mid,
midpoint,
*/
for (count=1; (x+(ssize_t) count) < (ssize_t) image->columns; count++)
{
- PixelPacket
+ PixelInfo
packet;
- GetPixelPacketPixel(image,p+count*GetPixelChannels(image),&packet);
+ GetPixelInfoPixel(image,p+count*GetPixelChannels(image),&packet);
if (IsPixelEquivalent(image,p,&packet) == MagickFalse)
break;
}
*/
for (count=1; (x+(ssize_t) count) < (ssize_t) image->columns; count++)
{
- PixelPacket
+ PixelInfo
packet;
- GetPixelPacketPixel(image,p+count*GetPixelChannels(image),&packet);
+ GetPixelInfoPixel(image,p+count*GetPixelChannels(image),&packet);
if (IsPixelEquivalent(image,p,&packet) == MagickFalse)
break;
}
beta,
distance;
- register PixelPacket
+ register PixelInfo
*restrict p;
- register RealPixelPacket
+ register RealPixelInfo
*restrict q;
/*
register MagickRealType
alpha;
- register PixelPacket
+ register PixelInfo
*restrict q;
/*
%
*/
-static RealPixelPacket **DestroyPixelThreadSet(RealPixelPacket **pixels)
+static RealPixelInfo **DestroyPixelThreadSet(RealPixelInfo **pixels)
{
register ssize_t
i;
- assert(pixels != (RealPixelPacket **) NULL);
+ assert(pixels != (RealPixelInfo **) NULL);
for (i=0; i < (ssize_t) GetOpenMPMaximumThreads(); i++)
- if (pixels[i] != (RealPixelPacket *) NULL)
- pixels[i]=(RealPixelPacket *) RelinquishMagickMemory(pixels[i]);
- pixels=(RealPixelPacket **) RelinquishMagickMemory(pixels);
+ if (pixels[i] != (RealPixelInfo *) NULL)
+ pixels[i]=(RealPixelInfo *) RelinquishMagickMemory(pixels[i]);
+ pixels=(RealPixelInfo **) RelinquishMagickMemory(pixels);
return(pixels);
}
-static RealPixelPacket **AcquirePixelThreadSet(const size_t count)
+static RealPixelInfo **AcquirePixelThreadSet(const size_t count)
{
- RealPixelPacket
+ RealPixelInfo
**pixels;
register ssize_t
number_threads;
number_threads=GetOpenMPMaximumThreads();
- pixels=(RealPixelPacket **) AcquireQuantumMemory(number_threads,
+ pixels=(RealPixelInfo **) AcquireQuantumMemory(number_threads,
sizeof(*pixels));
- if (pixels == (RealPixelPacket **) NULL)
- return((RealPixelPacket **) NULL);
+ if (pixels == (RealPixelInfo **) NULL)
+ return((RealPixelInfo **) NULL);
(void) ResetMagickMemory(pixels,0,number_threads*sizeof(*pixels));
for (i=0; i < (ssize_t) number_threads; i++)
{
- pixels[i]=(RealPixelPacket *) AcquireQuantumMemory(count,
+ pixels[i]=(RealPixelInfo *) AcquireQuantumMemory(count,
2*sizeof(**pixels));
- if (pixels[i] == (RealPixelPacket *) NULL)
+ if (pixels[i] == (RealPixelInfo *) NULL)
return(DestroyPixelThreadSet(pixels));
}
return(pixels);
}
static inline ssize_t CacheOffset(CubeInfo *cube_info,
- const RealPixelPacket *pixel)
+ const RealPixelInfo *pixel)
{
#define RedShift(pixel) (((pixel) >> CacheShift) << (0*(8-CacheShift)))
#define GreenShift(pixel) (((pixel) >> CacheShift) << (1*(8-CacheShift)))
MagickBooleanType
status;
- RealPixelPacket
+ RealPixelInfo
**pixels;
ssize_t
Distribute quantization error using Floyd-Steinberg.
*/
pixels=AcquirePixelThreadSet(image->columns);
- if (pixels == (RealPixelPacket **) NULL)
+ if (pixels == (RealPixelInfo **) NULL)
return(MagickFalse);
exception=(&image->exception);
status=MagickTrue;
CubeInfo
cube;
- RealPixelPacket
+ RealPixelInfo
*current,
*previous;
v=(ssize_t) ((y & 0x01) != 0 ? -1 : 1);
for (x=0; x < (ssize_t) image->columns; x++)
{
- RealPixelPacket
+ RealPixelInfo
color,
pixel;
/*
Store the error.
*/
- AssociateAlphaPixelPacket(image,&cube,image->colormap+index,&color);
+ AssociateAlphaPixelInfo(image,&cube,image->colormap+index,&color);
current[u].red=pixel.red-color.red;
current[u].green=pixel.green-color.green;
current[u].blue=pixel.blue-color.blue;
MagickBooleanType
proceed;
- RealPixelPacket
+ RealPixelInfo
color,
pixel;
*/
(void) CopyMagickMemory(p->error,p->error+1,(ErrorQueueLength-1)*
sizeof(p->error[0]));
- AssociateAlphaPixelPacket(image,cube_info,image->colormap+index,&color);
+ AssociateAlphaPixelInfo(image,cube_info,image->colormap+index,&color);
p->error[ErrorQueueLength-1].red=pixel.red-color.red;
p->error[ErrorQueueLength-1].green=pixel.green-color.green;
p->error[ErrorQueueLength-1].blue=pixel.blue-color.blue;
static int IntensityCompare(const void *x,const void *y)
{
- PixelPacket
+ PixelInfo
*color_1,
*color_2;
ssize_t
intensity;
- color_1=(PixelPacket *) x;
- color_2=(PixelPacket *) y;
- intensity=GetPixelPacketIntensity(color_1)-(ssize_t)
- GetPixelPacketIntensity(color_2);
+ color_1=(PixelInfo *) x;
+ color_2=(PixelInfo *) y;
+ intensity=GetPixelInfoIntensity(color_1)-(ssize_t)
+ GetPixelInfoIntensity(color_2);
return((int) intensity);
}
MagickBooleanType
status;
- PixelPacket
+ PixelInfo
*colormap;
register ssize_t
}
for (i=0; i < (ssize_t) image->colors; i++)
image->colormap[i].alpha=(unsigned short) i;
- qsort((void *) image->colormap,image->colors,sizeof(PixelPacket),
+ qsort((void *) image->colormap,image->colors,sizeof(PixelInfo),
IntensityCompare);
- colormap=(PixelPacket *) AcquireQuantumMemory(image->colors,
+ colormap=(PixelInfo *) AcquireQuantumMemory(image->colors,
sizeof(*colormap));
- if (colormap == (PixelPacket *) NULL)
+ if (colormap == (PixelInfo *) NULL)
ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
image->filename);
j=0;
colormap[j]=image->colormap[0];
for (i=0; i < (ssize_t) image->colors; i++)
{
- if (IsPixelPacketEquivalent(&colormap[j],&image->colormap[i]) == MagickFalse)
+ if (IsPixelInfoEquivalent(&colormap[j],&image->colormap[i]) == MagickFalse)
{
j++;
colormap[j]=image->colormap[i];
colormap_index[(ssize_t) image->colormap[i].alpha]=j;
}
image->colors=(size_t) (j+1);
- image->colormap=(PixelPacket *) RelinquishMagickMemory(image->colormap);
+ image->colormap=(PixelInfo *) RelinquishMagickMemory(image->colormap);
image->colormap=colormap;
status=MagickTrue;
image_view=AcquireCacheView(image);
0x00 : 0x01);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
q+=channels;
}
0x00 : 0x01);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
q+=channels;
}
pixel=(unsigned char) ((*p >> 4) & 0xf);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
q+=channels;
pixel=(unsigned char) ((*p) & 0xf);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p++;
q+=channels;
pixel=(unsigned char) ((*p++ >> 4) & 0xf);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
q+=channels;
}
p=PushCharPixel(p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p+=quantum_info->pad;
q+=channels;
SetPixelIndex(image,PushColormapIndex(image,ClampToQuantum(
(MagickRealType) QuantumRange*HalfToSinglePrecision(pixel)),
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p+=quantum_info->pad;
q+=channels;
p=PushShortPixel(endian,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p+=quantum_info->pad;
q+=channels;
p=PushFloatPixel(&quantum_state,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p+=quantum_info->pad;
q+=channels;
p=PushLongPixel(endian,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p+=quantum_info->pad;
q+=channels;
p=PushDoublePixel(&quantum_state,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p+=quantum_info->pad;
q+=channels;
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p+=quantum_info->pad;
q+=channels;
pixel=(unsigned char) ((*p >> 4) & 0xf);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
pixel=(unsigned char) ((*p) & 0xf);
SetPixelAlpha(image,ScaleAnyToQuantum(pixel,range),q);
p=PushCharPixel(p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p=PushCharPixel(p,&pixel);
SetPixelAlpha(image,ScaleCharToQuantum(pixel),q);
SetPixelIndex(image,PushColormapIndex(image,ClampToQuantum(
(MagickRealType) QuantumRange*HalfToSinglePrecision(pixel)),
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p=PushShortPixel(endian,p,&pixel);
SetPixelAlpha(image,ClampToQuantum((MagickRealType)
p=PushShortPixel(endian,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p=PushShortPixel(endian,p,&pixel);
SetPixelAlpha(image,ScaleShortToQuantum(pixel),q);
p=PushFloatPixel(&quantum_state,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p=PushFloatPixel(&quantum_state,p,&pixel);
SetPixelAlpha(image,ClampToQuantum(pixel),q);
p=PushLongPixel(endian,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p=PushLongPixel(endian,p,&pixel);
SetPixelAlpha(image,ScaleLongToQuantum(pixel),q);
p=PushDoublePixel(&quantum_state,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,
ClampToQuantum(pixel),&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p=PushDoublePixel(&quantum_state,p,&pixel);
SetPixelAlpha(image,ClampToQuantum(pixel),q);
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
SetPixelIndex(image,PushColormapIndex(image,pixel,
&range_exception),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
p=PushQuantumPixel(&quantum_state,image->depth,p,&pixel);
SetPixelAlpha(image,ScaleAnyToQuantum(pixel,range),q);
Cluster
*cluster;
- register const PixelPacket
+ register const PixelInfo
*restrict p;
register ssize_t
register ssize_t
i;
- register PixelPacket
+ register PixelInfo
*restrict q;
q=image->colormap;
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "5599"
+#define MagickSVNRevision "exported"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 7,0,0
#define MagickLibAddendum "-0"
#define MagickLibInterface 7
#define MagickLibMinInterface 7
-#define MagickReleaseDate "2011-10-12"
+#define MagickReleaseDate "2011-10-13"
#define MagickChangeDate "20110801"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)
for (levels=0; undo_image != (Image *) NULL; levels++)
{
number_pixels=undo_image->list->columns*undo_image->list->rows;
- bytes+=number_pixels*sizeof(PixelPacket);
+ bytes+=number_pixels*sizeof(PixelInfo);
undo_image=GetPreviousImageInList(undo_image);
}
(void) FormatLocaleFile(file,"Undo Edit Cache\n levels: %u\n",levels);
value,
y;
- PixelPacket
+ PixelInfo
color;
register char
/*
Set this pixel to the background color.
*/
- SetPixelPacket(draw_image,&draw_image->background_color,q);
+ SetPixelPixelInfo(draw_image,&draw_image->background_color,q);
SetPixelAlpha(draw_image,(Quantum) (draw_info->stencil ==
OpaqueStencil ? TransparentAlpha : OpaqueAlpha),q);
}
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% XGetPixelInfo() initializes the PixelPacket structure.
+% XGetPixelInfo() initializes the PixelInfo structure.
%
% The format of the XGetPixelInfo method is:
%
x,
y;
- PixelPacket
+ PixelInfo
pixel;
RectangleInfo
{
index=(Quantum) XGetPixel(ximage,x,y);
SetPixelIndex(composite_image,index,q);
- SetPixelPacket(composite_image,
+ SetPixelPixelInfo(composite_image,
composite_image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(composite_image);
}
foreground=(unsigned char)
(XPixelIntensity(&window->pixel_info->background_color) <
XPixelIntensity(&window->pixel_info->foreground_color) ? 0x80 : 0x00);
- polarity=(unsigned short) ((GetPixelPacketIntensity(
+ polarity=(unsigned short) ((GetPixelInfoIntensity(
&canvas->colormap[0])) < ((Quantum) QuantumRange/2) ? 1 : 0);
if (canvas->colors == 2)
- polarity=GetPixelPacketIntensity(&canvas->colormap[0]) <
- GetPixelPacketIntensity(&canvas->colormap[1]);
+ polarity=GetPixelInfoIntensity(&canvas->colormap[0]) <
+ GetPixelInfoIntensity(&canvas->colormap[1]);
for (y=0; y < (int) canvas->rows; y++)
{
p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,canvas->columns,1,
foreground=(unsigned char)
(XPixelIntensity(&window->pixel_info->background_color) <
XPixelIntensity(&window->pixel_info->foreground_color) ? 0x01 : 0x00);
- polarity=(unsigned short) ((GetPixelPacketIntensity(
+ polarity=(unsigned short) ((GetPixelInfoIntensity(
&canvas->colormap[0])) < ((Quantum) QuantumRange/2) ? 1 : 0);
if (canvas->colors == 2)
- polarity=GetPixelPacketIntensity(&canvas->colormap[0]) <
- GetPixelPacketIntensity(&canvas->colormap[1]);
+ polarity=GetPixelInfoIntensity(&canvas->colormap[0]) <
+ GetPixelInfoIntensity(&canvas->colormap[1]);
for (y=0; y < (int) canvas->rows; y++)
{
p=GetCacheViewVirtualPixels(canvas_view,0,(ssize_t) y,canvas->columns,1,
%
% o target: Specifies the color to lookup in the X color database.
%
-% o color: A pointer to an PixelPacket structure. The RGB value of the target
+% o color: A pointer to an PixelInfo structure. The RGB value of the target
% color is returned as this value.
%
*/
(printf,2,3)));
static void
- MvgAppendColor(DrawingWand *,const PixelPacket *);
+ MvgAppendColor(DrawingWand *,const PixelInfo *);
\f
/*
"Printf" for MVG commands
return(count);
}
-static void MvgAppendColor(DrawingWand *wand,const PixelPacket *packet)
+static void MvgAppendColor(DrawingWand *wand,const PixelInfo *packet)
{
if ((packet->red == 0) && (packet->green == 0) && (packet->blue == 0) &&
(packet->alpha == (Quantum) TransparentAlpha))
WandExport void DrawSetBorderColor(DrawingWand *wand,
const PixelWand *border_wand)
{
- PixelPacket
+ PixelInfo
*current_border,
border_color,
new_border;
new_border=border_color;
current_border=(&CurrentContext->border_color);
if ((wand->filter_off != MagickFalse) ||
- (IsPixelPacketEquivalent(current_border,&new_border) == MagickFalse))
+ (IsPixelInfoEquivalent(current_border,&new_border) == MagickFalse))
{
CurrentContext->border_color=new_border;
(void) MvgPrintf(wand,"border-color '");
*/
WandExport void DrawSetFillColor(DrawingWand *wand,const PixelWand *fill_wand)
{
- PixelPacket
+ PixelInfo
*current_fill,
fill_color,
new_fill;
new_fill=fill_color;
current_fill=(&CurrentContext->fill);
if ((wand->filter_off != MagickFalse) ||
- (IsPixelPacketEquivalent(current_fill,&new_fill) == MagickFalse))
+ (IsPixelInfoEquivalent(current_fill,&new_fill) == MagickFalse))
{
CurrentContext->fill=new_fill;
(void) MvgPrintf(wand,"fill '");
WandExport void DrawSetStrokeColor(DrawingWand *wand,
const PixelWand *stroke_wand)
{
- PixelPacket
+ PixelInfo
*current_stroke,
new_stroke,
stroke_color;
new_stroke=stroke_color;
current_stroke=(&CurrentContext->stroke);
if ((wand->filter_off != MagickFalse) ||
- (IsPixelPacketEquivalent(current_stroke,&new_stroke) == MagickFalse))
+ (IsPixelInfoEquivalent(current_stroke,&new_stroke) == MagickFalse))
{
CurrentContext->stroke=new_stroke;
(void) MvgPrintf(wand,"stroke '");
WandExport void DrawSetTextUnderColor(DrawingWand *wand,
const PixelWand *under_wand)
{
- PixelPacket
+ PixelInfo
under_color;
assert(wand != (DrawingWand *) NULL);
assert(under_wand != (const PixelWand *) NULL);
PixelGetQuantumPacket(under_wand,&under_color);
if ((wand->filter_off != MagickFalse) ||
- (IsPixelPacketEquivalent(&CurrentContext->undercolor,&under_color) == MagickFalse))
+ (IsPixelInfoEquivalent(&CurrentContext->undercolor,&under_color) == MagickFalse))
{
CurrentContext->undercolor=under_color;
(void) MvgPrintf(wand,"text-undercolor '");
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- if ((wand->images->colormap == (PixelPacket *) NULL) ||
+ if ((wand->images->colormap == (PixelInfo *) NULL) ||
(index >= wand->images->colors))
{
(void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
WandExport PixelWand **MagickGetImageHistogram(MagickWand *wand,
size_t *number_colors)
{
- PixelPacket
+ PixelInfo
*histogram;
PixelWand
return((PixelWand **) NULL);
}
histogram=GetImageHistogram(wand->images,number_colors,wand->exception);
- if (histogram == (PixelPacket *) NULL)
+ if (histogram == (PixelInfo *) NULL)
return((PixelWand **) NULL);
pixel_wands=NewPixelWands(*number_colors);
for (i=0; i < (ssize_t) *number_colors; i++)
PixelSetQuantumPacket(pixel_wands[i],&histogram[i]);
PixelSetColorCount(pixel_wands[i],(size_t) histogram[i].count);
}
- histogram=(PixelPacket *) RelinquishMagickMemory(histogram);
+ histogram=(PixelInfo *) RelinquishMagickMemory(histogram);
return(pixel_wands);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- if ((wand->images->colormap == (PixelPacket *) NULL) ||
+ if ((wand->images->colormap == (PixelInfo *) NULL) ||
(index >= wand->images->colors))
ThrowWandException(WandError,"InvalidColormapIndex",wand->name);
PixelGetQuantumPacket(color,wand->images->colormap+index);
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% PixelGetQuantumPacket() gets the packet of the pixel wand as a PixelPacket.
+% PixelGetQuantumPacket() gets the packet of the pixel wand as a PixelInfo.
%
% The format of the PixelGetQuantumPacket method is:
%
-% void PixelGetQuantumPacket(PixelWand *wand,PixelPacket *packet)
+% void PixelGetQuantumPacket(PixelWand *wand,PixelInfo *packet)
%
% A description of each parameter follows:
%
% o packet: The pixel wand packet is returned here.
%
*/
-WandExport void PixelGetQuantumPacket(const PixelWand *wand,PixelPacket *packet)
+WandExport void PixelGetQuantumPacket(const PixelWand *wand,PixelInfo *packet)
{
assert(wand != (const PixelWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- assert(packet != (PixelPacket *) NULL);
+ assert(packet != (PixelInfo *) NULL);
packet->alpha=ClampToQuantum(wand->pixel.alpha);
if (wand->pixel.colorspace == CMYKColorspace)
{
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% PixelGetQuantumPixel() gets the pixel of the pixel wand as a PixelPacket.
+% PixelGetQuantumPixel() gets the pixel of the pixel wand as a PixelInfo.
%
% The format of the PixelGetQuantumPixel method is:
%
%
% The format of the PixelSetQuantumPacket method is:
%
-% PixelSetQuantumPacket(PixelWand *wand,const PixelPacket *packet)
+% PixelSetQuantumPacket(PixelWand *wand,const PixelInfo *packet)
%
% A description of each parameter follows:
%
% o packet: the pixel wand packet.
%
*/
-WandExport void PixelSetQuantumPacket(PixelWand *wand,const PixelPacket *packet)
+WandExport void PixelSetQuantumPacket(PixelWand *wand,const PixelInfo *packet)
{
assert(wand != (const PixelWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- assert(packet != (PixelPacket *) NULL);
+ assert(packet != (PixelInfo *) NULL);
wand->pixel.red=(MagickRealType) packet->red;
wand->pixel.green=(MagickRealType) packet->green;
wand->pixel.blue=(MagickRealType) packet->blue;
ClearPixelWand(PixelWand *),
PixelGetHSL(const PixelWand *,double *,double *,double *),
PixelGetMagickColor(const PixelWand *,PixelInfo *),
- PixelGetQuantumPacket(const PixelWand *,PixelPacket *),
+ PixelGetQuantumPacket(const PixelWand *,PixelInfo *),
PixelGetQuantumPixel(const Image *,const PixelWand *,Quantum *),
PixelSetAlpha(PixelWand *,const double),
PixelSetAlphaQuantum(PixelWand *,const Quantum),
PixelSetPixelInfo(PixelWand *,const PixelInfo *),
PixelSetAlpha(PixelWand *,const double),
PixelSetAlphaQuantum(PixelWand *,const Quantum),
- PixelSetQuantumPacket(PixelWand *,const PixelPacket *),
+ PixelSetQuantumPacket(PixelWand *,const PixelInfo *),
PixelSetQuantumPixel(const Image *,const Quantum *,PixelWand *),
PixelSetRed(PixelWand *,const double),
PixelSetRedQuantum(PixelWand *,const Quantum),
MagickStatusType
flags;
- PixelPacket
+ PixelInfo
*color,
target_color;
Image
*image;
- PixelPacket
+ PixelInfo
background_color;
register ssize_t
char
message[MaxTextExtent];
- PixelPacket
+ PixelInfo
*histogram;
ExceptionInfo
for ( ; image; image=image->next)
{
histogram=GetImageHistogram(image,&number_colors,&image->exception);
- if (histogram == (PixelPacket *) NULL)
+ if (histogram == (PixelInfo *) NULL)
continue;
count+=(ssize_t) number_colors;
EXTEND(sp,6*count);
histogram[i].count);
PUSHs(sv_2mortal(newSVpv(message,0)));
}
- histogram=(PixelPacket *) RelinquishMagickMemory(histogram);
+ histogram=(PixelInfo *) RelinquishMagickMemory(histogram);
}
PerlException:
MagickStatusType
flags;
- PixelPacket
+ PixelInfo
fill_color;
RectangleInfo
Image
*image;
- PixelPacket
+ PixelInfo
target_color;
register ssize_t
count=ReadBlob(image,2,magick);
do
{
- PixelLongPacket
- shift;
+ PixelInfo
+ quantum_bits;
PixelPacket
- quantum_bits;
+ shift;
size_t
profile_data,
(void) SetImageType(image,BilevelType,exception);
polarity = 0;
if (image->storage_class == PseudoClass) {
- polarity=(Quantum) (GetPixelPacketIntensity(&image->colormap[0]) >=
+ polarity=(Quantum) (GetPixelInfoIntensity(&image->colormap[0]) >=
(Quantum) (QuantumRange/2));
if (image->colors == 2)
- polarity=(Quantum) (GetPixelPacketIntensity(&image->colormap[0]) >=
- GetPixelPacketIntensity(&image->colormap[1]));
+ polarity=(Quantum) (GetPixelInfoIntensity(&image->colormap[0]) >=
+ GetPixelInfoIntensity(&image->colormap[1]));
}
for (y=0; y < (ssize_t) image->rows; y+=(ssize_t) cell_height)
{
image->columns=(size_t) width;
image->rows=(size_t) height;
image->depth=depth;
- if ((image->colormap == (PixelPacket *) NULL) && (samples_per_pixel == 1))
+ if ((image->colormap == (PixelInfo *) NULL) && (samples_per_pixel == 1))
{
size_t
one;
int
byte;
- PixelLongPacket
+ PixelPacket
pixel;
/*
break;
index=ConstrainColormapIndex(image,(size_t) c);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
SetPixelAlpha(image,(ssize_t) index == opacity ? TransparentAlpha :
OpaqueAlpha,q);
x++;
c|=(bits_per_pixel-1); /* size of global colormap */
(void) WriteBlobByte(image,(unsigned char) c);
for (j=0; j < (ssize_t) image->colors; j++)
- if (IsPixelPacketEquivalent(&image->background_color,image->colormap+j))
+ if (IsPixelInfoEquivalent(&image->background_color,image->colormap+j))
break;
(void) WriteBlobByte(image,(unsigned char)
(j == (ssize_t) image->colors ? 0 : j)); /* background color */
MagickBooleanType
status;
- PixelPacket
+ PixelInfo
start_color,
stop_color;
return((Image *) NULL);
}
(void) CopyMagickString(colorname,"white",MaxTextExtent);
- if (GetPixelPacketIntensity(&start_color) > (Quantum) (QuantumRange/2))
+ if (GetPixelInfoIntensity(&start_color) > (Quantum) (QuantumRange/2))
(void) CopyMagickString(colorname,"black",MaxTextExtent);
(void) sscanf(image_info->filename,"%*[^-]-%s",colorname);
status=QueryColorCompliance(colorname,AllCompliance,&stop_color,exception);
if (bit == 8)
bit=0;
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
pixel=(size_t) ((GETJSAMPLE(*p) ^ 0x80) << 4);
index=ConstrainColormapIndex(image,pixel);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
p++;
q+=GetPixelChannels(image);
}
{
index=ConstrainColormapIndex(image,(size_t) GETJSAMPLE(*p));
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
p++;
q+=GetPixelChannels(image);
}
p++;
}
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FindColor() returns the index of the matching entry from PalmPalette for a
-% given PixelPacket.
+% given PixelInfo.
%
% The format of the FindColor method is:
%
-% int FindColor(const Image *image,PixelPacket *pixel)
+% int FindColor(const Image *image,PixelInfo *pixel)
%
% A description of each parameter follows:
%
% o int: the index of the matching color or -1 if not found/
%
-% o pixel: a pointer to the PixelPacket to be matched.
+% o pixel: a pointer to the PixelInfo to be matched.
%
*/
-static int FindColor(const Image *image,PixelPacket *packet)
+static int FindColor(const Image *image,PixelInfo *packet)
{
register ssize_t
i;
ThrowReaderException(CorruptImageError,"CorruptImage");
index=(Quantum) (mask-(((*ptr) & (mask << bit)) >> bit));
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
if (bit)
bit-=bits_per_pixel;
else
MagickSizeType
cc;
- PixelPacket
+ PixelInfo
transpix;
QuantizeInfo
/*
Convert PseudoClass image to a PCX monochrome image.
*/
- polarity=(Quantum) (GetPixelPacketIntensity(
+ polarity=(Quantum) (GetPixelInfoIntensity(
&image->colormap[0]) < ((Quantum) QuantumRange/2) ? 1 : 0);
if (image->colors == 2)
- polarity=(Quantum) (GetPixelPacketIntensity(&image->colormap[0]) <
- GetPixelPacketIntensity(&image->colormap[1]) ? 1 : 0);
+ polarity=(Quantum) (GetPixelInfoIntensity(&image->colormap[0]) <
+ GetPixelInfoIntensity(&image->colormap[1]) ? 1 : 0);
for (y=0; y < (ssize_t) image->rows; y++)
{
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
#endif
/* Macros for left-bit-replication to ensure that pixels
- * and PixelPackets all have the image->depth, and for use
+ * and PixelInfos all have the image->depth, and for use
* in PNG8 quantization.
*/
magn_methx,
magn_methy;
- PixelPacket
+ PixelInfo
mng_global_bkgd;
/* Added at version 6.6.6-7 */
if (image->storage_class == PseudoClass)
{
for (i=0; i < (ssize_t) image->colors; i++)
- if (IsPixelPacketGray(image->colormap+i) == MagickFalse)
+ if (IsPixelInfoGray(image->colormap+i) == MagickFalse)
return(MagickFalse);
return(MagickTrue);
}
double
file_gamma;
- PixelLongPacket
+ PixelInfo
transparent_color;
MagickBooleanType
" Raw tRNS graylevel is %d.",ping_trans_color->gray);
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
- " scaled graylevel is %d.",transparent_color.alpha);
+ " scaled graylevel is %.20g.",transparent_color.alpha);
}
transparent_color.red=transparent_color.alpha;
transparent_color.green=transparent_color.alpha;
previous_fb;
#if defined(MNG_INSERT_LAYERS)
- PixelPacket
+ PixelInfo
mng_background_color;
#endif
int
n;
- PixelPacket
+ PixelInfo
opaque[260],
semitransparent[260],
transparent[260];
{
if (number_opaque == 0)
{
- GetPixelPacketPixel(image, q, opaque);
+ GetPixelInfoPixel(image, q, opaque);
opaque[0].alpha=OpaqueAlpha;
number_opaque=1;
}
number_opaque < 259)
{
number_opaque++;
- GetPixelPacketPixel(image, q, opaque+i);
+ GetPixelInfoPixel(image, q, opaque+i);
opaque[i].alpha=OpaqueAlpha;
}
}
{
if (number_transparent == 0)
{
- GetPixelPacketPixel(image, q, transparent);
+ GetPixelInfoPixel(image, q, transparent);
ping_trans_color.red=(unsigned short)
GetPixelRed(image,q);
ping_trans_color.green=(unsigned short)
number_transparent < 259)
{
number_transparent++;
- GetPixelPacketPixel(image,q,transparent+i);
+ GetPixelInfoPixel(image,q,transparent+i);
}
}
}
{
if (number_semitransparent == 0)
{
- GetPixelPacketPixel(image,q,semitransparent);
+ GetPixelInfoPixel(image,q,semitransparent);
number_semitransparent = 1;
}
number_semitransparent < 259)
{
number_semitransparent++;
- GetPixelPacketPixel(image, q, semitransparent+i);
+ GetPixelInfoPixel(image, q, semitransparent+i);
}
}
}
if (image_colors < 257)
{
- PixelPacket
+ PixelInfo
colormap[260];
/*
{
if (GetPixelAlpha(image,r) < OpaqueAlpha/2)
{
- SetPixelPacket(image,&image->background_color,r);
+ SetPixelPixelInfo(image,&image->background_color,r);
SetPixelAlpha(image,TransparentAlpha,r);
}
else
(ScaleQuantumToShort(image->colormap[0].blue) & mask);
ping_trans_color.gray=(png_uint_16)
- (ScaleQuantumToShort(GetPixelPacketIntensity(
+ (ScaleQuantumToShort(GetPixelInfoIntensity(
image->colormap)) & mask);
ping_trans_color.index=(png_byte) 0;
{
ping_background.gray=(png_uint_16)
- ((maxval/255.)*((GetPixelPacketIntensity(&image->background_color)))
+ ((maxval/255.)*((GetPixelInfoIntensity(&image->background_color)))
+.5);
if (logging != MagickFalse)
MagickStatusType
flags;
- PixelPacket
+ PixelInfo
pixel;
PointInfo
p=GetVirtualPixels(image,0,y,image->columns,1,exception);
if (p == (const Quantum *) NULL)
break;
- GetPixelPacketPixel(image,p,&pixel);
+ GetPixelInfoPixel(image,p,&pixel);
length=255;
for (x=0; x < (ssize_t) image->columns; x++)
{
}
length=0;
}
- GetPixelPacketPixel(image,p,&pixel);
+ GetPixelInfoPixel(image,p,&pixel);
p+=GetPixelChannels(image);
}
WriteRunlengthPacket(image,pixel,length,p);
SetPixelIndex(image,ScaleQuantumToChar(pixel),q);
else
SetPixelIndex(image,ScaleQuantumToShort(pixel),q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
if (image->depth == 1)
{
{
SetPixelIndex(image,(((unsigned char) pixel) &
(0x01 << (7-bit))) != 0 ? 0 : 255,q);
- SetPixelPacket(image,image->colormap+(ssize_t)
+ SetPixelPixelInfo(image,image->colormap+(ssize_t)
GetPixelIndex(image,q),q);
q+=GetPixelChannels(image);
x++;
break;
}
}
- image->colormap=(PixelPacket *) RelinquishMagickMemory(
+ image->colormap=(PixelInfo *) RelinquishMagickMemory(
image->colormap);
image->storage_class=DirectClass;
image->colors=0;
MagickBooleanType
status;
- PixelPacket
+ PixelInfo
pixel;
register Quantum
ssize_t
y;
- PixelPacket
+ PixelInfo
fill_color;
register ssize_t
MagickBooleanType
status;
- PixelPacket
+ PixelInfo
pixel;
Quantum
MagickBooleanType
status;
- PixelPacket
+ PixelInfo
background_color;
register ssize_t
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelPacket(image,&background_color,q);
+ SetPixelPixelInfo(image,&background_color,q);
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
y,
y_offset;
- PixelLongPacket
+ PixelInfo
pixel;
MagickBooleanType
if (image->colorspace == CMYKColorspace)
{
if (image->matte != MagickFalse)
- count=(ssize_t) sscanf(text,"%ld,%ld: (%u,%u,%u,%u,%u",&x_offset,
- &y_offset,&pixel.red,&pixel.green,&pixel.blue,&pixel.black,
- &pixel.alpha);
+ count=(ssize_t) sscanf(text,"%ld,%ld: (%lf,%lf,%lf,%lf,%lf",
+ &x_offset,&y_offset,&pixel.red,&pixel.green,&pixel.blue,
+ &pixel.black,&pixel.alpha);
else
- count=(ssize_t) sscanf(text,"%ld,%ld: (%u,%u,%u,%u",&x_offset,
+ count=(ssize_t) sscanf(text,"%ld,%ld: (%lf,%lf,%lf,%lf",&x_offset,
&y_offset,&pixel.red,&pixel.green,&pixel.blue,&pixel.black);
}
else
if (image->matte != MagickFalse)
- count=(ssize_t) sscanf(text,"%ld,%ld: (%u,%u,%u,%u",&x_offset,
+ count=(ssize_t) sscanf(text,"%ld,%ld: (%lf,%lf,%lf,%lf",&x_offset,
&y_offset,&pixel.red,&pixel.green,&pixel.blue,&pixel.alpha);
else
- count=(ssize_t) sscanf(text,"%ld,%ld: (%u,%u,%u",&x_offset,
+ count=(ssize_t) sscanf(text,"%ld,%ld: (%lf,%lf,%lf",&x_offset,
&y_offset,&pixel.red,&pixel.green,&pixel.blue);
if (count < 5)
continue;
else
(void) FormatLocaleString(buffer,MaxTextExtent,
" color('%s',%s) = '%s'",name,
- GetPixelPacketIntensity(image->colormap+i) <
+ GetPixelInfoIntensity(image->colormap+i) <
((Quantum) QuantumRange/2) ? "background" : "foreground",symbol);
(void) WriteBlobString(image,buffer);
(void) FormatLocaleString(buffer,MaxTextExtent,"%s",
{
index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
p++;
{
index=((*p) & (0x80 >> bit) ? 0x01 : 0x00);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
p++;
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
index=ConstrainColormapIndex(image,(*p) & 0x3);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
p++;
q+=GetPixelChannels(image);
}
{
index=ConstrainColormapIndex(image,(*p >> 6) & 0x3);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
if ((image->columns % 4) >= 1)
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x3);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
if ((image->columns % 4) >= 2)
{
index=ConstrainColormapIndex(image,(*p >> 2) & 0x3);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
}
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
index=ConstrainColormapIndex(image,(*p) & 0x0f);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
p++;
q+=GetPixelChannels(image);
}
{
index=ConstrainColormapIndex(image,(*p >> 4) & 0x0f);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
p++;
q+=GetPixelChannels(image);
}
{
index=ConstrainColormapIndex(image,*p);
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
p++;
q+=GetPixelChannels(image);
}
{
if (bpp < 24)
if ( (image->colors < (one << bpp)) && (bpp != 24) )
- image->colormap=(PixelPacket *) ResizeQuantumMemory(
+ image->colormap=(PixelInfo *) ResizeQuantumMemory(
image->colormap,(size_t) (one << bpp),
sizeof(*image->colormap));
}
{
if(bpp < 24)
if( image->colors<(one << bpp) && bpp!=24 )
- image->colormap=(PixelPacket *) ResizeQuantumMemory(
+ image->colormap=(PixelInfo *) ResizeQuantumMemory(
image->colormap,(size_t) (one << bpp),
sizeof(*image->colormap));
}
PixelInfo
color;
- PixelPacket
+ PixelInfo
pixel;
register ssize_t
break;
for (x=0; x < (ssize_t) image->columns; x++)
{
- SetPixelPacket(image,&pixel,q);
+ SetPixelPixelInfo(image,&pixel,q);
if (image->colorspace == CMYKColorspace)
SetPixelBlack(image,pixel.black,q);
q+=GetPixelChannels(image);
green,
blue,
alpha;
-} XCFPixelPacket;
+} XCFPixelInfo;
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
unsigned char
*graydata;
- XCFPixelPacket
+ XCFPixelInfo
*xcfdata,
*xcfodata;
- xcfdata=(XCFPixelPacket *) AcquireQuantumMemory(data_length,sizeof(*xcfdata));
- if (xcfdata == (XCFPixelPacket *) NULL)
+ xcfdata=(XCFPixelInfo *) AcquireQuantumMemory(data_length,sizeof(*xcfdata));
+ if (xcfdata == (XCFPixelInfo *) NULL)
ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
image->filename);
xcfodata=xcfdata;
if (SyncAuthenticPixels(tile_image,exception) == MagickFalse)
break;
}
- xcfodata=(XCFPixelPacket *) RelinquishMagickMemory(xcfodata);
+ xcfodata=(XCFPixelInfo *) RelinquishMagickMemory(xcfodata);
return MagickTrue;
}
j=(ssize_t) GetValueFromSplayTree(xpm_colors,key);
if (image->storage_class == PseudoClass)
SetPixelIndex(image,j,r);
- SetPixelPacket(image,image->colormap+j,r);
+ SetPixelPixelInfo(image,image->colormap+j,r);
p+=width;
r+=GetPixelChannels(image);
}
if (transparent != MagickFalse)
{
colors++;
- picon->colormap=(PixelPacket *) ResizeQuantumMemory((void **)
+ picon->colormap=(PixelInfo *) ResizeQuantumMemory((void **)
picon->colormap,(size_t) colors,sizeof(*picon->colormap));
- if (picon->colormap == (PixelPacket *) NULL)
+ if (picon->colormap == (PixelInfo *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationError");
for (y=0; y < (ssize_t) picon->rows; y++)
{
index=ConstrainColormapIndex(image,XGetPixel(ximage,(int) x,
(int) y));
SetPixelIndex(image,index,q);
- SetPixelPacket(image,image->colormap+(ssize_t) index,q);
+ SetPixelPixelInfo(image,image->colormap+(ssize_t) index,q);
q+=GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)