Bitmap loader 
15 comments This script is intended for developers only.
This script can load a bitmap (BMP) file, however, only the data from uncompressed bitmap files will be read.
Currently, only 24bpp color is supported, plus 8bpp in grayscale works too, however, this is not going to work with other color depths and it's not planned neither.
The only thing you will need is a single call to the loadBitmap(path) function to load your image. Given a path to your image as the first parameter, the function will first attempt to determine the format of the image based on it's file headers (NOT the file extension) and then it will read some misc data (you can find more about this at the last commented section in the file bitmap.lua)
Take in count that only the image data from bmp files will be read, so you should get a pixel's color info only from this files.
An example is included in the zip file.
This script can load a bitmap (BMP) file, however, only the data from uncompressed bitmap files will be read.
Currently, only 24bpp color is supported, plus 8bpp in grayscale works too, however, this is not going to work with other color depths and it's not planned neither.
The only thing you will need is a single call to the loadBitmap(path) function to load your image. Given a path to your image as the first parameter, the function will first attempt to determine the format of the image based on it's file headers (NOT the file extension) and then it will read some misc data (you can find more about this at the last commented section in the file bitmap.lua)
Take in count that only the image data from bmp files will be read, so you should get a pixel's color info only from this files.
An example is included in the zip file.
edited 1×, last 09.09.10 10:37:40 am
Comments
15 comments
1

Log in!
You need to log in to be able to write comments!Log in
I like it! Why so good script has got only 11 likes? It's really nice idea, good work and very usable, I like it!
I like it! Great script.
In my minimap script.
Minimap [Updated] - Dark Byte (11)
There is a function that saves a bitmap image. If anyone needs it they are free to use it.
In my minimap script.
There is a function that saves a bitmap image. If anyone needs it they are free to use it.
I like it! Awesome! Good for developers!
@Viper97:
If it's easy why don't you make one and upload it so we can see it?
@Viper97:
If it's easy why don't you make one and upload it so we can see it?
I like it! Nice converting a BMP image to text
Too bad I am not professional at developing and all that
Too bad I am not professional at developing and all that
People, this script was mainly meant for aligning images correctly and stuff related to images' sizes when using them.
The pixel loading stuff was just an extra I added when vectar requested it
Also remember that this is not for noobs!
@Roman: He isn't serious, he can't even use proper grammar.
The pixel loading stuff was just an extra I added when vectar requested it
Also remember that this is not for noobs!
@Roman: He isn't serious, he can't even use proper grammar.
1








Bitmap loader

