PixelInfo
accentuate,
+ border,
highlight,
interior,
matte,
/*
Initialize 3D effects color.
*/
- interior=image->border_color;
- matte=image->matte_color;
- accentuate=matte;
+ 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);
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;
- highlight=matte;
+ GetPixelInfo(frame_image,&highlight);
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;
- shadow=matte;
+ GetPixelInfo(frame_image,&shadow);
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;
- trough=matte;
+ GetPixelInfo(frame_image,&trough);
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;
- invalid=distort_image->matte_color;
+ GetPixelInfo(distort_image,&invalid);
+ SetPixelInfoPacket(distort_image,&distort_image->matte_color,&invalid);
+ if (distort_image->colorspace == CMYKColorspace)
+ ConvertRGBToCMYK(&invalid); /* what about other color spaces? */
for (i=0; i < (ssize_t) distort_image->columns; i++)
{
/* map pixel coordinate to distortion space coordinate */
}
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
- target=node_info->list[i];
+ SetPixelInfoPacket(image,&node_info->list[i],&target);
if (IsPixelInfoEquivalent(&pixel,&target) != MagickFalse)
break;
}
break;
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
- target=node_info->list[i];
+ SetPixelInfoPacket(image,&node_info->list[i],&target);
if (IsPixelInfoEquivalent(&pixel,&target) != MagickFalse)
break;
}
break;
for (i=0; i < (ssize_t) node_info->number_unique; i++)
{
- target=node_info->list[i];
+ SetPixelInfoPacket(image,&node_info->list[i],&target);
if (IsPixelInfoEquivalent(&pixel,&target) != MagickFalse)
break;
}
status=MagickTrue;
for (i=0; i < (ssize_t) number_colors; i++)
{
- pixel=(*p);
+ SetPixelInfoPacket(image,p,&pixel);
(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++)
{
- pixel=(*p);
+ SetPixelInfoPacket(image,p,&pixel);
(void) CopyMagickString(tuple,"(",MaxTextExtent);
ConcatenateColorComponent(&pixel,RedPixelChannel,X11Compliance,
tuple);
PixelInfo
background;
+ PixelInfo
+ pixel;
+
ssize_t
y;
break;
if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
break;
- background=image->background_color;
+ GetPixelInfo(image,&background);
+ SetPixelInfoPacket(image,&image->background_color,&background);
+ SetPacketPixelInfo(image,&background,&pixel);
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.
*/
- background=image->background_color;
+ GetPixelInfo(image,&background);
+ SetPixelInfoPacket(image,&(image->background_color),&background);
(void) LevelImageColors(image,&background,&background,MagickTrue,
exception);
}
PixelInfo
background;
+ PixelInfo
+ pixel;
+
ssize_t
y;
if (image->background_color.alpha != OpaqueAlpha)
image->matte=MagickTrue;
GetPixelInfo(image,&background);
- background=image->background_color;
+ SetPixelInfoPacket(image,&image->background_color,&background);
+ SetPacketPixelInfo(image,&background,&pixel);
/*
Set image background color.
*/
status=MagickTrue;
+ pixel.black=0;
image_view=AcquireCacheView(image);
for (y=0; y < (ssize_t) image->rows; y++)
{
#endif
/* Define if you have the <lcms2.h> header file. */
-/* #undef HAVE_LCMS2_H */
+#ifndef MAGICKCORE_HAVE_LCMS2_H
+#define MAGICKCORE_HAVE_LCMS2_H 1
+#endif
/* Define if you have the <lcms2/lcms2.h> header file. */
/* #undef HAVE_LCMS2_LCMS2_H */
/* Define if you have the <lcms.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS_H
-#define MAGICKCORE_HAVE_LCMS_H 1
-#endif
+/* #undef HAVE_LCMS_H */
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
#endif
/* Define if you have LQR library */
-#ifndef MAGICKCORE_LQR_DELEGATE
-#define MAGICKCORE_LQR_DELEGATE 1
-#endif
+/* #undef LQR_DELEGATE */
/* Define if using libltdl to support dynamically loadable modules */
#ifndef MAGICKCORE_LTDL_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/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/opt/intel/lib/intel64:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/qt-3.3/lib:/usr/lib64/tracker-0.12:/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 */
#endif
/* Define if you have WEBP library */
-#ifndef MAGICKCORE_WEBP_DELEGATE
-#define MAGICKCORE_WEBP_DELEGATE 1
-#endif
+/* #undef WEBP_DELEGATE */
/* Define to use the Windows GDI32 library */
/* #undef WINGDI32_DELEGATE */
/* #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. */
if (GetPixelAlpha(floodplane_image,p) != OpaqueAlpha)
{
(void) GetFillColor(draw_info,x,y,&fill_color,exception);
- fill=fill_color;
+ SetPixelInfoPacket(image,&fill_color,&fill);
if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
SetPixelRed(image,ClampToQuantum(fill.red),q);
if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
sizeof(*gradient->stops));
for (i=0; i < (ssize_t) gradient->number_stops; i++)
GetPixelInfo(image,&gradient->stops[i].color);
- gradient->stops[0].color=(*start_color);
+ SetPixelInfoPacket(image,start_color,&gradient->stops[0].color);
gradient->stops[0].offset=0.0;
- gradient->stops[1].color=(*stop_color);
+ SetPixelInfoPacket(image,stop_color,&gradient->stops[1].color);
gradient->stops[1].offset=1.0;
/*
Draw a gradient on the image.
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)
{
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- background=image->background_color;
+ GetPixelInfo(image,&background);
+ SetPixelInfoPacket(image,&image->background_color,&background);
/*
X shear image.
*/
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
- background=image->background_color;
+ GetPixelInfo(image,&background);
+ SetPixelInfoPacket(image,&image->background_color,&background);
/*
Y Shear image.
*/
if (child != (XMLTreeInfo *) NULL)
{
if (CurrentContext->fill.alpha != OpaqueAlpha)
- pixel.matte=CurrentContext->fill.alpha != OpaqueAlpha ? MagickTrue :
- MagickFalse;
- pixel=CurrentContext->fill;
+ pixel.matte=CurrentContext->fill.alpha != OpaqueAlpha ?
+ MagickTrue : MagickFalse;
+ SetPixelInfoPacket(wand->image,&CurrentContext->fill,&pixel);
GetColorTuple(&pixel,MagickTrue,value);
(void) SetXMLTreeContent(child,value);
}
child=AddChildToXMLTree(xml_info,"fill-alpha",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatLocaleString(value,MaxTextExtent,"%g",(double) QuantumScale*
- CurrentContext->fill.alpha);
+ (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ (double) QuantumScale*CurrentContext->fill.alpha);
(void) SetXMLTreeContent(child,value);
}
child=AddChildToXMLTree(xml_info,"fill-rule",0);
if (CurrentContext->stroke.alpha != OpaqueAlpha)
pixel.matte=CurrentContext->stroke.alpha != OpaqueAlpha ?
MagickTrue : MagickFalse;
- pixel=CurrentContext->stroke;
+ SetPixelInfoPacket(wand->image,&CurrentContext->stroke,&pixel);
GetColorTuple(&pixel,MagickTrue,value);
(void) SetXMLTreeContent(child,value);
}
if (CurrentContext->undercolor.alpha != OpaqueAlpha)
pixel.matte=CurrentContext->undercolor.alpha != OpaqueAlpha ?
MagickTrue : MagickFalse;
- pixel=CurrentContext->undercolor;
+ SetPixelInfoPacket(wand->image,&CurrentContext->undercolor,&pixel);
GetColorTuple(&pixel,MagickTrue,value);
(void) SetXMLTreeContent(child,value);
}
quantize_info=AcquireQuantizeInfo(mogrify_info);
SetGeometryInfo(&geometry_info);
GetPixelInfo(*image,&fill);
- fill=(*image)->background_color;
+ SetPixelInfoPacket(*image,&(*image)->background_color,&fill);
attenuate=1.0;
compose=(*image)->compose;
interpolate_method=UndefinedInterpolatePixel;
/*
Read AVS X image.
*/
+ image->matte=MagickTrue;
width=ReadBlobMSBLong(image);
height=ReadBlobMSBLong(image);
if (EOFBlob(image) != MagickFalse)
/*
Convert AVS raster image to pixel packets.
*/
- image->matte=MagickTrue;
image->columns=width;
image->rows=height;
image->depth=8;
if (flags & PALM_HAS_TRANSPARENCY_FLAG)
{
if (bits_per_pixel != 16)
- transpix=image->colormap[mask-transparentIndex];
+ SetPixelInfoPacket(image,image->colormap+(mask-transparentIndex),
+ &transpix);
(void) TransparentPaintImage(image,&transpix,(Quantum) TransparentAlpha,
MagickFalse,exception);
}