Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

hi all
i wanted to directly read image file using IShell_LoadImage. i typed following code for it

static boolean HelloWorld_HandleEvent(AEEApplet * pi, AEEEvent eCode, uint16 wParam, uint32 dwParam)
{
CHello * pMe = (CHello*)pi;
// Make sure the pointers we'll be using are valid
if (pMe == NULL || pMe->a.m_pIShell == NULL)
return FALSE;

switch (eCode){
case EVT_APP_START:

Hello_Disp(pMe);

return(TRUE);

case EVT_APP_STOP:
return(TRUE);

default:
break;
}
return(FALSE);

static void Hello_Disp(CHello* pApp)
{

IImage * pImage;
// Clear Screen
IDISPLAY_ClearScreen(pApp->a.m_pIDisplay);

pImage = ISHELL_LoadImage(pApp->a.m_pIShell,"cell.bmp");
if(pImage)
{
IIMAGE_Draw(pImage, 10,70);
IIMAGE_Release(pImage);
}
else
return;

emulator hangs while executing whats the problem.

plz give yur reply

thanx
rajat

where is it hanging?
add DBGPRINTF() statements or use the debugger to find out. Perhaps it is hanging in the initialization procedure.
-Tyndal

where is it hanging?
add DBGPRINTF() statements or use the debugger to find out. Perhaps it is hanging in the initialization procedure.
-Tyndal

Hi all,
I'm having the same problem,
in fact with the debugger the m_pImage pointer still null after the ISHELL_LoadImage function call and i really don't know why ...
Maybe somebody can explain me this.
Regards,
Charles :-)
IImage * pImage;
pImage = ISHELL_LoadImage(m_pIShell,"c:\\splinter.bmp");
if (pImage)
{
IIMAGE_Draw(pImage, 10,70);
IIMAGE_Release(pImage);

Hi all,
I'm having the same problem,
in fact with the debugger the m_pImage pointer still null after the ISHELL_LoadImage function call and i really don't know why ...
Maybe somebody can explain me this.
Regards,
Charles :-)
IImage * pImage;
pImage = ISHELL_LoadImage(m_pIShell,"c:\\splinter.bmp");
if (pImage)
{
IIMAGE_Draw(pImage, 10,70);
IIMAGE_Release(pImage);

Can BREW access files (c:\\splinter.bmp) outside of device filesystem ? Try moving file into the same directory as your apps dll or the emulator share directory.
-Ben

Can BREW access files (c:\\splinter.bmp) outside of device filesystem ? Try moving file into the same directory as your apps dll or the emulator share directory.
-Ben

Benjamin is correct, BREW applications can only access files stored in their own directory and the shared directory.
Rajat, you should step through your code to determine exactly where the hang occurs and what the values of the relevant variables are.

Benjamin is correct, BREW applications can only access files stored in their own directory and the shared directory.
Rajat, you should step through your code to determine exactly where the hang occurs and what the values of the relevant variables are.

Hi, I'm having the same problem as rajat's original question, except that its on the phone, not the emulator. The phone is resetting in a ISHELL_LoadImage call. And its not consistently the same one either, sometimes i can load image a, b, and it crashes on c, and sometimes i can load a and it crashes on b.
Is it possible that its taking to long to return control (this is in the initialization phase) and the phone is killing it?
Thanks
Paul

Hi, I'm having the same problem as rajat's original question, except that its on the phone, not the emulator. The phone is resetting in a ISHELL_LoadImage call. And its not consistently the same one either, sometimes i can load image a, b, and it crashes on c, and sometimes i can load a and it crashes on b.
Is it possible that its taking to long to return control (this is in the initialization phase) and the phone is killing it?
Thanks
Paul

I am trying to load a png image using ISHELL_LoadImage API .but it is returning NULL .
Can you please help me regarding the same ? please find the description below.
I am trying to load a png image which does not have an extension with ISHELL_LoadImage() and it is returning NULL.
Please find the code snippet I am trying to use.
Code snippet :
IImage *piImage = NULL;
char szFileName[FILENAME_LEN];
piImage = ISHELL_LoadImage(pme->piShell, WSTRTOSTR(L"fs:/shared/fetched_urls/58bb0d56-ef46-4cf3-930f-d05ddd9da76e", szFileName, FILENAME_LEN));
58bb0d56-ef46-4cf3-930f-d05ddd9da76e” is the png image file which is stored at fs:/shared/fetched_urls/ location without extension.
Is there any other API available to load a image file which does not have an extension ?

I am trying to load a png image using ISHELL_LoadImage API .but it is returning NULL .
Can you please help me regarding the same ? please find the description below.
I am trying to load a png image which does not have an extension with ISHELL_LoadImage() and it is returning NULL.
Please find the code snippet I am trying to use.
Code snippet :
IImage *piImage = NULL;
char szFileName[FILENAME_LEN];
piImage = ISHELL_LoadImage(pme->piShell, WSTRTOSTR(L"fs:/shared/fetched_urls/58bb0d56-ef46-4cf3-930f-d05ddd9da76e", szFileName, FILENAME_LEN));
58bb0d56-ef46-4cf3-930f-d05ddd9da76e” is the png image file which is stored at fs:/shared/fetched_urls/ location without extension.
Is there any other API available to load a image file which does not have an extension ?