The original source file (test3.png) is also RGB. I can't seem to get ImageMagick to do the conversion into whatever it is your program demands:
Code:
D:\downloads\editor-0.05>..\ImageMagick\convert.exe -verbose -define png:color-type=3 -resize 256x240 test3.png test4.png
test3.png PNG 512x480 512x480+0+0 8-bit sRGB 18.9KB 0.016u 0:00.017
test3.png=>test4.png PNG 512x480=>256x240 256x240+0+0 8-bit sRGB 0.031u 0:00.020
convert.exe: Cannot write PNG8 or color-type 3; colormap is NULL `test4.png' @ error/png.c/WriteOnePNGImage/9270.
The
-define png:color-type=3 argument comes from
here.
It looks like the source image uses sRGB colour space, but it's a "truecolour" image, even though the bit depth is 8. Screwing around with
-define png:bit-depth doesn't fix it either. Below comes from
identify.exe -verbose test3.png -- note the "Properties" section:
Code:
D:\downloads\editor-0.05>..\ImageMagick\identify.exe -verbose test3.png | more
Image: test3.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 512x480+0+0
Resolution: 47.24x47.24
Print size: 10.8383x10.1609
Units: PixelsPerCentimeter
Type: Palette
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
Pixels: 245760
Red:
min: 0 (0)
max: 175 (0.686275)
mean: 12.0967 (0.0474382)
standard deviation: 19.8448 (0.0778226)
kurtosis: 19.1082
skewness: 3.01808
entropy: 0.456241
Green:
min: 0 (0)
max: 238 (0.933333)
mean: 18.7621 (0.0735767)
standard deviation: 38.1136 (0.149465)
kurtosis: 11.8537
skewness: 3.27242
entropy: 0.616345
Blue:
min: 0 (0)
max: 238 (0.933333)
mean: 70.9639 (0.27829)
standard deviation: 78.8948 (0.309392)
kurtosis: -1.66944
skewness: 0.369543
entropy: 0.581827
Image statistics:
Overall:
min: 0 (0)
max: 238 (0.933333)
mean: 33.9409 (0.133102)
standard deviation: 51.868 (0.203404)
kurtosis: 4.21331
skewness: 2.44243
entropy: 0.551471
Colors: 8
Histogram:
127020: ( 0, 0, 0) #000000 black
24696: ( 0, 50,102) #003266 srgb(0,50,102)
3360: ( 0,109,153) #006D99 srgb(0,109,153)
8456: ( 0,116, 60) #00743C srgb(0,116,60)
77324: ( 33, 13,173) #210DAD srgb(33,13,173)
1656: ( 44,200,112) #2CC870 srgb(44,200,112)
2116: ( 71,200, 32) #47C820 srgb(71,200,32)
1132: (175,238,238) #AFEEEE PaleTurquoise
Rendering intent: Perceptual
Gamma: 0.45455
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: white
Border color: srgb(223,223,223)
Matte color: grey74
Transparent color: black
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 512x480+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
date:create: 2016-04-20T15:32:47-07:00
date:modify: 2016-04-20T15:32:02-07:00
png:gAMA: gamma=0.45454544 (See Gamma, above)
png:IHDR.bit-depth-orig: 8
png:IHDR.bit_depth: 8
png:IHDR.color-type-orig: 2
png:IHDR.color_type: 2 (Truecolor)
png:IHDR.interlace_method: 0 (Not interlaced)
png:IHDR.width,height: 512, 480
png:pHYs: x_res=4724, y_res=4724, units=1
png:sRGB: intent=0 (Perceptual Intent)
signature: f52fcdc1c44815504760255e0d05419c091383538b181f1213d63e540feda438
Artifacts:
filename: test3.png
verbose: true
Tainted: False
Filesize: 18.9KB
Number pixels: 246K
Pixels per second: 11.17MB
User time: 0.016u
Elapsed time: 0:01.021
Version: ImageMagick 6.9.2-8 Q16 x64 2015-12-05 http://www.imagemagick.org
In other words: PNG support with your program is going to be iffy at best given that, odds are, things are going to be outputting sRGB with truecolour and not indexed. This is probably outside of your hands, but yeah, explicitly stating what the requirements are somewhere (either in documentation or
-help usage) would be good...