|
List Info
Thread: Questions generating postscript files (CSA/CRD)
|
|
| Questions generating postscript files
(CSA/CRD) |
  Germany |
2007-02-14 15:28:06 |
Hello.
At frist I want to say thanks for lcms. I planned to add
color correction to
xsane since a long time but never started it until some
weeks ago I took a
look at lcms again and thought that now is the right time to
try it.
Adding preview and viewer support for RGB images to xsane
was much more easy
than I expected. The most work was to think about the
changes in the user
interface of xsane.
Doing the color correction while saving the image (instead
of embedding a
profile) also does work for RGB images. (I still have
problems with grayscale
images but this has to wait in the moment).
Now I am trying to find out how to create color corrected
RGB postscript
files. I looked through the lcms mailing list and found some
information in
the message
http://sourceforge.net/mailarchive/message.php?msg_
id=5763412
In the moment I try to create color corrected postscript
files by hand at
first:
1) I create a CSA with
icc2ps -i scanner.ICM > scanner.CSA
2) I create the CRD with
icc2ps -o printer.ICM > printer.CRD
3) I have a scanned image that is saved as (non color
corrected) RGB
postscript: image.ps
now I try to create a color corrected postscript by
concatening:
file "printer.CRD"
line "<< /UseCIEColor true >>
setpagedevice"
file "scanner.CSA"
file "image.ps"
line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
(this is IMAGE A)
but the message above explains it a bit different (but may
be there has
changed something in lcms since then):
file "printer.CRD"
remove "/Current exch /ColorRendering defineresource
pop"
(or create CRD with icc2ps -u)
add "setcolorrendering"
line "<< /UseCIEColor true >>
setpagedevice"
file "scanner.CSA"
file "image.ps"
line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
(this is IMAGE B)
I do not have a color printer to test the result, so I tried
to display the
results on my screen:
- display (imagemagick) does not show any color corrections
at all
- kghostview shows the original (untouched) image but does
not produce any
output for the files with CSA+CRD included
- gimp and "gs -sDEVICE=x11" show changes in the
colors with CSA+CRD included,
but the images A and B look different and I can not decide
on the screen which
one is the correct one.
Question 1: What is the correct way to create a postscript
file with CSA+CRD?
Question 2: How Do I produce a device independent postscipt
file with an
included CSA but without a CRD? Is it done this way:?
line "<< /UseCIEColor true >>
setpagedevice"
file "scanner.CSA"
file "image.ps"
line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
The postscript headers have to be moved to the top of the
file I think.
Question 3: (a bit OT, but may be you know): When I want
xsane to transfer the
postscript directly to the printer should I always prepend
the CRD to the
postscript file or does a real postscript printer know his
CRD and the CRD
should only be prepended for ghostscript? (or should the
ghostscript/printer
deamon prepend the CRD?)
Question 4: Is it good to store the image in RGB or should I
convert it to
CMYK before saving it as postscript?
Question 5: When I want to put images that are scanned with
different scanners
into one postscript file how do I apply different CSA to the
different
images?
This way?:
"<< /UseCIEColor true >>
setpagedevice"
CSA1
line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
image1
CSA2
line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
image2
Thanks for your help.
Best regards
Oliver
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
|
|
| Re: Questions generating postscript
files (CSA/CRD) |

|
2007-02-14 18:04:19 |
Oliver Rauch wrote:
> Now I am trying to find out how to create color
corrected RGB postscript
> files. I looked through the lcms mailing list and found
some information in
> the message
> http://sourceforge.net/mailarchive/message.php?msg_
id=5763412
>
> In the moment I try to create color corrected
postscript files by hand at
> first:
>
> 1) I create a CSA with
> icc2ps -i scanner.ICM > scanner.CSA
>
> 2) I create the CRD with
> icc2ps -o printer.ICM > printer.CRD
>
> 3) I have a scanned image that is saved as (non color
corrected) RGB
> postscript: image.ps
>
> now I try to create a color corrected postscript by
concatening:
>
> file "printer.CRD"
> line "<< /UseCIEColor true >>
setpagedevice"
> file "scanner.CSA"
> file "image.ps"
> line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
> (this is IMAGE A)
>
> but the message above explains it a bit different (but
may be there has
> changed something in lcms since then):
>
> file "printer.CRD"
> remove "/Current exch /ColorRendering
defineresource pop"
> (or create CRD with icc2ps -u)
> add "setcolorrendering"
> line "<< /UseCIEColor true >>
setpagedevice"
> file "scanner.CSA"
> file "image.ps"
> line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
> (this is IMAGE B)
Hi Oliver,
DefaultRGB and UseCIEColor are basically intended for
printing
documents, which don't use device independent color spaces
and which
specify colors in DeviceRGB (or DeviceCMYK) color space.
Many
applications are not color management aware and produce just
DeviceRGB
PS files. So when you print such a document, then DefaultRGB
and
UseCIEColor give you later, at printing time, the
opportunitly to assign
a particular interpretation to the DeviceRGB colors in the
document.
But if you create a new PS file anyway, then I would
possibly tend to
specify the image directly in its native, device independent
colorspace
(and not to use the indirection via UseCIEColor). E.g.
[ /CIEBased... ...contents of CSA... ] setcolorspace
<< ...image dictionary.. >> image
Note that the single operand (dictionary) version of the
"image"
operator needs to be used to specify images in CIEBased
color spaces
(and _not_ the 5 operand version, and also _not_ the
"colorimage" operator).
If you nevertheless want to use UseCIEColor and change the
Default<XXX>
resources, do it with global memory allocation enabled,
e.g.
currentglobal true setglobal
% use sRGB color space for DefaultGray and DefaultRGB
/DefaultGray
[ /CIEBasedA <<
/DecodeLMN [
{ dup 0.03928 le
{12.92321 div}
{0.055 add 1.055 div 2.4 exp}
ifelse
} bind dup dup
]
/MatrixLMN [0.4123907993 0.2126390059 0.0193308187
0.3575843394 0.7151686788 0.1191947798
0.1804807884 0.0721923154 0.9505321522]
/WhitePoint [0.9504559271 1.0 1.0890577508]
>> ] /ColorSpace defineresource pop
/DefaultRGB
[ /CIEBasedABC <<
/DecodeLMN [
{ dup 0.03928 le
{12.92321 div}
{0.055 add 1.055 div 2.4 exp}
ifelse
} bind dup dup
]
/MatrixLMN [0.4123907993 0.2126390059 0.0193308187
0.3575843394 0.7151686788 0.1191947798
0.1804807884 0.0721923154 0.9505321522]
/WhitePoint [0.9504559271 1.0 1.0890577508]
>> ] /ColorSpace defineresource pop
setglobal
<< /UseCIEColor true >> setpagedevice
otherwise you may get trouble, at least with some versions
of
ghostscript. On the other hand, also don't call
setpagedevice with
global allocation enabled, or you'll get trouble too with
ghostscript.
> I do not have a color printer to test the result, so I
tried to display the
> results on my screen:
>
> - display (imagemagick) does not show any color
corrections at all
>
> - kghostview shows the original (untouched) image but
does not produce any
> output for the files with CSA+CRD included
>
> - gimp and "gs -sDEVICE=x11" show changes in
the colors with CSA+CRD included,
> but the images A and B look different and I can not
decide on the screen which
> one is the correct one.
>
> Question 1: What is the correct way to create a
postscript file with CSA+CRD?
There is not just a single possible way. For instance:
% specify the image in a device independent CS
<< ...CRD contents ...>> setcolorrendering
[ /CIEBased... ...contents of CSA... ] setcolorspace
<< ...image dictionary.. >> image
...
showpage
or
% remap DeviceRGB to a CIEBased CS and
% specify the image in DeviceRGB CS
currentglobal true setglobal
/DefaultRGB [ /CIEBased... ...CSA contents... ]
/ColorSpace defineresource pop
setglobal
<< /UseCIEColor true >> setpagedevice
<< ...CRD contents... >> setcolorrendering
...image operands... colorimage
...
showpage
or etc.
>
>
> Question 2: How Do I produce a device independent
postscipt file with an
> included CSA but without a CRD? Is it done this way:?
See above.
> line "<< /UseCIEColor true >>
setpagedevice"
> file "scanner.CSA"
> file "image.ps"
> line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
>
> The postscript headers have to be moved to the top of
the file I think.
>
>
> Question 3: (a bit OT, but may be you know): When I
want xsane to transfer the
> postscript directly to the printer should I always
prepend the CRD to the
> postscript file or does a real postscript printer know
his CRD and the CRD
> should only be prepended for ghostscript? (or should
the ghostscript/printer
> deamon prepend the CRD?)
A "better" PS printer or RIP should know its CRD
(or even an ICC profile
instead of the CRD). Note, a PS document is no longer
device
independent, if it includes a CRD. IMO, printer
drivers/backends which
accept PostScript and which do the rendering via ghostscript
should
supply an appropriate CRD for the printer too, but I think
that
currently only a minority of them really does.
> Question 4: Is it good to store the image in RGB or
should I convert it to
> CMYK before saving it as postscript?
The following likely doesn't apply to e.g. professional
RIPs, but at
least ghostscript's color conversion via CSA/CRD is not as
accurate as
the conversion with ICC-based CMMs (e.g. via the lcms
engine).
Especially GS 7.xx gave unsatisfactory results (banding,
etc.); the
current 8.5x version work significantly better now, but a
small quality
difference to a conversion with an ICC-based CMM is IMO
still
noticeable. From this point of view it may indeed make sense
to convert
directly to the printer's native DeviceCMYK or DeviceRGB
color space
(depending on the printer's/driver's process color model) in
the
application, and to send the resulting DeviceCMYK or
DeviceRGB image to
the printer. This requires however that an ICC profile for
the printer's
colorspace is available to the application, and the
resulting PS file is
of course device dependent in this case.
> Question 5: When I want to put images that are scanned
with different scanners
> into one postscript file how do I apply different CSA
to the different
> images?
For instance:
[ /CIEBased... ...contents of CSA1... ] setcolorspace
<< ...image1 dictionary.. >> image
...
[ /CIEBased... ...contents of CSA2... ] setcolorspace
<< ...image2 dictionary.. >> image
> This way?:
>
> "<< /UseCIEColor true >>
setpagedevice"
> CSA1
> line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
> image1
> CSA2
> line "/DefaultRGB exch /ColorSpace defineresource
setcolorspace"
> image2
Regards,
Gerhard
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
|
|
| CIE2000 |
  New Zealand |
2007-02-21 03:21:45 |
Hi everybody
Can anybody point me to some information on what are
approiate values
for Kl, Kc, and Kh in CIE2000 Delta E. I assume these are
weighting
values but I can't seam to find any information on what
would be
suitable values to use, or how the affect the accuracy of
the DeltaE
cmsCIE2000DeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2, double
Kl, double
Kc, double Kh)
Glenn Wilton
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
|
|
| Re: Questions generating postscript
files (CSA/CRD) |
  Germany |
2007-02-21 14:53:27 |
Am Donnerstag, 15. Februar 2007 01:04 schrieb Gerhard
Fuernkranz:
> [ /CIEBased... ...contents of CSA... ]
setcolorspace
> << ...image dictionary.. >> image
>
> Note that the single operand (dictionary) version of
the "image"
> operator needs to be used to specify images in CIEBased
color spaces
> (and _not_ the 5 operand version, and also _not_ the
"colorimage"
> operator).
Hello Gerhard,
thanks for your help.
The postscript color management does work now.
Special thanks for the note about not to use the 5 operand
or colorimage
version!
Best regards
Oliver
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
|
|
| generating PDF files, Was: Questions
generating postscript files (CSA/CRD) |
  Germany |
2007-02-22 01:36:07 |
Am Donnerstag, 22. Februar 2007 00:42 schrieb Gerhard
Fuernkranz:
> Fine So I can
expect sooner or later a color management capable xsane?
Yes, you can. There are several little things that have to
be fixed but the
general color management functions already do work.
2 points that I have to work on are:
- ICC embedded profiles in PDF files do not work yet
- I have to understand how CM is done for grayscale images
May be someon has any experience in embedding ICC profiles
to PDF files,
here is how I tried it but with no success (no error
messages but also no
corrected colors):
4 0 obj
[/ICCBased 5 0 R]
endobj
5 0 obj
<< /N 3
/Alternate /DeviceRGB
/Filter [/A85 /FlateDecode]
/Length >>
stream
....
endstream
endobj
%d 0 obj
<< /Type /Page
/Parent 3 0 R
/ColorSpace 4 0 R
/MediaBox [%d %d %d %d]
/Contents %d 0 R
/Resources << /ProcSet %d 0 R >>
>>
endobj
I hope I can release xsane-0.993 soon as beta-tester
version.
A stable CM-version of xsane will need some more time.
Best regards
Oliver
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
|
|
| Re: generating PDF files, Was:
Questions generating postscript files
(CSA/CRD) |
  United States |
2007-02-22 08:07:32 |
A bit off-topic, but I can answer this...
On Feb 22, 2007, at 2:36 AM, Oliver Rauch wrote:
> May be someon has any experience in embedding ICC
profiles to PDF
> files,
> here is how I tried it but with no success (no error
messages but
> also no
> corrected colors):
>
> 4 0 obj
> [/ICCBased 5 0 R]
> endobj
>
No reason to waste an object on this - put it inline.
> 5 0 obj
> << /N 3
> /Alternate /DeviceRGB
> /Filter [/A85 /FlateDecode]
>
First, A85 isn't a valid filter name. Second, there is no
reason
to bloat the size of the PDF by ASCII encoding the image
data. Just
write out the binary flated data.
> /Length >>
Where is the length value??
> %d 0 obj
>
I assume this gets a real object number and not %d
> << /Type /Page
> /Parent 3 0 R
> /ColorSpace 4 0 R
>
Page objects don't have a ColorSpace - they are either
Resources
(for vector and text) or in the Image XObject.
> /MediaBox [%d %d %d %d]
> /Contents %d 0 R
> /Resources << /ProcSet %d 0 R >>
Again, I'll assume these %d's are replaced.
Leonard
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
|
|
| Re: CIE2000 |
  Spain |
2007-02-23 08:56:50 |
Hi,
See a complete explanation here:
http://www.ifra.com/website/ifra.nsf/html/COLOR_QUALITY/
$file/CIEDE2000.zip
Regards
Marti Maria
The littleCMS project
http://www.littlecms.com
----- Original Message -----
From: "Glenn Wilton" <gwilton paradise.net.nz>
Cc: <lcms-user lists.sourceforge.net>
Sent: Wednesday, February 21, 2007 10:21 AM
Subject: [Lcms-user] CIE2000
Hi everybody
Can anybody point me to some information on what are
approiate values
for Kl, Kc, and Kh in CIE2000 Delta E. I assume these are
weighting
values but I can't seam to find any information on what
would be
suitable values to use, or how the affect the accuracy of
the DeltaE
cmsCIE2000DeltaE(LPcmsCIELab Lab1, LPcmsCIELab Lab2, double
Kl, double
Kc, double Kh)
Glenn Wilton
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lcms-user mailing list
Lcms-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user
|
|
[1-7]
|
|