Select to view content in your preferred language

CompositeBands does not work for BMP, GIF, JPEG, JPG2000, PNG

3382
4
04-05-2010 05:11 PM
WentaoChe
Frequent Contributor
Hi,

CompositeBands does not work for  BMP, GIF, JPEG, JPG2000, PNG, but it works for BIL, BIP, BSQ, DAT,IMG,TIFF.
Here is the error message:

in_band = "rr"+";"+"gg"+";"+"bb"
out_file = 'test.png'
gp.CompositeBands_management(in_band, out_file)

arcgisscripting.ExecuteError: ERROR 000446: Output file format with specified pixel type or number of bands or colormap is not supported. Refer to the 'Technical specifications for raster dataset formats' help section in Desktop Help.
Failed to execute (CompositeBands).

Wentao
KKC, Tokyo, Japan
0 Kudos
4 Replies
JieZhang
Esri Contributor
Hi Wentao,

As the error message says, please refer to the technical specification for Raster dataset format. For example, we only support 8bit and 16bit PNG format, and the band number is limited to 1 or 3 band.

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=3103&pid=3101&topicname=Technical_specificati...

Thanks
Jie
0 Kudos
WentaoChe
Frequent Contributor
Hi Jie,

Thank you for your reply.

Just as you wrote, my Grid rr, gg, bb are 3 Floating Grids ranging from 0.0 to 255.0, I should set those 3 Grids as Integer type before using CompositeBands to output to a PNG.

Thanks again,

Wentao,
KKC, Tokyo, Japan
0 Kudos
SaraGilbert
Occasional Contributor
How do you change to integer?
0 Kudos
EricRice
Esri Regular Contributor
Sara,

You can run the Int tool from Spatial Analyst or 3D Analyst.  

Regards,
Eric
0 Kudos