[gimp] plug-ins/common/file-jp2-load: Check for other kinds of alpha components



commit 9bbcf8c6b3fe0a960f8c4bc64169853611e35eb7
Author: Mukund Sivaraman <muks banu com>
Date:   Mon Oct 18 19:19:59 2010 +0530

    plug-ins/common/file-jp2-load: Check for other kinds of alpha components
    
    ImageMagick seems to write out the 'matte' component (number 3).

 plug-ins/common/file-jp2-load.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/common/file-jp2-load.c b/plug-ins/common/file-jp2-load.c
index 62cbe12..5862a84 100644
--- a/plug-ins/common/file-jp2-load.c
+++ b/plug-ins/common/file-jp2-load.c
@@ -267,6 +267,11 @@ load_image (const gchar  *filename,
           return -1;
         }
       components[3] = jas_image_getcmptbytype (image, JAS_IMAGE_CT_OPACITY);
+
+      /* ImageMagick seems to write out the 'matte' component (number 3) */
+      if (components[3] == -1)
+        components[3] = jas_image_getcmptbytype (image, 3);
+
       if (components[3] != -1)
         {
           num_components = 4;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]