After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744120 - Cannot view JPEG images with GRAYSCALE colorspace in XPS documents
Cannot view JPEG images with GRAYSCALE colorspace in XPS documents
Status: RESOLVED FIXED
Product: libgxps
Classification: Platform
Component: general
0.2.x
Other All
: Normal normal
: ---
Assigned To: libgxps maintainers
libgxps maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-07 04:43 UTC by Paul Wise
Modified: 2015-06-04 12:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paul Wise 2015-02-07 04:43:30 UTC
I'm using evince 3.14.1-1 and libgxps 0.2.2-3+b2 from Debian jessie. When I view the attached documents in evince, I don't get the images displayed. Other images from the same batch of scans do have their images displayed though.
Comment 1 Paul Wise 2015-02-07 04:46:52 UTC
The tarball was too big to attach to the bug so I uploaded it here:

http://bonedaddy.net/pabs3/files/tmp/evince-xps-no-display-images.tar
Comment 2 Carlos Garcia Campos 2015-02-15 16:23:22 UTC
The problem is that GRAYSCALE colorspace is not implemented when loading jpeg files. You can see it by compiling with --enable-debug and running the test program with GXPS_DEBUG, see:

$ GXPS_DEBUG=1 ./test-gxps KonMin\ 200dpi\ fine.xps
GXPS-Message: save
GXPS-Message: transform (1,000000, 0,000000, 0,000000, 1,000000) [0,000000, 0,000000]
GXPS-Message: set_fill_pattern (image)
GXPS-Message: Unsupported jpeg color space GRAYSCALE
GXPS-Message: Unsupported jpeg color space GRAYSCALE
GXPS-Message: move_to (0,000000, 0,000000)
GXPS-Message: line_to (793,440000, 0,000000)
GXPS-Message: line_to (793,440000, 1122,240000)
GXPS-Message: line_to (0,000000, 1122,240000)
GXPS-Message: close_path
GXPS-Message: restore
Comment 3 Carlos Garcia Campos 2015-02-15 17:28:57 UTC
I've just pushed a patch to add support for GREYSCALE color space jpeg images, but those images are still not correctly rendered. I mean, the image surfaces are correctly rendered, but we are not painting the surfaces correctly inside the page for the documents you provided. For some reason they are unscaled, I guess we are not correctly computing viewport and/or viewbox. This needs some more investigation.
Comment 4 Carlos Garcia Campos 2015-06-04 12:12:30 UTC
Found the issue, we were indeed not applying the right scale for ImageBrush elements. I've just fixed it in git master, it was indeed unrelated to this issue, so I'm closing it now.