Apologies, wrong patch. This is the correct one.

--- openjpeg-1.5.2/applications/codec/convert.c.orig	2014-03-27 11:58:06.000000000 +0100
+++ openjpeg-1.5.2/applications/codec/convert.c	2015-02-11 00:53:46.000000000 +0100
@@ -243,7 +243,10 @@
 
 	if(fwrite(&pixel_depth, 1, 1, fp) != 1) goto fails;
 
-	image_desc = 8; /* 8 bits per component. */
+	image_desc = // bits 0-3 are # of alpha bits per pixel
+		bits_per_pixel == 16 ? 1 :
+		bits_per_pixel == 32 ? 8 :
+		0;
 
 	if (flip_image)
 		image_desc |= 32;

Reply via email to