Bug for RGBO image
Posted: 2008-11-18T19:42:59-07:00
I found bug for RGBO image @ line, plane and prtition interlace.
this is patch for 6.4.5-8
this is patch for 6.4.5-8
Code: Select all
--- coders/rgb.c.orig 2008-11-12 10:58:15.000000000 +0900
+++ coders/rgb.c 2008-11-19 11:32:06.000000000 +0900
@@ -178,7 +178,10 @@
image->matte=MagickTrue;
}
if (LocaleCompare(image_info->magick,"RGBO") == 0)
- quantum_type=RGBOQuantum;
+ {
+ quantum_type=RGBOQuantum;
+ image->matte=MagickTrue;
+ }
if (image_info->number_scenes != 0)
while (image->scene < image_info->scene)
{
Code: Select all
--- magick/quantum-export.c.orig 2008-11-19 10:34:24.000000000 +0900
+++ magick/quantum-export.c 2008-11-19 10:38:50.000000000 +0900
@@ -1341,6 +1341,90 @@
}
break;
}
+ case OpacityQuantum:
+ {
+ switch (quantum_info->depth)
+ {
+ case 8:
+ {
+ register unsigned char
+ pixel;
+
+ for (x=0; x < (long) number_pixels; x++)
+ {
+ pixel=ScaleQuantumToChar(p->opacity);
+ q=PopCharPixel(pixel,q);
+ p++;
+ q+=quantum_info->pad;
+ }
+ break;
+ }
+ case 16:
+ {
+ register unsigned short
+ pixel;
+
+ for (x=0; x < (long) number_pixels; x++)
+ {
+ pixel=ScaleQuantumToShort(p->opacity);
+ q=PopShortPixel(endian,pixel,q);
+ p++;
+ q+=quantum_info->pad;
+ }
+ break;
+ }
+ case 32:
+ {
+ register unsigned long
+ pixel;
+
+ if (quantum_info->format == FloatingPointQuantumFormat)
+ {
+ for (x=0; x < (long) number_pixels; x++)
+ {
+ q=PopFloatPixel(&quantum_state,(float) p->opacity,q);
+ p++;
+ q+=quantum_info->pad;
+ }
+ break;
+ }
+ for (x=0; x < (long) number_pixels; x++)
+ {
+ pixel=ScaleQuantumToLong(p->opacity);
+ q=PopLongPixel(endian,pixel,q);
+ p++;
+ q+=quantum_info->pad;
+ }
+ break;
+ }
+ case 64:
+ {
+ if (quantum_info->format == FloatingPointQuantumFormat)
+ {
+ for (x=0; x < (long) number_pixels; x++)
+ {
+ q=PopDoublePixel(&quantum_state,(double) p->opacity,q);
+ p++;
+ q+=quantum_info->pad;
+ }
+ break;
+ }
+ }
+ default:
+ {
+ scale=GetQuantumScale(image->depth);
+ for (x=0; x < (long) number_pixels; x++)
+ {
+ q=PopQuantumPixel(&quantum_state,image->depth,ScaleQuantumToAny(
+ p->opacity,image->depth,scale),q);
+ p++;
+ q+=quantum_info->pad;
+ }
+ break;
+ }
+ }
+ break;
+ }
case BlackQuantum:
{
if (image->colorspace != CMYKColorspace)