[gs-devel] Getting a JPX stream's colorspace

Ralph Giles ralph.giles at artifex.com
Thu Nov 29 14:48:25 PST 2007


On Fri, Nov 30, 2007 at 01:11:26AM +0300, Igor V. Melichev wrote:

> Well, now we have 3 spaces with no parameters (DeviceGray, DeviceRGB, 
> DeviceCMYK),
> and 2 with parameters : CIEBasedABC and ICCBased.

Indexed also has parameters.

> I think we must not assume that the PDF spec won't be improved with it.
> So lets keep in mind that Separation and DeviceN may be possible
> in future.

There's also the issue of transparency. The PDF spec currently leaves 
this fairly unspecified, but I expect we'll see it at this point. I 
understand the graphics library has support for images with a separate 
transparency mask, but not direct RGBA-style image data?

> If it is restricted with a specific RGB, it can't be used generally.
> It could be used if it converts to as parameterized RGB,
> such as an ICC profile. Please explain more if you want me to think
> in this direction.

I don't know what you mean by "parameterized RGB". I think the spec 
defines sRGB as a default so that "simple" image streams are in fact 
calibrated, and not in some unspecified device space as in formats like 
baseline JPEG. Because sRGB was designed to more-or-less match computer 
displays (and now some computer displays are designed to more-or-less 
match sRGB) this is a good default. For advanced use, one can specify an 
explicit ICC profile.

> Besides all this, I suspect we'll get another problem
> with the PDF interpreter code. As you know, it is coded in Postscript,
> and expects a Postscript representation of a color space.
> Will need to shunt it with passing the color space data
> around Postscript (because a converting the C structure to Postscript
> looks too cumbersome). Possibly we'll need structure object
> to handle gs_color_space_s by iref, and to extend the PDF interpreter with 
> it.

This Alex's domain, of course, but I was expecting to have to translate 
whatever is returned into Postscript structures. If we do this, it 
should be something we can reuse in porting the PDF interpreter to C.

 -r


More information about the gs-devel mailing list