Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image in pdf don't display #447

Closed
gcode-importer opened this issue Dec 4, 2014 · 13 comments
Closed

Image in pdf don't display #447

gcode-importer opened this issue Dec 4, 2014 · 13 comments

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 447

What steps will reproduce the problem?
1. Open the attached document in chrome
2. Image on page 11 is black

This issue is from 
https://code.google.com/p/chromium/issues/detail?id=437549

Reported by bo_xu@foxitsoftware.com on 2014-12-04 18:20:16


- _Attachment: [community-amenity-contributions-through-rezonings-policy.pdf](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-0/community-amenity-contributions-through-rezonings-policy.pdf)_
@gcode-importer
Copy link
Author

@bo,

All images are not decoded properly using the latest trunk (r2949).
image 1.jp2 appears as fully black. The other are "blurred", on a black background
which isn't right.

"Blurred" issue : Number of tile part specified is not right (same issue as issue 254
or issue 423).

cmap box doesn't appear in the jp2 header box & is not read at all by OpenJPEG.
cmap box is "invalid" (not according to standard but according to what it is intended
to show) :
  Red channel shall use palette mapping using palette column 0 : OK 
  Green channel shall use direct mapping : KO, should be  palette mapping using palette
column 1
  Blue channel shall use direct mapping : KO, should be  palette mapping using palette
column 2

With all of the above manually corrected, images are properly decoded.

I will let someone else (Antonin ?) have a look at this because I might be missing
something regarding ISO-15444 (which ever part/amendment/...).
Another thing is the values for precedence & approx in the colr box which aren't what's
expected (but ignored by OpenJPEG)

Reported by mayeut on 2014-12-04 20:48:04


- _Attachment: [1.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/1.jp2)_ - _Attachment: [2.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/2.jp2)_ - _Attachment: [3.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/3.jp2)_ - _Attachment: [4.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/4.jp2)_ - _Attachment: [5.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/5.jp2)_ - _Attachment: [6.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/6.jp2)_ - _Attachment: [7.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/7.jp2)_ - _Attachment: [8.jp2](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-1/8.jp2)_

@gcode-importer
Copy link
Author

@darbois, thank you so much for the quick debugging.

Reported by bo_xu@foxitsoftware.com on 2014-12-04 21:11:21

@gcode-importer
Copy link
Author

Reported by mayeut on 2014-12-05 23:25:17

@gcode-importer
Copy link
Author

This is the exact same issue as issue 235.
I'm not marking this one as duplicate just yet.

Reported by mayeut on 2014-12-06 10:58:40

  • Status changed: Started

@gcode-importer
Copy link
Author

Here's a patch to get those images to decode properly (with patch from issue 254 applied
as well).

Not sure we wan't this in the trunk like this but it gives the idea of what's going
on.
Solves the issue 235 as well.

Reported by mayeut on 2014-12-06 11:08:28


- _Attachment: [issue447.patch](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-5/issue447.patch)_

@gcode-importer
Copy link
Author

Forgot to mention that it's been tested against the test suite with no regressions.
Nevertheless, it shall be reviewed.

Reported by mayeut on 2014-12-06 11:09:58

  • Status changed: Verified

@gcode-importer
Copy link
Author

'xpdf version 3.03' does show all images clear and sharp.

winfried

Reported by szukw000 on 2014-12-08 04:22:57

@gcode-importer
Copy link
Author

Is the patch in trunk now? Please let me know when I can update the code, thanks!

Reported by bo_xu@foxitsoftware.com on 2014-12-20 00:54:18

@gcode-importer
Copy link
Author

Reported by malaterre on 2015-01-07 16:43:41

@gcode-importer
Copy link
Author

@matthieu could you clarify this bug please (eg. the title). What remains to be done
? Only patch from comment #5 is needed ?

Reported by malaterre on 2015-01-07 17:44:23

@gcode-importer
Copy link
Author

@mathieu,

Those files are not valid jp2 files for multiple reasons (3 issues, see comment #2),
not sure how we could modify the title in this case.

The patch from comment #5 does not correct the issue 254 which comes with its own patch.

Reported by mayeut on 2015-01-07 23:15:23

@gcode-importer
Copy link
Author

Updated patch
Still needs (updated) patch from issue 254

Reported by mayeut on 2015-06-05 19:31:14


- _Attachment: [issue447-r3007.patch](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-447/comment-12/issue447-r3007.patch)_

@szukw000
Copy link
Contributor

@mayeut , @detonin , all images of issue #447 (0.jp2 ... 8.jp2) are broken.

All images have an ihdr, a colr and a pclr box inside jp2h, but a cmap box outside jp2h.

KDU refuses to show: "JPX source contains a codestream with a palette (pclr) box, but
no component mapping (cmap) box. This illegal situation ..."

winfried

@mayeut mayeut closed this as completed Jul 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants