Hi Jeff, 

 

Thanks for your kind words. Regarding your question, you already can do that by 
using the tools that shell scripting has.

 

transicc can read from standard input and write to standard output, then you 
can use pipes or any kind of redirections. This example works either in windows 
as in Linux or Mac:

 

echo 1 2 3 255 255 255 | transicc  -i*sRGB -o*Lab -n

LittleCMS ColorSpace conversion calculator - 4.1 [LittleCMS 2.03]

3.6395 -0.1218 -0.4854

100.0000 0.0000 -0.0000

 

I am using "echo" command to put a list of values to stdin, and then I'm piping 
with "|" operator to connect this stdin to icctrans. The –n toggle inhibits the 
decoration of result. Without it gives the components:

 

echo 1 2 3 255 255 255 | transicc  -i*sRGB -o*Lab

LittleCMS ColorSpace conversion calculator - 4.1 [LittleCMS 2.03]

L*=3.6395 a*=-0.1218 b*=-0.4854

L*=100.0000 a*=0.0000 b*=-0.0000

 

I've tested this to both windows and RedHat and both works ok and gives same 
result. The “LittleCMS etc.” banner gots on stderr , so redirecting whole thing 
to a file avoids it:

 

echo 1 2 3 255 255 255 | transicc  -i*sRGB -o*Lab -n > a.txt

LittleCMS ColorSpace conversion calculator - 4.1 [LittleCMS 2.03]

cat a.txt

3.6395 -0.1218 -0.4854

100.0000 0.0000 -0.0000

 

> (I would be willing to donate toward such a development, if

> that's an acceptable model.)

 

Thank you so much, any donation is highly appreciated, although please note 
this is not required!! 

 

Anyway, contact me if this pipe solution does not fit your needs.

 

Best regards

Marti Maria

The LittleCMS Project

http://www.littlecms.com

 

 

 

Jeff Harmon <jhar...@colorhythm.com> escribió:

 

> 

> 

> HI friends,

> 

> A warm thanks to all for your continued efforts on

> LCMS, particularly Marti. And also a congratulations! This is truly such

> excellent work.

> 

> I am writing regarding the icctrans utility. I am

> hoping to be able to pass the calculator values inline and get standard

> output. It appears not to be written that way, but rather as a

> real-time, command-line "GUI" calculator.

> 

> something like this is

> desirable:

> 

> icctrans -i USWebCoatedSWOP.icc 45,45,45,23 -o *Lab

> 

> where

> I can feed values in and get the output "L*=48.1664 a*=3.9805 b*=3.3789"

> out.

> 

> (I would be willing to donate toward such a development, if

> that's an acceptable model.)

> 

> Thanks for your consideration!

> 

> Best,

> 

> 

> Jeff

 

 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to