What app converts a bmp, etc to raw format? Just figured out dib after reading sheeps tut. I can manipulate the canvas and his sheep pic.(make it move, change the color, etc.) I dont want to install a bunch of apps I dont use, just to find one that converts to raw.

Or spell out the format in the bitmap and Ill write my own converter for it and the palette.
__________________
upucker@yourpanties.hotmail.com
Posted on 2005-07-20 16:20:47 by UPucker
Write your own :). It actually wouldn't be that hard. Use the Windows API to load the Bitmap (can't remember exactly how myself, but I've seen people post snippets here before, see the LoadImage function), then Select that bitmap into a DC and Blt it to a second DC containing a 32bit DIBSection (lots of code here on setting up one of those). You're pointer to the DIBSection bit data will then be your pointer to RGB encoded raw image data.
Posted on 2005-07-20 18:46:14 by Eóin
The bitmap is:

1) BITMAPFILEHEADER
followed by
2) either BITMAPINFO or BITMAPCOREINFO
followed by
3) palette entries (i present)
followed by
4) either palette indexes or RGB(A) data.

Why using RAW format? Too many problems with them, and converting BMP 'on the fly' to any other format isn't very difficult.
Posted on 2005-07-20 19:46:45 by ti_mo_n
Nothing wrong with RAW format if you presume to KNOW certain information about your images, eg width, height, bitdepth, pixel format.
Some people like to rip the Header off bmps, apply RLE compression to the RAW pixel color data, and then save to binary file and embed in the exe, either as resource or as binary data.
This makes it pretty hard for kids to manipulate the image(s) , or to "rip" them from the binary, especially if you 'unpack' the image only when it is required, and don't leave the 'unpacked RAW' in memory when its not being displayed... now they can't "hunt ram for images during runtime".
Posted on 2005-07-21 01:19:35 by Homer
...and at the same time, you make your program a bit slower and use a bit more memory, and make maintenance of the app harder for yourself :)

Posted on 2005-07-21 01:26:40 by f0dder
Yep, security through obscurity has a price, you're either willing to pay it, or not.
Personally, I'm not concerned about securing my images, I'm not that pedantic.
If I want to RLE compress my images I'll use TGA.
If RLE isn't suitable for the image, I'll use JPG.
I'm pretty sure that Bogdan used RLE-compressed RAW images in his game, am I right?
Posted on 2005-07-21 01:33:49 by Homer

I'm pretty sure that Bogdan used RLE-compressed RAW images in his game, am I right?


Dunno... If I need images, I tend to go for JPEG or GIF, or BMP for those very small toolbar icons that would only inflate if they were GIF'ed. It's wonderfully simple dealing with these kind of images, thanks to OleLoadPicture :)
Posted on 2005-07-21 01:39:35 by f0dder
Thanks for all the pointers. I am just learning how dibs work, and I'm trying to manipulate a image. I have an example in ASM that I am looking through to learn how it works. I can move it around, change the colors, etc. I am trying to figure out how to load my own pic in its place, that the only code I have to go on has the raw data already defined in an array. One array for the pallette, and one for the pic. Since I already know the dimensions of the pic, and the canvas learning to make it move was fairly easy. Now I want to try writing my own effects in asm. I want to animate the pic just to learn how its done. Is there an easier or more used method for doing this?



Posted on 2005-07-21 09:14:24 by UPucker
You probably should check out BitBlt.
Posted on 2005-07-21 14:36:49 by Homer