how I could convert image to text without output name of color ?

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
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

how I could convert image to text without output name of color ?

Post by diegomage »

I need to convert a image but this convertion output color name

Code: Select all

53,62: (32896,32896,32896)  #808080  fractal
54,62: (0,0,0)  #000000  black
55,62: (0,0,0)  #000000  black
56,62: (0,0,0)  #000000  black
57,62: (0,0,0)  #000000  black
58,62: (0,0,0)  #000000  black
59,62: (32896,32896,32896)  #808080  fractal
60,62: (32896,32896,32896)  #808080  fractal
61,62: (32896,32896,32896)  #808080  fractal
62,62: (32896,32896,32896)  #808080  fractal
63,62: (32896,32896,32896)  #808080  fractal
64,62: (65535,32896,32896)  #FF8080  srgb(255,128,128)
65,62: (65535,32896,32896)  #FF8080  srgb(255,128,128)
66,62: (65535,32896,32896)  #FF8080  srgb(255,128,128)
I need output without name instead black output srgb(0,0,0)

please help me
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how I could convert image to text without output name of color ?

Post by fmw42 »

In place of txt: use sparse-color:

Code: Select all

convert image sparse-color:
Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli


For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: how I could convert image to text without output name of color ?

Post by diegomage »

Version: ImageMagick 7.0.8-6 Q16 x86_64 2018-07-14 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC

OS lubuntu 14.04

HI this works but not have line break , how I could do with line break ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: how I could convert image to text without output name of color ?

Post by fmw42 »

On unix, do

Code: Select all

convert image sparse-color: | tr " " "\n"
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: how I could convert image to text without output name of color ?

Post by diegomage »

very thank you
Post Reply