Page 1 of 1

Convert to txt-file with "grey" values

Posted: 2016-10-02T15:25:50-07:00
by F3nr1s
Hi,

I tried to find something with the forum search and also tried to find anything in the man, but didn't find anything.

So I thought, I will ask my question here:
I want to convert an image to a txt, so far no problem.
But now I don't want any "greyXX" values in the txt file.
Here a example:
485,625: (5911,5911,5397) #171715 srgb(23,23,21)
486,625: (6682,6682,6682) #1A1A1A grey10
487,625: (7967,8481,8224) #1F2120 srgb(31,33,32)
A later step in my pipes takes the RGB values from the txt-file and I want to avoid a manual convertion (through a table or something like this) from a greyXX value to an RGB value.

Is there a parameter, so that convert writes the srgb value, instead of "greyXX" in the txt file?

My IM version is 6.9.5 and I'm using Arch Linux.

So long,

Re: Convert to txt-file with "grey" values

Posted: 2016-10-02T15:29:12-07:00
by fmw42
Not that I know about currently. IM will substitute named colors when it recognizes them in that last field. See http://www.imagemagick.org/script/color.php for color names. The best thing would be to use the hex values or convert the raw values in the parentheses to the range 0 to 255 via the quantum range of your compile.