Problem converting to TXT format
Posted: 2016-02-24T21:22:43-07:00
Using IM7 beta ImageMagick 7.0.0-0 Q16 x64 2016-02-21 (installed from ImageMagick-7.0.0-0~beta20160221-Q16-HDRI-x64-static.exe) on Windows 7 64, and running this command...
... I get a text file that starts out like this...
On the first line of the output text, the size of the image is specified by the "70" and "46". The "255" is supposed to specify a range for each color from "0" to "255". However, in the first parentheses of all the following lines the color descriptors are in the range of "0" to "65535". So when trying to reassemble the text file into an image with this command...
... the result is an all white image. The problem seems to be the color descriptors in the first parentheses of each line should be shown as 8 bit, or in a range of "0" to "255".
I can force that first line of the text file to 16 bit color descriptors by running this command...
... which creates a text file that starts like this...
... and easily reassembles into the rose image. But I can't seem to get those color descriptors in the parentheses to use 8 bit notation, "0" through "255", even if I use "-depth 8" in my command. That means the TXT file can't be reconstructed into an image unless it's created with "-depth 16" in the command.
I wonder if this is something should be brought to the attention of the developers.
Code: Select all
magick rose: output.txt
Code: Select all
# ImageMagick pixel enumeration: 70,46,255,srgb
0,0: (12336,12079,11565) #302F2D srgb(48,47,45)
1,0: (12850,12336,11822) #32302E srgb(50,48,46)
2,0: (13878,12850,12079) #36322F srgb(54,50,47)
...
...
Code: Select all
magick output.txt rose.png
I can force that first line of the text file to 16 bit color descriptors by running this command...
Code: Select all
magick rose: -depth 16 output.txt
Code: Select all
# ImageMagick pixel enumeration: 70,46,65535,srgb
0,0: (12336,12079,11565) #30302F2F2D2D srgb(48,47,45)
1,0: (12850,12336,11822) #323230302E2E srgb(50,48,46)
2,0: (13878,12850,12079) #363632322F2F srgb(54,50,47)
...
...
I wonder if this is something should be brought to the attention of the developers.