Writing and Reading TXT images problems
Posted: 2019-03-19T02:38:36-07:00
Hi guys and gals.
I was a bit confused when I finished the code below.
command 1:
convert -size 2x1 xc:none \
-fill 'rgb(0,0,0)' -draw 'point 0,0' \
-fill 'rgb(0,0,1)' -draw 'point 1,0' \
-colorspace rgb -depth 8 \
out.png
command 2:
convert out.png -colorspace rgb -depth 8 out.txt
actual output:
```
# ImageMagick pixel enumeration: 2,1,255,rgb
0,0: (0,0,0) #000000 rgb(0,0,0)
1,0: (0,0,0) #000000 rgb(0,0,0)
```
expected:
```
# ImageMagick pixel enumeration: 2,1,255,rgb
0,0: (0,0,0) #000000 rgb(0,0,0)
1,0: (0,0,1) #000000 rgb(0,0,1)
```
Why the outputs is not exact my expected?
Can any one help me ?
Thanks!
Ubuntu 16.04
Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
I was a bit confused when I finished the code below.
command 1:
convert -size 2x1 xc:none \
-fill 'rgb(0,0,0)' -draw 'point 0,0' \
-fill 'rgb(0,0,1)' -draw 'point 1,0' \
-colorspace rgb -depth 8 \
out.png
command 2:
convert out.png -colorspace rgb -depth 8 out.txt
actual output:
```
# ImageMagick pixel enumeration: 2,1,255,rgb
0,0: (0,0,0) #000000 rgb(0,0,0)
1,0: (0,0,0) #000000 rgb(0,0,0)
```
expected:
```
# ImageMagick pixel enumeration: 2,1,255,rgb
0,0: (0,0,0) #000000 rgb(0,0,0)
1,0: (0,0,1) #000000 rgb(0,0,1)
```
Why the outputs is not exact my expected?
Can any one help me ?
Thanks!
Ubuntu 16.04
Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib