#include "perl.h"
#include "XSUB.h"
#include <math.h>
-#include <magick/MagickCore.h>
+#include <MagickCore/MagickCore.h>
#undef tainted
#if defined(__cplusplus) || defined(c_plusplus)
#endif
#define DegreesToRadians(x) (MagickPI*(x)/180.0)
#define EndOf(array) (&array[NumberOf(array)])
-#define MagickPI 3.14159265358979323846264338327950288419716939937510
#define MaxArguments 33
#ifndef na
#define na PL_na
case 'O':
{
if (strEQ(name,"Opaque"))
- return(OpaqueOpacity);
+ return(OpaqueAlpha);
if (strEQ(name,"OptionError"))
return(OptionError);
if (strEQ(name,"OptionWarning"))
case 'T':
{
if (strEQ(name,"Transparent"))
- return(TransparentOpacity);
+ return(TransparentAlpha);
if (strEQ(name,"TypeError"))
return(TypeError);
if (strEQ(name,"TypeWarning"))
x,
y;
- MagickPixelPacket
+ PixelInfo
pixel;
MagickStatusType
{
if (LocaleNCompare(attribute,"index",5) == 0)
{
- IndexPacket
- *indexes;
-
int
items;
long
index;
- register PixelPacket
- *p;
+ register Quantum
+ *q;
CacheView
*image_view;
items=sscanf(attribute,"%*[^[][%ld%*[,/]%ld",&x,&y);
(void) items;
image_view=AcquireCacheView(image);
- p=GetCacheViewAuthenticPixels(image_view,x,y,1,1,exception);
- if (p != (PixelPacket *) NULL)
+ q=GetCacheViewAuthenticPixels(image_view,x,y,1,1,exception);
+ if (q != (Quantum *) NULL)
{
- indexes=GetCacheViewAuthenticIndexQueue(image_view);
items=sscanf(SvPV(sval,na),"%ld",&index);
if ((index >= 0) && (index < (ssize_t) image->colors))
- SetPixelIndex(indexes,index);
+ SetPixelIndex(image,index,q);
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
image_view=DestroyCacheView(image_view);
int
items;
- MagickPixelPacket
+ PixelInfo
pixel;
- register IndexPacket
- *indexes;
-
- register PixelPacket
+ register Quantum
*q;
CacheView
(void) items;
image_view=AcquireCacheView(image);
q=GetCacheViewAuthenticPixels(image_view,x,y,1,1,exception);
- indexes=GetCacheViewAuthenticIndexQueue(image_view);
- if (q != (PixelPacket *) NULL)
+ if (q != (Quantum *) NULL)
{
if ((strchr(SvPV(sval,na),',') == 0) ||
(strchr(SvPV(sval,na),')') != 0))
QueryMagickColor(SvPV(sval,na),&pixel,exception);
else
{
- GetMagickPixelPacket(image,&pixel);
+ GetPixelInfo(image,&pixel);
flags=ParseGeometry(SvPV(sval,na),&geometry_info);
pixel.red=geometry_info.rho;
if ((flags & SigmaValue) != 0)
if ((flags & XiValue) != 0)
pixel.blue=geometry_info.xi;
if ((flags & PsiValue) != 0)
- pixel.opacity=geometry_info.psi;
+ pixel.alpha=geometry_info.psi;
if ((flags & ChiValue) != 0)
- pixel.index=geometry_info.chi;
+ pixel.black=geometry_info.chi;
}
- SetPixelRed(q,ClampToQuantum(pixel.red));
- SetPixelGreen(q,ClampToQuantum(pixel.green));
- SetPixelBlue(q,ClampToQuantum(pixel.blue));
- SetPixelOpacity(q,ClampToQuantum(pixel.opacity));
- if (((image->colorspace == CMYKColorspace) ||
- (image->storage_class == PseudoClass)) &&
- (indexes != (IndexPacket *) NULL))
- SetPixelIndex(indexes,ClampToQuantum(pixel.index));
+ SetPixelRed(image,ClampToQuantum(pixel.red),q);
+ SetPixelGreen(image,ClampToQuantum(pixel.green),q);
+ SetPixelBlue(image,ClampToQuantum(pixel.blue),q);
+ if (image->colorspace == CMYKColorspace)
+ SetPixelBlack(image,ClampToQuantum(pixel.black),q);
+ SetPixelAlpha(image,ClampToQuantum(pixel.alpha),q);
(void) SyncCacheViewAuthenticPixels(image_view,exception);
}
image_view=DestroyCacheView(image_view);
image->scene=SvIV(sval);
break;
}
- if (LocaleCompare(attribute,"subimage") == 0)
- {
- if (info)
- info->image_info->subimage=SvIV(sval);
- break;
- }
- if (LocaleCompare(attribute,"subrange") == 0)
- {
- if (info)
- info->image_info->subrange=SvIV(sval);
- break;
- }
if (LocaleCompare(attribute,"server") == 0)
goto display;
if (LocaleCompare(attribute,"size") == 0)
(void) SetMagickResourceLimit(ThreadResource,limit);
break;
}
- if (LocaleCompare(attribute,"tile") == 0)
- {
- if (info)
- (void) CloneString(&info->image_info->tile,SvPV(sval,na));
- break;
- }
if (LocaleCompare(attribute,"tile-offset") == 0)
{
char
ChannelFeatures(GreenChannel,i);
ChannelFeatures(BlueChannel,i);
if (image->colorspace == CMYKColorspace)
- ChannelFeatures(IndexChannel,i);
+ ChannelFeatures(BlackChannel,i);
if (image->matte != MagickFalse)
- ChannelFeatures(OpacityChannel,i);
+ ChannelFeatures(AlphaChannel,i);
}
channel_features=(ChannelFeatures *)
RelinquishMagickMemory(channel_features);
(void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat,
image->background_color.red,image->background_color.green,
- image->background_color.blue,image->background_color.opacity);
+ image->background_color.blue,image->background_color.alpha);
s=newSVpv(color,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
(void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat,
image->border_color.red,image->border_color.green,
- image->border_color.blue,image->border_color.opacity);
+ image->border_color.blue,image->border_color.alpha);
s=newSVpv(color,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
(void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat,
image->colormap[j].red,image->colormap[j].green,
- image->colormap[j].blue,image->colormap[j].opacity);
+ image->colormap[j].blue,image->colormap[j].alpha);
s=newSVpv(color,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
x,
y;
- register const IndexPacket
- *indexes;
-
- register const PixelPacket
+ register const Quantum
*p;
CacheView
(void) items;
image_view=AcquireCacheView(image);
p=GetCacheViewVirtualPixels(image_view,x,y,1,1,&image->exception);
- if (p != (const PixelPacket *) NULL)
+ if (p != (const Quantum *) NULL)
{
- indexes=GetCacheViewVirtualIndexQueue(image_view);
(void) FormatLocaleString(name,MaxTextExtent,QuantumFormat,
- GetPixelIndex(indexes));
+ GetPixelIndex(image,p));
s=newSVpv(name,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
}
(void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat,
image->matte_color.red,image->matte_color.green,
- image->matte_color.blue,image->matte_color.opacity);
+ image->matte_color.blue,image->matte_color.alpha);
s=newSVpv(color,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
if (image == (Image *) NULL)
continue;
j=info ? info->image_info->monochrome :
- IsMonochromeImage(image,&image->exception);
+ IsImageMonochrome(image,&image->exception);
s=newSViv(j);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
x,
y;
- register const PixelPacket
+ register const Quantum
*p;
- register const IndexPacket
- *indexes;
-
if (image == (Image *) NULL)
break;
x=0;
items=sscanf(attribute,"%*[^[][%ld%*[,/]%ld",&x,&y);
(void) items;
p=GetVirtualPixels(image,x,y,1,1,exception);
- indexes=GetVirtualIndexQueue(image);
if (image->colorspace != CMYKColorspace)
(void) FormatLocaleString(tuple,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat,
- GetPixelRed(p),GetPixelGreen(p),
- GetPixelBlue(p),GetPixelOpacity(p));
+ GetPixelRed(image,p),GetPixelGreen(image,p),
+ GetPixelBlue(image,p),GetPixelAlpha(image,p));
else
(void) FormatLocaleString(tuple,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat ","
- QuantumFormat,GetPixelRed(p),
- GetPixelGreen(p),GetPixelBlue(p),
- GetPixelIndex(indexes),GetPixelOpacity(p));
+ QuantumFormat,GetPixelRed(image,p),GetPixelGreen(image,p),
+ GetPixelBlue(image,p),GetPixelBlack(image,p),
+ GetPixelAlpha(image,p));
s=newSVpv(tuple,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
}
- if (LocaleCompare(attribute,"subimage") == 0)
- {
- if (info)
- s=newSViv((ssize_t) info->image_info->subimage);
- PUSHs(s ? sv_2mortal(s) : &sv_undef);
- continue;
- }
- if (LocaleCompare(attribute,"subrange") == 0)
- {
- if (info)
- s=newSViv((ssize_t) info->image_info->subrange);
- PUSHs(s ? sv_2mortal(s) : &sv_undef);
- continue;
- }
if (LocaleCompare(attribute,"server") == 0) /* same as display */
{
if (info && info->image_info->server_name)
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
}
- if (LocaleCompare(attribute,"tile") == 0)
- {
- if (info && info->image_info->tile)
- s=newSVpv(info->image_info->tile,0);
- PUSHs(s ? sv_2mortal(s) : &sv_undef);
- continue;
- }
if (LocaleCompare(attribute,"texture") == 0)
{
if (info && info->image_info->texture)
(void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
QuantumFormat "," QuantumFormat "," QuantumFormat,
image->transparent_color.red,image->transparent_color.green,
- image->transparent_color.blue,image->transparent_color.opacity);
+ image->transparent_color.blue,image->transparent_color.alpha);
s=newSVpv(color,0);
PUSHs(s ? sv_2mortal(s) : &sv_undef);
continue;
# #
# #
# #
-# G e t A u t h e n t i c I n d e x Q u e u e #
+# G e t A u t h e n t i c M e t a c o n t e n t #
# #
# #
# #
#
#
void *
-GetAuthenticIndexQueue(ref,...)
+GetAuthenticMetacontent(ref,...)
Image::Magick ref = NO_INIT
ALIAS:
- getauthenticindexqueue = 1
- GetIndexes = 2
- getindexes = 3
+ getauthenticmetacontent = 1
+ GetMetacontent = 2
+ getmetacontent = 3
CODE:
{
ExceptionInfo
goto PerlException;
}
- blob=(void *) GetAuthenticIndexQueue(image);
+ blob=(void *) GetAuthenticMetacontent(image);
if (blob != (void *) NULL)
goto PerlEnd;
# #
# #
# #
-# G e t V i r t u a l I n d e x Q u e u e #
+# G e t V i r t u a l M e t a c o n t e n t #
# #
# #
# #
#
#
void *
-GetVirtualIndexQueue(ref,...)
+GetVirtualMetacontent(ref,...)
Image::Magick ref = NO_INIT
ALIAS:
- getvirtualindexqueue = 1
+ getvirtualmetacontent = 1
CODE:
{
ExceptionInfo
goto PerlException;
}
- blob=(void *) GetVirtualIndexQueue(image);
+ blob=(void *) GetVirtualMetacontent(image);
if (blob != (void *) NULL)
goto PerlEnd;
char
message[MaxTextExtent];
- ColorPacket
+ PixelPacket
*histogram;
ExceptionInfo
for ( ; image; image=image->next)
{
histogram=GetImageHistogram(image,&number_colors,&image->exception);
- if (histogram == (ColorPacket *) NULL)
+ if (histogram == (PixelPacket *) NULL)
continue;
count+=(ssize_t) number_colors;
EXTEND(sp,6*count);
for (i=0; i < (ssize_t) number_colors; i++)
{
(void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
- histogram[i].pixel.red);
+ histogram[i].red);
PUSHs(sv_2mortal(newSVpv(message,0)));
(void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
- histogram[i].pixel.green);
+ histogram[i].green);
PUSHs(sv_2mortal(newSVpv(message,0)));
(void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
- histogram[i].pixel.blue);
+ histogram[i].blue);
PUSHs(sv_2mortal(newSVpv(message,0)));
if (image->colorspace == CMYKColorspace)
{
(void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
- histogram[i].index);
+ histogram[i].black);
PUSHs(sv_2mortal(newSVpv(message,0)));
}
(void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
- histogram[i].pixel.opacity);
+ histogram[i].alpha);
PUSHs(sv_2mortal(newSVpv(message,0)));
(void) FormatLocaleString(message,MaxTextExtent,"%.20g",(double)
histogram[i].count);
PUSHs(sv_2mortal(newSVpv(message,0)));
}
- histogram=(ColorPacket *) RelinquishMagickMemory(histogram);
+ histogram=(PixelPacket *) RelinquishMagickMemory(histogram);
}
PerlException:
RectangleInfo
region;
- register const IndexPacket
- *indexes;
-
- register const PixelPacket
+ register const Quantum
*p;
register ssize_t
}
}
p=GetVirtualPixels(image,region.x,region.y,1,1,exception);
- if (p == (const PixelPacket *) NULL)
+ if (p == (const Quantum *) NULL)
PUSHs(&sv_undef);
else
{
double
scale;
- indexes=GetVirtualIndexQueue(image);
scale=1.0;
if (normalize != MagickFalse)
scale=1.0/QuantumRange;
if ((channel & RedChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetPixelRed(p))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelRed(image,p))));
if ((channel & GreenChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetPixelGreen(p))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelGreen(image,p))));
if ((channel & BlueChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetPixelBlue(p))));
- if (((channel & IndexChannel) != 0) &&
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelBlue(image,p))));
+ if (((channel & BlackChannel) != 0) &&
(image->colorspace == CMYKColorspace))
- PUSHs(sv_2mortal(newSVnv(scale*GetPixelIndex(indexes))));
- if ((channel & OpacityChannel) != 0)
- PUSHs(sv_2mortal(newSVnv(scale*GetPixelOpacity(p))));
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelBlack(image,p))));
+ if ((channel & AlphaChannel) != 0)
+ PUSHs(sv_2mortal(newSVnv(scale*GetPixelAlpha(image,p))));
}
PerlException:
MagickBooleanType
invert;
- MagickPixelPacket
+ PixelInfo
target;
draw_info=CloneDrawInfo(info ? info->image_info :
if (attribute_flag[6] != 0) /* opacity */
{
if (compose != DissolveCompositeOp)
- (void) SetImageOpacity(composite_image,(Quantum) (QuantumRange-
+ (void) SetImageOpacity(composite_image,(Quantum)
SiPrefixToDouble(argument_list[6].string_reference,
- QuantumRange)));
+ QuantumRange));
else
{
CacheView
register ssize_t
x;
- register PixelPacket
+ register Quantum
*q;
ssize_t
*/
(void) CloneString(&image->geometry,
argument_list[6].string_reference);
- opacity=(Quantum) (QuantumRange-SiPrefixToDouble(
- argument_list[6].string_reference,QuantumRange));
+ opacity=(Quantum) SiPrefixToDouble(
+ argument_list[6].string_reference,QuantumRange);
if (composite_image->matte != MagickTrue)
- (void) SetImageOpacity(composite_image,OpaqueOpacity);
+ (void) SetImageOpacity(composite_image,OpaqueAlpha);
composite_view=AcquireCacheView(composite_image);
for (y=0; y < (ssize_t) composite_image->rows ; y++)
{
composite_image->columns,1,exception);
for (x=0; x < (ssize_t) composite_image->columns; x++)
{
- if (q->opacity == OpaqueOpacity)
- q->opacity=ClampToQuantum(opacity);
- q++;
+ if (GetPixelAlpha(image,q) == OpaqueAlpha)
+ SetPixelAlpha(composite_image,ClampToQuantum(opacity),q);
+ q+=GetPixelChannels(composite_image);
}
sync=SyncCacheViewAuthenticPixels(composite_view,exception);
if (sync == MagickFalse)
MagickBooleanType
invert;
- MagickPixelPacket
+ PixelInfo
target;
draw_info=CloneDrawInfo(info ? info->image_info : (ImageInfo *) NULL,
if (attribute_flag[2] != 0)
geometry.y=argument_list[2].integer_reference;
if (image->matte == MagickFalse)
- (void) SetImageOpacity(image,OpaqueOpacity);
+ (void) SetImageOpacity(image,OpaqueAlpha);
(void) GetOneVirtualMagickPixel(image,geometry.x,geometry.y,&target,
exception);
if (attribute_flag[4] != 0)
QueryMagickColor(argument_list[4].string_reference,&target,
exception);
if (attribute_flag[3] != 0)
- target.opacity=SiPrefixToDouble(argument_list[3].string_reference,
+ target.alpha=SiPrefixToDouble(argument_list[3].string_reference,
QuantumRange);
if (attribute_flag[5] != 0)
image->fuzz=SiPrefixToDouble(argument_list[5].string_reference,
invert=MagickFalse;
if (attribute_flag[6] != 0)
invert=(MagickBooleanType) argument_list[6].integer_reference;
- (void) FloodfillPaintImage(image,OpacityChannel,draw_info,&target,
+ (void) FloodfillPaintImage(image,AlphaChannel,draw_info,&target,
geometry.x,geometry.y,invert);
draw_info=DestroyDrawInfo(draw_info);
break;
MagickBooleanType
invert;
- MagickPixelPacket
+ PixelInfo
fill_color,
target;
MagickBooleanType
invert;
- MagickPixelPacket
+ PixelInfo
target;
(void) QueryMagickColor("none",&target,exception);
if (attribute_flag[0] != 0)
(void) QueryMagickColor(argument_list[0].string_reference,&target,
exception);
- opacity=TransparentOpacity;
+ opacity=TransparentAlpha;
if (attribute_flag[1] != 0)
opacity=SiPrefixToDouble(argument_list[1].string_reference,
QuantumRange);
}
case 65: /* Deconstruct */
{
- image=DeconstructImages(image,exception);
+ image=CompareImageLayers(image,CompareAnyLayer,exception);
break;
}
case 66: /* GaussianBlur */
MagickBooleanType
invert;
- MagickPixelPacket
+ PixelInfo
target;
draw_info=CloneDrawInfo(info ? info->image_info :
}
case 129: /* LevelColors */
{
- MagickPixelPacket
+ PixelInfo
black_point,
white_point;
}
case 135: /* Color */
{
- MagickPixelPacket
+ PixelInfo
color;
(void) QueryMagickColor("none",&color,exception);
*image,
*next;
- MagickPixelPacket
+ PixelInfo
transparent_color;
MontageInfo
}
if (LocaleCompare(attribute,"transparent") == 0)
{
- MagickPixelPacket
+ PixelInfo
transparent_color;
QueryMagickColor(SvPV(ST(i),na),&transparent_color,exception);
for (next=image; next; next=next->next)
(void) TransparentPaintImage(next,&transparent_color,
- TransparentOpacity,MagickFalse);
+ TransparentAlpha,MagickFalse);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
montage_info=DestroyMontageInfo(montage_info);
if ((image == (Image *) NULL) || (exception->severity >= ErrorException))
goto PerlException;
- if (transparent_color.opacity != TransparentOpacity)
+ if (transparent_color.alpha != TransparentAlpha)
for (next=image; next; next=next->next)
(void) TransparentPaintImage(next,&transparent_color,
- TransparentOpacity,MagickFalse);
+ TransparentAlpha,MagickFalse);
for ( ; image; image=image->next)
{
AddImageToRegistry(sv,image);
ExceptionInfo
*exception;
- MagickPixelPacket
+ PixelInfo
color;
register ssize_t
PUSHs(sv_2mortal(newSViv((size_t) floor(color.red+0.5))));
PUSHs(sv_2mortal(newSViv((size_t) floor(color.green+0.5))));
PUSHs(sv_2mortal(newSViv((size_t) floor(color.blue+0.5))));
- if (color.matte != MagickFalse)
- PUSHs(sv_2mortal(newSViv((size_t) floor(color.opacity+0.5))));
if (color.colorspace == CMYKColorspace)
- PUSHs(sv_2mortal(newSViv((size_t) floor(color.index+0.5))));
+ PUSHs(sv_2mortal(newSViv((size_t) floor(color.black+0.5))));
+ if (color.matte != MagickFalse)
+ PUSHs(sv_2mortal(newSViv((size_t) floor(color.alpha+0.5))));
}
PerlException:
RectangleInfo
region;
- register IndexPacket
- *indexes;
-
register ssize_t
i;
- register PixelPacket
+ register Quantum
*q;
ssize_t
}
(void) SetImageStorageClass(image,DirectClass);
q=GetAuthenticPixels(image,region.x,region.y,1,1,exception);
- if ((q == (PixelPacket *) NULL) || (av == (AV *) NULL) ||
+ if ((q == (const Quantum *) NULL) || (av == (AV *) NULL) ||
(SvTYPE(av) != SVt_PVAV))
PUSHs(&sv_undef);
else
i;
i=0;
- indexes=GetAuthenticIndexQueue(image);
scale=1.0;
if (normalize != MagickFalse)
scale=QuantumRange;
if (((channel & RedChannel) != 0) && (i <= av_len(av)))
{
- SetPixelRed(q,ClampToQuantum(scale*SvNV(*(
- av_fetch(av,i,0)))));
+ SetPixelRed(image,ClampToQuantum(scale*SvNV(*(
+ av_fetch(av,i,0)))),q);
i++;
}
if (((channel & GreenChannel) != 0) && (i <= av_len(av)))
{
- SetPixelGreen(q,ClampToQuantum(scale*SvNV(*(
- av_fetch(av,i,0)))));
+ SetPixelGreen(image,ClampToQuantum(scale*SvNV(*(
+ av_fetch(av,i,0)))),q);
i++;
}
if (((channel & BlueChannel) != 0) && (i <= av_len(av)))
{
- SetPixelBlue(q,ClampToQuantum(scale*SvNV(*(
- av_fetch(av,i,0)))));
+ SetPixelBlue(image,ClampToQuantum(scale*SvNV(*(
+ av_fetch(av,i,0)))),q);
i++;
}
- if ((((channel & IndexChannel) != 0) &&
+ if ((((channel & BlackChannel) != 0) &&
(image->colorspace == CMYKColorspace)) && (i <= av_len(av)))
{
- SetPixelIndex(indexes,ClampToQuantum(scale*
- SvNV(*(av_fetch(av,i,0)))));
+ SetPixelBlack(image,ClampToQuantum(scale*
+ SvNV(*(av_fetch(av,i,0)))),q);
i++;
}
- if (((channel & OpacityChannel) != 0) && (i <= av_len(av)))
+ if (((channel & AlphaChannel) != 0) && (i <= av_len(av)))
{
- SetPixelOpacity(q,ClampToQuantum(scale*
- SvNV(*(av_fetch(av,i,0)))));
+ SetPixelAlpha(image,ClampToQuantum(scale*
+ SvNV(*(av_fetch(av,i,0)))),q);
i++;
}
(void) SyncAuthenticPixels(image,exception);
ChannelStatistics(GreenChannel);
ChannelStatistics(BlueChannel);
if (image->colorspace == CMYKColorspace)
- ChannelStatistics(IndexChannel);
+ ChannelStatistics(BlackChannel);
if (image->matte != MagickFalse)
- ChannelStatistics(OpacityChannel);
+ ChannelStatistics(AlphaChannel);
channel_statistics=(ChannelStatistics *)
RelinquishMagickMemory(channel_statistics);
}