GP32 24bit Bmp Work On The Gp32??


You will have to reduce the colors, luckily this can be achieved on the GP32 in realtime.. You just shift each channel 3 bits to the right. This divides your color by 8 and gives it a range between 0 and 31, instead of 0 and 255.
 
Unless you've got a BMP file loader for your application, you're going to need to convert the file to the image format that the GP32 understands. Darkfader has a program on his site that can convert BMPs to GP32 8bit and 16bit format. It even has the option to pre-rotate the image 90° so its ready to use on the GP32.
 
There is BMP loader code some where on these forums. Sorry, can't remember who made them and can't be bothered to search for the code now.

Supports 8bit and 16bit..
 
there is a 8bpp and 24 bpp bmp loader include on gpfm, you can download gpfm's sources at http://info2.info.tampere.fi/~teoarsa/Ratt...ff/gpfm_015.zip


and if someone is interested, here is my little example code for loading 24 bpp bmps...

unsigned short bmp[320][240];

unsigned short rvb(unsigned char r, unsigned char v, unsigned char b, unsigned char it)
{
return ( ( &reg; <<11) | ( (v) <<6) | ( (B) <<1) | it );
}

void loadbmp16(char *path)
{
F_HANDLE fbmp;
int x, y;
unsigned char tmp[3];

GpFileOpen(chemin, OPEN_R, &fbmp);
GpFileSeek(fbmp, FROM_CURRENT, 54, NULL); // skip the header
for (y = 0; y < 240; y++)
for (x = 0; x < 320; x++)
{
GpFileRead(fbmp, &tmp, 3, NULL);
bmp[x][y] = rvb(tmp[2]/8, tmp[1]/8, tmp[0]/8, 1);
}
GpFileClose(fbmp);
}
 
Back
Top