+2017-11-12 7.0.7-12 Cristy <quetzlzacatenango@image...>
+ * The -tint option no longer munges the alpha channel (reference
+ http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=33070).
+
2017-11-11 7.0.7-11 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.7-11, GIT revision 21635:0447c6b46:20171111.
double
weight;
- register ssize_t
- i;
-
- for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
- {
- PixelChannel channel = GetPixelChannelChannel(image,i);
- PixelTrait traits = GetPixelChannelTraits(image,channel);
- PixelTrait tint_traits=GetPixelChannelTraits(tint_image,channel);
- if ((traits == UndefinedPixelTrait) ||
- (tint_traits == UndefinedPixelTrait))
- continue;
- if (((tint_traits & CopyPixelTrait) != 0) ||
- (GetPixelWriteMask(image,p) <= (QuantumRange/2)))
- {
- SetPixelChannel(tint_image,channel,p[i],q);
- continue;
- }
- }
GetPixelInfo(image,&pixel);
+ if (GetPixelWriteMask(image,p) <= (QuantumRange/2))
+ {
+ SetPixelViaPixelInfo(tint_image,&pixel,q);
+ p+=GetPixelChannels(image);
+ q+=GetPixelChannels(tint_image);
+ continue;
+ }
weight=QuantumScale*GetPixelRed(image,p)-0.5;
pixel.red=(double) GetPixelRed(image,p)+color_vector.red*(1.0-(4.0*
(weight*weight)));
weight=QuantumScale*GetPixelBlack(image,p)-0.5;
pixel.black=(double) GetPixelBlack(image,p)+color_vector.black*(1.0-(4.0*
(weight*weight)));
+ pixel.alpha=GetPixelAlpha(image,p);
SetPixelViaPixelInfo(tint_image,&pixel,q);
p+=GetPixelChannels(image);
q+=GetPixelChannels(tint_image);