I wanted to include windows 24 bit bitmaps into some things because the reduction in colour quality was not acceptable for some artwork.
So I researched the windows bitmap format which is quite straight forward, anyway I made this very simple little thing that enables you to include a 24 bit bitmap into your exe and display it.
The resources you need are below;
>HERE<You will see a folder containing 4 files.
1: Landscape.bmp this is a 24 bit bitmap image.
2: 24BITTEST.exe is a compiled version for those without freebasic.
3: 24BITTEST.bas is the source code
4: bimage.bas is the converted picture.
So a quick tutorial.
Firstly this works only with uncompressed windows bitmaps and the width must divide by 8 with no remainder.
Onec you have your picture, you need to convert it.
Use bin2bas by rbraz.
Open a dos window and then type bin2bas
picture.bmp bimage.bas
picture.bmp is the name of your unconverted picture.
then open the program 24bittest.bas
these lines;
DIM SHARED AS INTEGER IMGX = 400:' Picture Width (must be divisible by 8)
DIM SHARED AS INTEGER IMGY = 300:' Picture Height
Need to be set as the width and height of your picture.
Then scroll down to ;
SUB LOADBMP()
DIM AS INTEGER L,M,PSTART
PSTART=53 + ( (IMGX*IMGY) * 3 )
M=0
FOR L=PSTART TO 54 STEP-3
PICTURE_BUFFER(M) = RGB(landscape.bmp(L),landscape.bmp(L-1),landscape.bmp(L-2))
M=M+1
NEXT
END SUB
and where it says landscape.bmp, change all of these to the original name of your picture before you converted it so in this example it would become;
SUB LOADBMP()
DIM AS INTEGER L,M,PSTART
PSTART=53 + ( (IMGX*IMGY) * 3 )
M=0
FOR L=PSTART TO 54 STEP-3
PICTURE_BUFFER(M) = RGB(picture.bmp(L),picture.bmp(L-1),picture.bmp(L-2))
M=M+1
NEXT
END SUB
And that's it.
If you want to add masking / clipping do it yourself it's quite easy, I hope this is of some use to peeps

Enjoy.