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

ICC profiles support for images #2856

Open
13xforever opened this issue Mar 1, 2013 · 15 comments
Open

ICC profiles support for images #2856

13xforever opened this issue Mar 1, 2013 · 15 comments

Comments

@13xforever
Copy link

Right now pdf.js ignores embedded color profiles of any kind.

Here's a test pdf that looks just fine with Windows Reader on Windows 8, but shows no support in PDF.js.

And yes, Firefox does work (same test, but as html: http://www.color.org/version4html.xalter)

@13xforever
Copy link
Author

Details:
firefox 21.0a2 (2013-02-28)
pdf.js version 0.7.256
screenshot: icc_pdf

@gigaherz
Copy link
Contributor

gigaherz commented Mar 1, 2013

The HTML site shows version 2 support only in here (windows 7 x64, firefox aurora), is this something new to windows 8?

@gigaherz
Copy link
Contributor

gigaherz commented Mar 1, 2013

SumatraPDF doesn't support those profiles either, so I wonder how important the support really is?

@13xforever
Copy link
Author

ICCv4 is disabled by default in Firefox, you have to flip gfx.color_management.enablev4 to True

@13xforever
Copy link
Author

I don't know how important it is, but I couldn't find any relevant bug, so I made a new one with links to test cases.

@gigaherz
Copy link
Contributor

gigaherz commented Mar 1, 2013

Yeah it's okay, better to have a tracking bug. Worst case the devs would close as "won't fix", best case it gives some dev or contributor something to do ;P

@SamyCookie
Copy link

I don't know if it works, but if it can help someone to implement ICC profiles, I found this:
https://formats.kaitai.io/icc_4/javascript.html
It seems to be CC0 license, it may be a start to begin ICC profiles support.

@SumatraPeter
Copy link

Frankly it's a bit ridiculous that Firefox's PDF viewer (PDF.js) still lacks support for both v2 and v4 profiles in the year 2020. 😠 👎

@nvmnghia
Copy link

nvmnghia commented May 1, 2020

Seems that even Chrome doesn't support v4 profile.

@zivni

This comment was marked as off-topic.

@zivni

This comment was marked as duplicate.

@glennwilton
Copy link

Ive written an ICC engine in Javascript, It can read V2 and V2 color profiles, takes around 40ms to build a 33x33x33 LUT and CMYK>RGB via Uint8ClampedArray is in the order of 20-30 million PIXELS per second, Its not public yet, let me know if anyone is interested in me releasing the code.

@CKingX
Copy link

CKingX commented Jan 22, 2024

Seems that even Chrome doesn't support v4 profile.

Chrome supports v4 now. Same for Edge and iOS PDF viewer when I tested.

@glennwilton
Copy link

I released my Javascript ICC color engine here: https://www.npmjs.com/package/jscolorengine. I don't have time to implement it in PDFJS, but someone else might be able to look into it, however I believe its only halfway as there might be need to implement Type 1 Color Rendering Dictionary, however there is groundwork in my code for handling all of this.

@Headcrabed

This comment was marked as duplicate.

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

10 participants