Re: CMYK Colors

2009-09-16 Thread Jeremias Maerki
On 16.09.2009 14:37:12 Venkat Reddy wrote:
 Hi,
 
 Can someone please explain me the following queries?
 
 1. What is uncalibrated CMYK color space?

That refers to device-specific CMYK colors, i.e. the author of the
document already has to know which printer a document is printed on and
chooses the colors so they look good on that printer.

In contrast to that: if you're working in a calibrated color space
(established by a color profile), your colors get converted as necessary
in downstream processes in order to recreate the color you intended on
any printer. Well, that's a simplified explanation and color experts
would probably cry out loud, but it's sufficient to explain the
difference.

 2. What extent the FOP supports this feature?

FOP has a proprietary color function that allows to specify
device-specific/uncalibrated CMYK colors:
http://xmlgraphics.apache.org/fop/trunk/extensions.html#color-functions

I just noticed that I didn't commit some changes that would support a
#CMYK pseudo-color-profile as other XSL-FO implementations use. I'll
have to look into that. It would allow something like this:
rgb-icc(1.0,1.0,0.0,#CMYK,0.0,0.0,1.0,0.0)

 3. I have got the following fo source code to specify a background color 
 from the CMYK color profile, from which I am able to produce all three
 differents documents (PDF, AFP, and PS):
 
 ?xml version=1.0 encoding=utf-8?
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
   fo:simple-page-master master-name=demo
fo:region-body 
 background-color=rgb-icc(100%,0%,0%,CMYKProfile,0,1,1,0)/
   /fo:simple-page-master
  /fo:layout-master-set
  fo:declarations
fo:color-profile color-profile-name=CMYKProfile 
 src=ECI_Offset_2009/ISOcoated_v2_eci.icc/
  /fo:declarations
  fo:page-sequence master-reference=demo
   fo:flow flow-name=xsl-region-body
 fo:block color=rgb-icc(0%,0%,0%,CMYKProfile,0,0,0,1)Demo/fo:block
   /fo:flow
  /fo:page-sequence
 /fo:root
 
 I have downloaded this fo file from the bug 
 https://issues.apache.org/bugzilla/show_bug.cgi?id=43705;.
 
 Does this means FOP supports CMYK feature? (I have used the FOP Trunk 
 source for this..)

This is using calibrated CMYK colors. The fo:color-profile element
establishes the ICC color profile under the name CMYKProfile which is
then used for output formats that support ICC profiles (just PDF at the
moment). In PostScript, for example, this is mapped to the sRGB fallback.

 4. There is a class by name 'CMYKColorSpace.java', when will it be used?

As the javadocs say, it is used for uncalibrated CMYK color, i.e. for
device-specific CMYK color and when there's no ICC color profile.

When you use the cmyk() color function, this class is referenced by the
ColorExt instance representing the CMYK color resulting from evaluating
the cmyk() function.

HTH


Jeremias Maerki



Re: CMYK Colors

2009-09-16 Thread Venkat Reddy

Hi Jeremias,

Excellent. Thanks for your quick response.

Thanks,
Venkat.

Jeremias Maerki wrote:

On 16.09.2009 14:37:12 Venkat Reddy wrote:
  

Hi,

Can someone please explain me the following queries?

1. What is uncalibrated CMYK color space?



That refers to device-specific CMYK colors, i.e. the author of the
document already has to know which printer a document is printed on and
chooses the colors so they look good on that printer.

In contrast to that: if you're working in a calibrated color space
(established by a color profile), your colors get converted as necessary
in downstream processes in order to recreate the color you intended on
any printer. Well, that's a simplified explanation and color experts
would probably cry out loud, but it's sufficient to explain the
difference.

  

2. What extent the FOP supports this feature?



FOP has a proprietary color function that allows to specify
device-specific/uncalibrated CMYK colors:
http://xmlgraphics.apache.org/fop/trunk/extensions.html#color-functions

I just noticed that I didn't commit some changes that would support a
#CMYK pseudo-color-profile as other XSL-FO implementations use. I'll
have to look into that. It would allow something like this:
rgb-icc(1.0,1.0,0.0,#CMYK,0.0,0.0,1.0,0.0)

  
3. I have got the following fo source code to specify a background color 
from the CMYK color profile, from which I am able to produce all three

differents documents (PDF, AFP, and PS):

?xml version=1.0 encoding=utf-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 fo:layout-master-set
  fo:simple-page-master master-name=demo
   fo:region-body 
background-color=rgb-icc(100%,0%,0%,CMYKProfile,0,1,1,0)/

  /fo:simple-page-master
 /fo:layout-master-set
 fo:declarations
   fo:color-profile color-profile-name=CMYKProfile 
src=ECI_Offset_2009/ISOcoated_v2_eci.icc/

 /fo:declarations
 fo:page-sequence master-reference=demo
  fo:flow flow-name=xsl-region-body
fo:block color=rgb-icc(0%,0%,0%,CMYKProfile,0,0,0,1)Demo/fo:block
  /fo:flow
 /fo:page-sequence
/fo:root

I have downloaded this fo file from the bug 
https://issues.apache.org/bugzilla/show_bug.cgi?id=43705;.


Does this means FOP supports CMYK feature? (I have used the FOP Trunk 
source for this..)



This is using calibrated CMYK colors. The fo:color-profile element
establishes the ICC color profile under the name CMYKProfile which is
then used for output formats that support ICC profiles (just PDF at the
moment). In PostScript, for example, this is mapped to the sRGB fallback.

  

4. There is a class by name 'CMYKColorSpace.java', when will it be used?



As the javadocs say, it is used for uncalibrated CMYK color, i.e. for
device-specific CMYK color and when there's no ICC color profile.

When you use the cmyk() color function, this class is referenced by the
ColorExt instance representing the CMYK color resulting from evaluating
the cmyk() function.

HTH


Jeremias Maerki