Convert to txt-file with "grey" values

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
F3nr1s
Posts: 1
Joined: 2016-10-02T15:12:21-07:00
Authentication code: 1151

Convert to txt-file with "grey" values

Post 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,
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
Post Reply