Hi Chris,
I did the same and found the properties of my image as below:
I think it doesnt have alpha : 8 bit
identify -verbose aegean-120km.png
Image: aegean-120km.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 1292x1001+0+0
Resolution: 37.79x37.79
Print size: 34.1889x26.4885
Units: PixelsPerCentimeter
Type: TrueColor
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
red:
min: 0 (0)
max: 235 (0.921569)
mean: 54.9768 (0.215595)
standard deviation: 22.5171 (0.0883024)
kurtosis: 1.95082
skewness: 0.869281
green:
min: 3 (0.0117647)
max: 243 (0.952941)
mean: 74.8666 (0.293594)
standard deviation: 21.6226 (0.0847946)
kurtosis: 1.41052
skewness: 0.226536
blue:
min: 1 (0.00392157)
max: 241 (0.945098)
mean: 93.5669 (0.366929)
standard deviation: 31.2464 (0.122535)
kurtosis: -0.907665
skewness: -0.429502
Image statistics:
Overall:
min: 0 (0)
max: 243 (0.952941)
mean: 55.8526 (0.21903)
standard deviation: 41.3977 (0.162344)
kurtosis: -0.988763
skewness: 0.0747025
Rendering intent: Saturation
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)
Interlace: None
Background color: rgb(1,1,1)
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 1292x1001+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
date:create: 2011-05-19T10:17:37+06:00
date:modify: 2010-11-29T18:15:51+06:00
signature: e48cd3c45e0ab3014e55d9ae6f51de1d41f485add63ec622c074a58b31a39933
Artifacts:
verbose: true
Tainted: False
Filesize: 1.372mb
Number pixels: 1.233mb
Version: ImageMagick 6.5.4-7 2010-02-26 Q16 OpenMP http://www.imagemagick.org
identify -verbose aegean-120km.png
Image: aegean-120km.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 1292x1001+0+0
Resolution: 37.79x37.79
Print size: 34.1889x26.4885
Units: PixelsPerCentimeter
Type: TrueColor
Endianess: Undefined
Colorspace: RGB
Depth: 8-bit
Channel depth:
red: 8-bit
green: 8-bit
blue: 8-bit
Channel statistics:
red:
min: 0 (0)
max: 235 (0.921569)
mean: 54.9768 (0.215595)
standard deviation: 22.5171 (0.0883024)
kurtosis: 1.95082
skewness: 0.869281
green:
min: 3 (0.0117647)
max: 243 (0.952941)
mean: 74.8666 (0.293594)
standard deviation: 21.6226 (0.0847946)
kurtosis: 1.41052
skewness: 0.226536
blue:
min: 1 (0.00392157)
max: 241 (0.945098)
mean: 93.5669 (0.366929)
standard deviation: 31.2464 (0.122535)
kurtosis: -0.907665
skewness: -0.429502
Image statistics:
Overall:
min: 0 (0)
max: 243 (0.952941)
mean: 55.8526 (0.21903)
standard deviation: 41.3977 (0.162344)
kurtosis: -0.988763
skewness: 0.0747025
Rendering intent: Saturation
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)
Interlace: None
Background color: rgb(1,1,1)
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 1292x1001+0+0
Dispose: Undefined
Iterations: 0
Compression: Zip
Orientation: Undefined
Properties:
date:create: 2011-05-19T10:17:37+06:00
date:modify: 2010-11-29T18:15:51+06:00
signature: e48cd3c45e0ab3014e55d9ae6f51de1d41f485add63ec622c074a58b31a39933
Artifacts:
verbose: true
Tainted: False
Filesize: 1.372mb
Number pixels: 1.233mb
Version: ImageMagick 6.5.4-7 2010-02-26 Q16 OpenMP http://www.imagemagick.org
To copy to clipboard, switch view to plain text mode
I did the same of loading the PNG directly for me on both the cases it gives me a depth of 24 bit.....
true
QSize(1292,
1001) 24 false QSize(1292,
1001) 24 false
true
QSize(1292, 1001) 24 false
QSize(1292, 1001) 24 false
To copy to clipboard, switch view to plain text mode
Anything i have to try chris .....
Added after 26 minutes:
Hi chris,
I tried this, it sets my pixmap to 32 bit ......
overlay_map.load("/aegean-60km.bmp");
qDebug() << overlay_map.size() << overlay_map.depth() << overlay_map.hasAlphaChannel();
overlay_map.
setAlphaChannel(QPixmap("/aegean-60km.bmp"));
qDebug() << overlay_map.size() << overlay_map.depth() << overlay_map.hasAlphaChannel();
overlay_map.load("/aegean-60km.bmp");
qDebug() << overlay_map.size() << overlay_map.depth() << overlay_map.hasAlphaChannel();
overlay_map.setAlphaChannel(QPixmap("/aegean-60km.bmp"));
qDebug() << overlay_map.size() << overlay_map.depth() << overlay_map.hasAlphaChannel();
To copy to clipboard, switch view to plain text mode
QSize(1292, 1076) 24 false
QSize(1292, 1076) 32 true
Now i didnt get any error .....This is the right way to set the pixmap to 32 Bit depth....
Bookmarks