Page 1 of 1

v7 read or write problem

Posted: 2014-01-11T13:28:53-07:00
by snibgo
Windows 8.1, IM v7 downloaded today, ImageMagick-7.0.0-0~beta20140110-Q16-x64-dll.exe.

There is a problem reading or writing a greyscale image.

Create a greyscale image using IM v6.8.8-0:

Code: Select all

%IM%convert -size 100x200 gradient: ^
  -rotate 90 ^
  hdri_grad.png
Image

Read it and write it with v7:

Code: Select all

%IMGF%magick ^
  hdri_grad.png ^
  hdri_gradSv.png
Image
The result is red where I would expect grey. It has populated just the red channel instead of all three.

Re: v7 read or write problem

Posted: 2014-01-11T14:45:33-07:00
by fmw42
Grayscale images in IM 7 have only one channel. That may be the issue. In IM 6 they have 3 channels. So there may be an import issue between IM 6 grayscale images to IM 7.

Re: v7 read or write problem

Posted: 2014-01-11T15:02:19-07:00
by snibgo
The same problem occurs when v7 creates the first file.

Yes, I guess the problem arises from v7 storing greyscale as a single channel.

A simpler demo of (probably) the same problem:

Code: Select all

F:\web\im>%IMGF%magick -size 2x1 gradient: g.png

F:\web\im>%IMGF%magick g.png txt:
# ImageMagick pixel enumeration: 2,1,255,srgb
0,0: (255,255,255)  #FFFFFF  white
1,0: (0,0,0)  #000000  black

F:\web\im>%IMGF%magick -size 3x1 gradient: g.png

F:\web\im>%IMGF%magick g.png txt:
# ImageMagick pixel enumeration: 3,1,65535,srgb
0,0: (100%,0%,0%)  #FFFF00000000  red
1,0: (50.0008%,0%,0%)  #800000000000  srgb(50.0008%,0%,0%)
2,0: (0%,0%,0%)  #000000000000  black
The 2x1 gradient gives the corect greyscale result. The 3x1 gradient populates (or or writes to txt) just the red channel.

Re: v7 read or write problem

Posted: 2014-01-11T15:38:18-07:00
by fmw42
Now that is really odd (pardon the pun)