Skip to content

Commit bf6f4f6

Browse files
committed
Corrected setting the opacity (#285)
1 parent 5c7fecc commit bf6f4f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎coders/jp2.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
523523
}
524524
case 1:
525525
{
526-
if (image->matte != MagickFalse)
526+
if ((jp2_image->numcomps == 2) && (image->matte != MagickFalse))
527527
{
528528
q->opacity=ClampToQuantum((double) QuantumRange-pixel);
529529
break;

0 commit comments

Comments
 (0)