BMPDecode version 1.1 released
February 21st, 2007
Just implemented the ability to export BMP’s as RAW RGB data in BMPDecode since I needed a tool to do this.
I tried it out by exporting some textures as raw RGB and loading them into opengl as textures and it worked fine
So if you need a quick converter from BMP -> RAW RGB/RGBA this is your fix!
Changelog:
Added these methods:
| exportRAW_RGB(self, outfilename)
| exportRAW_RGB(filename) -> no return value
| Exports the data contained in the decoder to a RAW
| RGB data file with the filename passed as an argument
|
| exportRAW_RGBA(self, outfilename, alphavalue=255)
| exportRAW_RGB(filename, alphavalue=255) -> no return value
| Exports the data contained in the decoder to a RAW
| RGBA data file with the filename passed as an argument
Example of use:
import bmpdecode
decoder = bmpdecode.BMPDecoder("mybmpfile.bmp")
decoder.exportRAW_RGB("myraw.raw")
Optionally call
decoder.print_fileinfoheader()
to get the height/width of the image since t is not saved in the RAW file.
Any chance I could get a copy of your script? The link no longer works.
Thank you!
Sorry bout that.
It is now online at
http://www.buffis.com/pub/stuff/bmpdecode1_1.tar.gz
link is broken - still.