View Full Version : How to use BCI image in resource file?
dxxvi
07-18-2002, 09:52 PM
I crearted an BCI file, put it in a resource file. Now how could I show it on brew emulator? I used the code to show a normal image and it didn't work.
Could you tell me the problem?
arunbangari
07-19-2002, 03:52 AM
Hi,
There could be many reasons. First may be you are not using the API properly to load the image. Second could be your image format may not be proper. How did u create the BCI image? What is the colour resolution of the image. Remember that images should be maximum of 8bit.
Regards
Arun Bangari
dxxvi
07-21-2002, 09:53 PM
I created the BCI file with bitmaps of 256 colors each.
This is the code I used to display the BCI file:
pMe->m_pIImage = ISHELL_LoadResImage(pMe->a.m_pIShell, HELLOWORLD_RES_FILE, IMG);
if (pMe->m_pIImage) {
IIMAGE_GetInfo(pMe->m_pIImage, &aii);
IIMAGE_SetParm(pMe->m_pIImage, IPARM_RATE, 350, 0);
IIMAGE_SetParm(pMe->m_pIImage, IPARM_NFRAMES, 13, 0);
IIMAGE_GetInfo(pMe->m_pIImage, &aii);
x = (di.cxScreen - aii.cx / 13) / 2;
y = (di.cyScreen - aii.cy) / 2;
IIMAGE_Start(pMe->m_pIImage, x, y);
}
Was I wrong somewhere?
dxxvi
07-21-2002, 09:56 PM
I'm terribly sorry for my previous message. The code I use to display the BCI file was:
pIImage = ISHELL_LoadResImage(pMe->a.m_pIShell, HELLOWORLD_RES_FILE, IMGBCI);
if (pIImage) {
IIMAGE_GetInfo(pIImage, &aii);
x = (di.cxScreen - aii.cx) / 2;
y = (di.cyScreen - aii.cy) / 2;
IIMAGE_SetParm(pIImage, IPARM_ROP, AEE_RO_NOT, 0);
IIMAGE_Draw(pIImage, x, y);
IIMAGE_Release(pIImage);
}
Was I wrong somewhere?
arunbangari
07-21-2002, 10:22 PM
Hi,
I dont see anything wrong with the code. The problem lies in the BCI image itself. You said that you created the image with 256 color bitmap. BREW does not support 256 colors. It should be <=8. Please check.
Regards
Arun Bangari
mroskothen
11-05-2002, 05:20 PM
256 colors (8 bit) are OK with Brew. Make sure the phone you are using can handle BCIs. The code displays BCIs fine on a Samsung SCH-A530.
vBulletin v3.0.13, Copyright ©2000-2009, Jelsoft Enterprises Ltd.