Page 1 of 1
why can not i get the gray image?
Posted: 2011-06-29T05:42:55-07:00
by linjuming
source image:
php code:
Re: why can not i get the gray image?
Posted: 2011-06-29T11:11:50-07:00
by fmw42
what version of IM are you using? The PNG code has been changing and improving over many releases and seems to have had bugs at time. I would suggest you upgrade to the latest version of IM. Also try using some other output format such as jpg, tif, bmp or gif and see if that helps.
It works fine for me on IM 6.7.0.9 Q16 Mac OSX Tiger
identify -verbose top_line.png
Image: top_line.png
Format: PNG (Portable Network Graphics)
Class: PseudoClass
Geometry: 20x100+0+0
Resolution: 72x72
Print size: 0.277778x1.38889
Units: Undefined
Type: Palette
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Red:
min: 4 (0.0156863)
max: 64 (0.25098)
mean: 61.8 (0.242353)
standard deviation: 9.755 (0.0382549)
kurtosis: 18.3461
skewness: -4.39659
Green:
min: 3 (0.0117647)
max: 46 (0.180392)
mean: 44.41 (0.174157)
standard deviation: 7.04286 (0.0276191)
kurtosis: 18.131
skewness: -4.37972
Blue:
min: 5 (0.0196078)
max: 74 (0.290196)
mean: 71.47 (0.280275)
standard deviation: 11.2182 (0.0439931)
kurtosis: 18.3461
skewness: -4.39659
convert top_line.png -colorspace gray top_line_tmp1.png
identify -verbose top_line_tmp1.png
Image: top_line_tmp1.png
Format: PNG (Portable Network Graphics)
Class: PseudoClass
Geometry: 20x100+0+0
Resolution: 72x72
Print size: 0.277778x1.38889
Units: Undefined
Type: Grayscale
Base type: Grayscale
Endianess: Undefined
Colorspace: Gray
Depth: 8-bit
Channel depth:
gray: 8-bit
Channel statistics:
Gray:
min: 4 (0.0156863)
max: 55 (0.215686)
mean: 53.09 (0.208196)
standard deviation: 8.4476 (0.0331278)
kurtosis: 17.823
skewness: -4.35547
And the image has no stripes.
So upgrade your IM.
Re: why can not i get the gray image?
Posted: 2011-06-29T11:21:56-07:00
by Bonzo
Worked OK for me as well using 6.5.9
Re: why can not i get the gray image?
Posted: 2011-06-29T19:17:55-07:00
by linjuming
now i remove the old version (ImageMagick-6.6.8-5-Q16-windows-dll.exe)
and install the lastest vesion (ImageMagick-6.7.0-9-Q16-windows-dll.exe).
can workw directly in cmd but not works when dbclicking the bat file.
why? my systerm is xp sp2.
Re: why can not i get the gray image?
Posted: 2011-06-29T19:59:44-07:00
by linjuming
and where to download other versions (not the latest)
Re: why can not i get the gray image?
Posted: 2011-06-29T20:06:01-07:00
by linjuming
when restart the computer , it works in bat.
thank you very much!