Bug 94371 - top of the map is not rendered correctly
Summary: top of the map is not rendered correctly
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
: 71159 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-02 14:13 UTC by Thibaud Lutellier
Modified: 2016-03-07 19:24 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
part of the image is not correctly rendered (180.58 KB, text/plain)
2016-03-02 14:13 UTC, Thibaud Lutellier
Details
implement jpx streams with depth < 8 (1.19 KB, patch)
2016-03-04 12:41 UTC, Thomas Freitag
Details | Splinter Review
pdf that regresses (22.36 KB, application/pdf)
2016-03-07 09:03 UTC, Albert Astals Cid
Details
Don't scale image comps to 8 bits in case of an indexed colorspace (3.43 KB, patch)
2016-03-07 12:00 UTC, Thomas Freitag
Details | Splinter Review

Description Thibaud Lutellier 2016-03-02 14:13:08 UTC
Created attachment 122084 [details]
part of the image is not correctly rendered

Summary:
The top part of the Figure 2 in 113509.pdf is not rendered correctly.
This is visible with pdftocairo, pdftoppm, Evince and Okular.
The file is correctly displayed by acroread.

Steps to reproduce:
1) pdftoppm 345512.pdf test
2) eog test-1.ppm
3) acroread 113509.pdf
4) Compare the image to acroread rendering.

Actual Results:
The top of Figure 2 in 113509.pdf is not rendered correctly.

Expected Results:
The image should be displayed correctly, just like with acroread.
Comment 1 Thomas Freitag 2016-03-04 12:41:17 UTC
Created attachment 122110 [details] [review]
implement jpx streams with depth < 8

This patch fixes it
Comment 2 Albert Astals Cid 2016-03-06 21:47:21 UTC
Pushed.
Comment 3 Albert Astals Cid 2016-03-07 08:44:39 UTC
*** Bug 71159 has been marked as a duplicate of this bug. ***
Comment 4 Albert Astals Cid 2016-03-07 09:03:06 UTC
Thomas I did read the regression run incorrectly and the patch does actually introduce a regression, this pdf that was previously rendered correctly is now a black box.

Can you have a look?
Comment 5 Albert Astals Cid 2016-03-07 09:03:50 UTC
Created attachment 122136 [details]
pdf that regresses
Comment 6 Thomas Freitag 2016-03-07 11:58:04 UTC
(In reply to Albert Astals Cid from comment #4)
> Thomas I did read the regression run incorrectly and the patch does actually
> introduce a regression, this pdf that was previously rendered correctly is
> now a black box.
> 
> Can you have a look?

Who ever had this idea to scale image data just in case of jpx streams to 8 bit values but then treat index values in the reading function? This prevents a clean solution, in my eyes every solution looks like a dirty hack...

And because getImageParams() is called so early which already reads the jpx data and scales it I even have not yet the Gfx colorspace which is parsed later.
Comment 7 Thomas Freitag 2016-03-07 12:00:04 UTC
Created attachment 122138 [details] [review]
Don't scale image comps to 8 bits in case of an indexed colorspace

This does the (dirty) trick
Comment 8 Albert Astals Cid 2016-03-07 19:24:16 UTC
Good :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.