2008/2/22, Alexandre Prokoudine <alexandre.prokoudine@...400...>:
On Fri, Feb 22, 2008 at 6:38 PM, Aubanel MONNIER wrote:
Hello all, I was looking at the cairo-pdf export code and wondered how hard it
would be
to output PDFs in CMYK(a) colorspace ? From what I've seen it shoudl be fairly easy on inkscape side. However the status of CMYK(a) support in
Cairo
looks unclear to me (found some references in cairo ML but nothing in
the
actual cairo headers, + a ruby (?) implementation for it). Does anyone
have
a some knowledge / pointers on that ?
Not implemented yet.
I spoke to Carl Worth and Behdad Esfahbod about it before (November 2007) and they basically told me that everyone asking about it has his/her own understanding of what CMYK support means.
Specifically, Behdad told me that a good proposal coming from Inkscape team might help designing API.
Alexandre
I'm not sure that I understand everything, but in terms of API i think the _rgba functions should be replaced by _color functions with type color = | Rgba of int8 * int8 * int8 * int8 | Cmyka of int8 * int8 * int8 * int8* int8 | Spot of spot_color Possibility to define a conversion function for back-ends whose do not know how to handle certain color types might prove useful I guess (defaults to returning an error "I do not know how to handle this color type"); Additional thought might be necessary for CMYK and TIFFs in CMYK, but I guess this could be handled transparently (just look at the data in the bitmap ?). For me the only big question in terms of API is: should the colorspace be document specific or on a per color basis ? Is there any use case where you want to mix on the same document RGBs and CMYKs ? I don't think so, but I might be wrong.
On Fri, 22 Feb 2008 17:59:45 +0100, "Aubanel MONNIER" <aubanel@...400...> wrote:
For me the only big question in terms of API is: should the colorspace be document specific or on a per color basis ? Is there any use case where you want to mix on the same document RGBs and CMYKs ? I don't think so, but I might be wrong.
The correct way to do this would be to specify an ICC profile to establish the document's color model, and then specify non-rgb colors as ICC colors.
-mental
2008/2/22, MenTaLguY <mental@...3...>:
On Fri, 22 Feb 2008 17:59:45 +0100, "Aubanel MONNIER" <aubanel@...400...> wrote:
For me the only big question in terms of API is: should the colorspace
be
document specific or on a per color basis ? Is there any use case where you want to mix on the same document RGBs and CMYKs ? I don't think so,
but I
might be wrong.
The correct way to do this would be to specify an ICC profile to establish the document's color model, and then specify non-rgb colors as ICC colors.
-mental
How does this translate in terms of API ?
From what I've guessed from ./svg/svg-icc-color.h , could this be something
like surface_set_icc(char * name, icc* data); // attach an icc to a document and set_source_icc_color(context *cr, char * icc_name, float *color); Does icc handle alpha or should an additional alpha paremeter be present in set_source_icc_color ?
To get the ball rolling, what do you think if I setup a wiki page to put together something we could propose to the cairo ML ? -aubanel
2008/2/22, Alexandre Prokoudine <alexandre.prokoudine@...400...>:
On Fri, Feb 22, 2008 at 9:13 PM, Aubanel MONNIER wrote:
To get the ball rolling, what do you think if I setup a wiki page to put together something we could propose to the cairo ML ?
Or you could start a blueprint _and_ a wiki page :)
Done:
https://blueprints.launchpad.net/inkscape/+spec/icc-for-cairo Feel free to alter the wiki if you have some better ideas or spot some misunderstandings/errors on my side.
Thanks mental for correcting & completing this spec. About the open points:
- Should surface profile/color rendering changes be allowed once the surface is being actively used?
Why should we allow this ? Is there any use case ? The ones I can see are: render the same surface with two different profiles at the same time (e.g. on a multihead screen with different profiles, but is'nt X already handling that, batch export of the same file in many different colorspaces)
- How should gradients work in this regime?
What is the issue here ? like we have a set_source_icc_color, we can have a set_stop_icc color, isnt'it ?
- How should *cairo_color_profile_t*s be created/loaded?
lcms provides 2 ways, load from a file or from memory. I think cairo should provide the same ways, I dont see an additional one that could bring some benefit here, appart from direct reuse of a lcms handler for applications already using lcms like inkscape but that's not really clean - makes cairo API depend from lcms API.
To get things going on the cairo side, do you think I should notify the cairo ML about this blue print ?
Kind regards, Aubanel.
2008/2/22, Aubanel MONNIER <aubanel@...400...>:
2008/2/22, Alexandre Prokoudine <alexandre.prokoudine@...400...>:
On Fri, Feb 22, 2008 at 9:13 PM, Aubanel MONNIER wrote:
To get the ball rolling, what do you think if I setup a wiki page to
put
together something we could propose to the cairo ML ?
Or you could start a blueprint _and_ a wiki page :)
Done:
https://blueprints.launchpad.net/inkscape/+spec/icc-for-cairo Feel free to alter the wiki if you have some better ideas or spot some misunderstandings/errors on my side.
participants (3)
-
Alexandre Prokoudine
-
Aubanel MONNIER
-
MenTaLguY