Hi. I'm using ImageMagick-7.0.7-22-Q16-x64-dll.exe to convert an image into it's coordinates form. I managed to convert it correctly but I am having a few issues. Firstly, all the coordinates are being output to the command window in one line. What is the command line text that I need to add so that each set of coordinates print on a new line? Also, there are so many coordinates that when I finish the command window doesn't keep them all and I can only scroll up so far. Is there any way to avoid this so I have all of the coordinates? Maybe to output the information into notepad? Thank you for any help.
Update: the command line code I'm using to convert the image is magick image.png sparse-color:
Seperating each output onto a new line
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Seperating each output onto a new line
In Unix, you can do
This will replace the spaces with new lines and redirect the output to a text file.
Code: Select all
magick image.png sparse-color: | tr " " "\n" > colors.txt
Re: Seperating each output onto a new line
Hi fmw42. Thank you for the help but I should of specified before hand. I am using Windows 7 and when I tried using 'tr' it gave me an error. Is there any other solution available?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Seperating each output onto a new line
I do not know the Windows equivalent of the unix tr. It just changes one character (a space) to another (a new line). You could search Google to see if there is such a command. Or search Google for the Windows methods of changing one character to another. Sed (in unix) also works. Perhaps there is some regex tool for Windows to change characters.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Seperating each output onto a new line
Most, or probably all, the common Unix text processing tools are also available for Windows.
snibgo's IM pages: im.snibgo.com