[libgxps] images: add support for jpeg images with CMYK color space
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] images: add support for jpeg images with CMYK color space
- Date: Thu, 18 Aug 2022 16:02:26 +0000 (UTC)
commit 13063c430bbe3621b351924603d7e9b65dc57ea8
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Thu Aug 18 17:57:07 2022 +0200
images: add support for jpeg images with CMYK color space
libgxps/gxps-images.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/libgxps/gxps-images.c b/libgxps/gxps-images.c
index 464d848..ffe1d3c 100644
--- a/libgxps/gxps-images.c
+++ b/libgxps/gxps-images.c
@@ -536,6 +536,12 @@ gxps_images_create_from_jpeg (GXPSArchive *zip,
p[2] = line[0];
p[3] = 0xff;
break;
+ case JCS_CMYK:
+ p[0] = line[2] * line[3] / 255;
+ p[1] = line[1] * line[3] / 255;
+ p[2] = line[0] * line[3] / 255;
+ p[3] = 0xff;
+ break;
default:
GXPS_DEBUG (g_message ("Unsupported jpeg color space %s",
_jpeg_color_space_name
(cinfo.out_color_space)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]