[libgxps] gxps-images: Add support for JPEG images with GRAYSCALE color space
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] gxps-images: Add support for JPEG images with GRAYSCALE color space
- Date: Sun, 15 Feb 2015 17:25:34 +0000 (UTC)
commit d94f36d4d2256aafa0ad7f032538b68eb18e1605
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Feb 15 18:07:07 2015 +0100
gxps-images: Add support for JPEG images with GRAYSCALE color space
https://bugzilla.gnome.org/show_bug.cgi?id=744120
libgxps/gxps-images.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/libgxps/gxps-images.c b/libgxps/gxps-images.c
index 28e26b2..8629b2b 100644
--- a/libgxps/gxps-images.c
+++ b/libgxps/gxps-images.c
@@ -263,6 +263,12 @@ gxps_images_create_from_jpeg (GXPSArchive *zip,
p[2] = line[0];
p[3] = 0xff;
break;
+ case JCS_GRAYSCALE:
+ p[0] = line[0];
+ p[1] = line[0];
+ p[2] = line[0];
+ p[3] = 0xff;
+ break;
default:
GXPS_DEBUG (g_message ("Unsupported jpeg color space %s",
_jpeg_color_space_name
(cinfo.out_color_space)));
@@ -272,10 +278,6 @@ gxps_images_create_from_jpeg (GXPSArchive *zip,
g_object_unref (stream);
return NULL;
}
- p[0] = line[2];
- p[1] = line[1];
- p[2] = line[0];
- p[3] = 0xff;
line += cinfo.out_color_components;
p += 4;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]