PixelInfo
accentuate,
- border,
highlight,
interior,
matte,
/*
Initialize 3D effects color.
*/
- GetPixelInfo(frame_image,&interior);
- SetPixelInfoPacket(frame_image,&image->border_color,&interior);
- GetPixelInfo(frame_image,&matte);
- matte.colorspace=RGBColorspace;
- SetPixelInfoPacket(frame_image,&image->matte_color,&matte);
- GetPixelInfo(frame_image,&border);
- border.colorspace=RGBColorspace;
- SetPixelInfoPacket(frame_image,&image->border_color,&border);
- GetPixelInfo(frame_image,&accentuate);
+ interior=image->border_color;
+ matte=image->matte_color;
+ accentuate=matte;
accentuate.red=(MagickRealType) (QuantumScale*((QuantumRange-
AccentuateModulate)*matte.red+(QuantumRange*AccentuateModulate)));
accentuate.green=(MagickRealType) (QuantumScale*((QuantumRange-
AccentuateModulate)*matte.green+(QuantumRange*AccentuateModulate)));
accentuate.blue=(MagickRealType) (QuantumScale*((QuantumRange-
AccentuateModulate)*matte.blue+(QuantumRange*AccentuateModulate)));
+ accentuate.black=(MagickRealType) (QuantumScale*((QuantumRange-
+ AccentuateModulate)*matte.black+(QuantumRange*AccentuateModulate)));
accentuate.alpha=matte.alpha;
- GetPixelInfo(frame_image,&highlight);
+ highlight=matte;
highlight.red=(MagickRealType) (QuantumScale*((QuantumRange-
HighlightModulate)*matte.red+(QuantumRange*HighlightModulate)));
highlight.green=(MagickRealType) (QuantumScale*((QuantumRange-
HighlightModulate)*matte.green+(QuantumRange*HighlightModulate)));
highlight.blue=(MagickRealType) (QuantumScale*((QuantumRange-
HighlightModulate)*matte.blue+(QuantumRange*HighlightModulate)));
+ highlight.black=(MagickRealType) (QuantumScale*((QuantumRange-
+ HighlightModulate)*matte.black+(QuantumRange*HighlightModulate)));
highlight.alpha=matte.alpha;
- GetPixelInfo(frame_image,&shadow);
+ shadow=matte;
shadow.red=QuantumScale*matte.red*ShadowModulate;
shadow.green=QuantumScale*matte.green*ShadowModulate;
shadow.blue=QuantumScale*matte.blue*ShadowModulate;
+ shadow.black=QuantumScale*matte.black*ShadowModulate;
shadow.alpha=matte.alpha;
- GetPixelInfo(frame_image,&trough);
+ trough=matte;
trough.red=QuantumScale*matte.red*TroughModulate;
trough.green=QuantumScale*matte.green*TroughModulate;
trough.blue=QuantumScale*matte.blue*TroughModulate;
+ trough.black=QuantumScale*matte.black*TroughModulate;
trough.alpha=matte.alpha;
status=MagickTrue;
progress=0;
*/
validity = 1.0;
- GetPixelInfo(distort_image,&invalid);
- SetPixelInfoPacket(distort_image,&distort_image->matte_color,&invalid);
+ invalid=distort_image->matte_color;
if (distort_image->colorspace == CMYKColorspace)
ConvertRGBToCMYK(&invalid); /* what about other color spaces? */
for (i=0; i < (ssize_t) distort_image->columns; i++)
}
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
- SetPixelInfoPacket(image,&node_info->list[i],&target);
+ target=node_info->list[i];
if (IsPixelInfoEquivalent(&pixel,&target) != MagickFalse)
break;
}
break;
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
- SetPixelInfoPacket(image,&node_info->list[i],&target);
+ target=node_info->list[i];
if (IsPixelInfoEquivalent(&pixel,&target) != MagickFalse)
break;
}
break;
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
- SetPixelInfoPacket(image,&node_info->list[i],&target);
+ target=node_info->list[i];
if (IsPixelInfoEquivalent(&pixel,&target) != MagickFalse)
break;
}
status=MagickTrue;
for (i=0; i < (ssize_t) number_colors; i++)
{
- SetPixelInfoPacket(image,p,&pixel);
+ pixel=(*p);
(void) CopyMagickString(tuple,"(",MaxTextExtent);
ConcatenateColorComponent(&pixel,RedPixelChannel,X11Compliance,tuple);
(void) ConcatenateMagickString(tuple,",",MaxTextExtent);
p=image->colormap;
for (i=0; i < (ssize_t) image->colors; i++)
{
- SetPixelInfoPacket(image,p,&pixel);
+ pixel=(*p);
(void) CopyMagickString(tuple,"(",MaxTextExtent);
ConcatenateColorComponent(&pixel,RedPixelChannel,X11Compliance,
tuple);
PixelInfo
background;
- PixelInfo
- pixel;
-
ssize_t
y;
break;
if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
break;
- GetPixelInfo(image,&background);
- SetPixelInfoPacket(image,&image->background_color,&background);
- SetPacketPixelInfo(image,&background,&pixel);
+ background=image->background_color;
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(dynamic,4) shared(status)
/*
Reset all color channels to background color.
*/
- GetPixelInfo(image,&background);
- SetPixelInfoPacket(image,&(image->background_color),&background);
+ background=image->background_color;
(void) LevelImageColors(image,&background,&background,MagickTrue,
exception);
}
return(MagickFalse);
if (image->background_color.alpha != OpaqueAlpha)
image->matte=MagickTrue;
- GetPixelInfo(image,&background);
- SetPixelInfoPacket(image,&image->background_color,&background);
+ background=image->background_color;
SetPacketPixelInfo(image,&background,&pixel);
/*
Set image background color.
status;
PixelInfo
- fill,
pixel;
PixelInfo
s=segment_stack;
PushSegmentStack(y,x,x,1);
PushSegmentStack(y+1,x,x,-1);
- GetPixelInfo(image,&fill);
GetPixelInfo(image,&pixel);
image_view=AcquireCacheView(image);
floodplane_view=AcquireCacheView(floodplane_image);
if (GetPixelAlpha(floodplane_image,p) != OpaqueAlpha)
{
(void) GetFillColor(draw_info,x,y,&fill_color,exception);
- SetPixelInfoPacket(image,&fill_color,&fill);
if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
- SetPixelRed(image,ClampToQuantum(fill.red),q);
+ SetPixelRed(image,ClampToQuantum(fill_color.red),q);
if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
- SetPixelGreen(image,ClampToQuantum(fill.green),q);
+ SetPixelGreen(image,ClampToQuantum(fill_color.green),q);
if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
- SetPixelBlue(image,ClampToQuantum(fill.blue),q);
+ SetPixelBlue(image,ClampToQuantum(fill_color.blue),q);
if ((GetPixelBlackTraits(image) & UpdatePixelTrait) != 0)
- SetPixelBlack(image,ClampToQuantum(fill.black),q);
+ SetPixelBlack(image,ClampToQuantum(fill_color.black),q);
if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)
- SetPixelAlpha(image,ClampToQuantum(fill.alpha),q);
+ SetPixelAlpha(image,ClampToQuantum(fill_color.alpha),q);
}
p+=GetPixelChannels(floodplane_image);
q+=GetPixelChannels(image);
sizeof(*gradient->stops));
for (i=0; i < (ssize_t) gradient->number_stops; i++)
GetPixelInfo(image,&gradient->stops[i].color);
- SetPixelInfoPacket(image,start_color,&gradient->stops[0].color);
+ gradient->stops[0].color=(*start_color);
gradient->stops[0].offset=0.0;
- SetPixelInfoPacket(image,stop_color,&gradient->stops[1].color);
+ gradient->stops[1].color=(*stop_color);
gradient->stops[1].offset=1.0;
/*
Draw a gradient on the image.
extern MagickExport MagickBooleanType
FloodfillPaintImage(Image *,const DrawInfo *,const PixelInfo *,const ssize_t,
const ssize_t,const MagickBooleanType,ExceptionInfo *),
- GradientImage(Image *,const GradientType,const SpreadMethod,
- const PixelInfo *,const PixelInfo *,ExceptionInfo *),
+ GradientImage(Image *,const GradientType,const SpreadMethod,const PixelInfo *,
+ const PixelInfo *,ExceptionInfo *),
OpaquePaintImage(Image *,const PixelInfo *,const PixelInfo *,
const MagickBooleanType,ExceptionInfo *),
TransparentPaintImage(Image *,const PixelInfo *,
pixel[image->channel_map[IndexPixelChannel].channel];
}
-static inline void SetPixelInfoPacket(const Image *image,
- const PixelInfo *pixel,PixelInfo *pixel_info)
-{
- pixel_info->red=(MagickRealType) pixel->red;
- pixel_info->green=(MagickRealType) pixel->green;
- pixel_info->blue=(MagickRealType) pixel->blue;
- pixel_info->alpha=(MagickRealType) pixel->alpha;
- if (image->colorspace == CMYKColorspace)
- pixel_info->black=(MagickRealType) pixel->black;
- if (image->storage_class == PseudoClass)
- pixel_info->index=(MagickRealType) pixel->index;
-}
-
static inline void SetPixelMagenta(const Image *image,const Quantum magenta,
Quantum *pixel)
{
ssize_t
y;
+ /*
+ X shear image.
+ */
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- GetPixelInfo(image,&background);
- SetPixelInfoPacket(image,&image->background_color,&background);
- /*
- X shear image.
- */
status=MagickTrue;
+ background=image->background_color;
progress=0;
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
ssize_t
x;
+ /*
+ Y Shear image.
+ */
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- GetPixelInfo(image,&background);
- SetPixelInfoPacket(image,&image->background_color,&background);
- /*
- Y Shear image.
- */
status=MagickTrue;
progress=0;
+ background=image->background_color;
image_view=AcquireCacheView(image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
#pragma omp parallel for schedule(dynamic,4) shared(progress, status)
if (CurrentContext->fill.alpha != OpaqueAlpha)
pixel.matte=CurrentContext->fill.alpha != OpaqueAlpha ?
MagickTrue : MagickFalse;
- SetPixelInfoPacket(wand->image,&CurrentContext->fill,&pixel);
+ pixel=CurrentContext->fill;
GetColorTuple(&pixel,MagickTrue,value);
(void) SetXMLTreeContent(child,value);
}
if (CurrentContext->stroke.alpha != OpaqueAlpha)
pixel.matte=CurrentContext->stroke.alpha != OpaqueAlpha ?
MagickTrue : MagickFalse;
- SetPixelInfoPacket(wand->image,&CurrentContext->stroke,&pixel);
+ pixel=CurrentContext->stroke;
GetColorTuple(&pixel,MagickTrue,value);
(void) SetXMLTreeContent(child,value);
}
if (CurrentContext->undercolor.alpha != OpaqueAlpha)
pixel.matte=CurrentContext->undercolor.alpha != OpaqueAlpha ?
MagickTrue : MagickFalse;
- SetPixelInfoPacket(wand->image,&CurrentContext->undercolor,&pixel);
+ pixel=CurrentContext->undercolor;
GetColorTuple(&pixel,MagickTrue,value);
(void) SetXMLTreeContent(child,value);
}
quantize_info=AcquireQuantizeInfo(mogrify_info);
SetGeometryInfo(&geometry_info);
GetPixelInfo(*image,&fill);
- SetPixelInfoPacket(*image,&(*image)->background_color,&fill);
+ fill=(*image)->background_color;
attenuate=1.0;
compose=(*image)->compose;
interpolate_method=UndefinedInterpolatePixel;
quantize_info=AcquireQuantizeInfo(image_info);
SetGeometryInfo(&geometry_info);
GetPixelInfo(*image,&fill);
- SetPixelInfoPacket(*image,&(*image)->background_color,&fill);
+ fill=(*image)->background_color;
channel=image_info->channel;
format=GetImageOption(image_info,"format");
if (flags & PALM_HAS_TRANSPARENCY_FLAG)
{
if (bits_per_pixel != 16)
- SetPixelInfoPacket(image,image->colormap+(mask-transparentIndex),
- &transpix);
+ transpix=image->colormap[mask-transparentIndex];
(void) TransparentPaintImage(image,&transpix,(Quantum) TransparentAlpha,
MagickFalse,exception);
}
status,
transparent;
- PixelInfo
- pixel;
-
MagickSizeType
number_pixels;
+ PixelInfo
+ pixel;
+
register const Quantum
*p;
/*
Define UIL color.
*/
- SetPixelInfoPacket(image,image->colormap+i,&pixel);
+ pixel=image->colormap[i];
pixel.colorspace=RGBColorspace;
pixel.depth=8;
pixel.alpha=(MagickRealType) OpaqueAlpha;
/*
Define XPM color.
*/
- SetPixelInfoPacket(image,picon->colormap+i,&pixel);
+ pixel=picon->colormap[i];
pixel.colorspace=RGBColorspace;
pixel.depth=8;
pixel.alpha=(MagickRealType) OpaqueAlpha;
/*
Define XPM color.
*/
- SetPixelInfoPacket(image,image->colormap+i,&pixel);
+ pixel=image->colormap[i];
pixel.colorspace=RGBColorspace;
pixel.depth=8;
pixel.alpha=(MagickRealType) OpaqueAlpha;