[gimp] plug-ins/common/file-jp2-load: Check for other kinds of alpha components
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins/common/file-jp2-load: Check for other kinds of alpha components
- Date: Mon, 18 Oct 2010 13:52:00 +0000 (UTC)
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]