sRGB and PDF

202 views
Skip to first unread message

Corey Lucier

unread,
Apr 5, 2017, 12:00:44 PM4/5/17
to skia-discuss
I understand there is color profile support coming for image encoding in Skia (or at least it's a work in progress).

Wondering if we'll have something similar for PDF export as well?  Currently PDFs generated by Skia seem to leverage minimal image compression and no color profile or am I mistaken?

-C

Hal Canary

unread,
Apr 5, 2017, 12:16:13 PM4/5/17
to skia-discuss
Good question.

I have been holding out on thinking about color profiles in SkPDF until someone asks for it.

If you call `SkDocument::MakePDF()` with the `pdfa` argument set to true, SkPDF will produce a PDF/A2b-conforming PDF that claims sRGB output intent for the entire document.  With more other profiles now in Skia, this is not always true.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

Corey Lucier

unread,
Apr 5, 2017, 12:55:07 PM4/5/17
to skia-discuss
To clarify, even with pdfa arg, and "sRGB intent claimed", does this mean all the images within are converted or no.

-C

Brian Osman

unread,
Apr 5, 2017, 1:00:37 PM4/5/17
to skia-d...@googlegroups.com
Currently, no. We've been focusing on the SW and GPU backends in our color work. However, to achieve that, we've been adding plenty of facilities within Skia to do color space conversion, and track the original color space of images, etc... I could imagine (at least) two different ways of leveraging this in PDF: Either we just tag the document as sRGB and transform all images to sRGB, or we preserve the color space information on each image within the document (it's my understanding that PDF allows for this). Would either approach be clearly preferable? (It seems like we'd prefer to keep the images tagged correctly and unmodified, so we don't clamp the gamut of wide-gamut images, but I don't know if there are non-Adobe PDF applications that would behave better with the simpler version).

On Wed, Apr 5, 2017 at 12:55 PM, Corey Lucier <corey....@gmail.com> wrote:
To clarify, even with pdfa arg, and "sRGB intent claimed", does this mean all the images within are converted or no.

-C

--

Andreea Dieaconu

unread,
Jan 12, 2022, 10:41:58 AM1/12/22
to skia-discuss
Hello and Happy New Year!!

Reopening this conversation -- Is there a way to label an entire PDF document as sRGB

The `fPDFA` argument set to true doesn't explicitly add new color profile info to the document, i.e. the document is still labeled as "DeviceRGB color space".
Can we explicitly set the sRGB color space?
Screenshot 2022-01-12 at 17.29.57.png  vs.  Screenshot 2022-01-12 at 17.37.03.png
1st photo: PDF file with sRGB color profile embedded; 
2nd photo: using skia with fPDFA=true

Thanks,
Andreea 
Pe miercuri, 5 aprilie 2017, la 20:00:37 UTC+3, brian...@google.com a scris:
Currently, no. We've been focusing on the SW and GPU backends in our color work. However, to achieve that, we've been adding plenty of facilities within Skia to do color space conversion, and track the original color space of images, etc... I could imagine (at least) two different ways of leveraging this in PDF: Either we just tag the document as sRGB and transform all images to sRGB, or we preserve the color space information on each image within the document (it's my understanding that PDF allows for this). Would either approach be clearly preferable? (It seems like we'd prefer to keep the images tagged correctly and unmodified, so we don't clamp the gamut of wide-gamut images, but I don't know if there are non-Adobe PDF applications that would behave better with the simpler version).

On Wed, Apr 5, 2017 at 12:55 PM, Corey Lucier <corey....@gmail.com> wrote:
To clarify, even with pdfa arg, and "sRGB intent claimed", does this mean all the images within are converted or no.

-C

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages