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

Developer

Forums

Forums:

Hi All,
I am reading a bmp from a resource file and displaying it using
ISHELL_LoadResImage.But What I actually want is to zoom the picture into certain size to display it inside a rectangle.
I have done It like this.But the screen doesnt show anything.If I use only IIMAGE_Draw() then the picture is displayed with its actual size.I want it to be seen in zoomed in/out form
Can anyone point something ??
////////////////////////////////////////////////////////////////////////////////////
IImage *pImage1=NULL;
AEEDeviceInfo dm;
static int x=0,y=0;
switch (eCode)
{
case EVT_APP_START:

ISHELL_GetDeviceInfo(pMe->a.m_pIShell, &dm);

if( dm.nColorDepth > 4)
{
// Load image from Resources
pImage1 = ISHELL_LoadResImage(pMe->a.m_pIShell, IMAGES_RES_FILE, RECT);

IGRAPHICS_StretchBlt (pMe->m_pGraphics,0, 0, 100, 100,pImage1, AEE_RO_TRANSPARENT ) ;
IGRAPHICS_Update (pMe->m_pGraphics) ;
//IIMAGE_Draw(pImage1, 50, 50);

// Update the screen
//IDISPLAY_Update(pMe->a.m_pIDisplay);

///////////////////////////////////////////////////////////////////////////////////
Thanks and Regards,
Sandy..

I hope this helps:
boolean displayStrech(myapp_t *pApp)
{
void* pRawImage2;
AEEBmp pBMPImage2;
IGraphics *pg;
boolean bVal;
bVal = FALSE;
pg = NULL;
//Pull the BMP from the resource file
pBMPImage2 = ISHELL_LoadResData(pApp->a.m_pIShell, RES_FILE, (short)IDB_LOGO, RESTYPE_IMAGE);
if (pBMPImage2 == NULL)
return(NULL);
//The data being pointed by pRawImage2 is without the AEE header
pRawImage2= (byte *)pBMPImage2 + *((byte *)pBMPImage2);
//IDB_LOGO
if(ISHELL_CreateInstance(pApp->a.m_pIShell,AEECLSID_GRAPHICS,(void**)&pg) != SUCCESS)
return FALSE;
IGRAPHICS_SetBackground(pg,255,255,255);
IGRAPHICS_ClearViewport(pg);
IGRAPHICS_SetFillMode(pg, TRUE);
IGRAPHICS_SetPaintMode(pg, AEE_PAINT_COPY);
IGRAPHICS_StretchBlt (pg,0, 0, 100, 100,pRawImage2, AEE_RO_TRANSPARENT ) ;
IGRAPHICS_Update(pg);
IGRAPHICS_Release(pg);
IDISPLAY_Update (pApp->a.m_pIDisplay);
ISHELL_FreeResData(pApp->a.m_pIShell, pBMPImage2);
return TRUE;
}

I hope this helps:
boolean displayStrech(myapp_t *pApp)
{
void* pRawImage2;
AEEBmp pBMPImage2;
IGraphics *pg;
boolean bVal;
bVal = FALSE;
pg = NULL;
//Pull the BMP from the resource file
pBMPImage2 = ISHELL_LoadResData(pApp->a.m_pIShell, RES_FILE, (short)IDB_LOGO, RESTYPE_IMAGE);
if (pBMPImage2 == NULL)
return(NULL);
//The data being pointed by pRawImage2 is without the AEE header
pRawImage2= (byte *)pBMPImage2 + *((byte *)pBMPImage2);
//IDB_LOGO
if(ISHELL_CreateInstance(pApp->a.m_pIShell,AEECLSID_GRAPHICS,(void**)&pg) != SUCCESS)
return FALSE;
IGRAPHICS_SetBackground(pg,255,255,255);
IGRAPHICS_ClearViewport(pg);
IGRAPHICS_SetFillMode(pg, TRUE);
IGRAPHICS_SetPaintMode(pg, AEE_PAINT_COPY);
IGRAPHICS_StretchBlt (pg,0, 0, 100, 100,pRawImage2, AEE_RO_TRANSPARENT ) ;
IGRAPHICS_Update(pg);
IGRAPHICS_Release(pg);
IDISPLAY_Update (pApp->a.m_pIDisplay);
ISHELL_FreeResData(pApp->a.m_pIShell, pBMPImage2);
return TRUE;
}

Hi All,
I have taken a Icon view menu control and trying to display the contents of a directory containing bmps as icons in that menu.But it only successfully adds the first bmp to the menucontrol and then
IMENUCTL_AddItemEx returns false. Here is the code. Cany any one guess whats the problem ??The loop is contuning for all the files and successfully displaying all the names of files inside the directory by DBGPRINTF().But IMENUCTL_AddItemEx returns false after the first pass in the while loop.
////////////////////////////////////////////////////////////////////////////////////
CtlAddItem ai;
IFileMgr * pIFileMgr;
FileInfo pInfo;
const char * pszDir= "/Images";
IImage * pImage;
const char *pszImageFile="/Images/heart.bmp";
AECHAR wszBuff[MAX_FILE_NAME+1];
AECHAR *szBuf = L"hello";
uint16 nItem =1;
int result;
result = ISHELL_CreateInstance(pApp->a.m_pIShell,AEECLSID_FILEMGR,(void **)&pIFileMgr);
IIMAGE_Draw(pApp->m_pTitleImage, 0, 0);
IDISPLAY_Update(pApp->a.m_pIDisplay);
gutil_Reset(pApp);
//DBGPRINTF("I am here");
IMENUCTL_SetRect(pApp->m_pIconViewMenu , &(pApp->m_rScreenRect) );
if(pIFileMgr)
{
if(SUCCESS == IFILEMGR_EnumInit(pIFileMgr,pszDir,FALSE))
{
while(IFILEMGR_EnumNext(pIFileMgr,&pInfo))
{
if(STRENDS(".bmp",pInfo.szName))
{
STRTOWSTR(pInfo.szName,wszBuff,MAX_FILE_NAME+1);
ai.pImage = ISHELL_LoadImage ( pApp->a.m_pIShell,pInfo.szName) ;
pInfo.szName[STRLEN(pInfo.szName)-4]='\000';
ai.pText= STRTOWSTR(pInfo.szName,wszBuff,MAX_FILE_NAME+1);
ai.pszResImage = NULL;
ai.pszResText = NULL;
ai.wText = NULL;
ai.wImage = NULL;
ai.wItemID = NULL;
if (IMENUCTL_AddItemEx(pApp->m_pIconViewMenu, &ai)== TRUE)
{
BGPRINTF("added one image" );

else
break;
FREEIF(pImage);
ai.pImage=NULL;
ai.pText=NULL;

IFILEMGR_Release(pIFileMgr);

IMENUCTL_SetActive (pApp->m_pIconViewMenu, TRUE ) ;
//IMENUCTL_Redraw(pApp->m_pIconViewMenu);
IDISPLAY_Update(pApp->a.m_pIDisplay);
pApp->m_eAppState = APP_STATE_MAINMENU;
return TRUE;

/////////////////////////////////////////////////////////////////////////////////
Thanks and Rgds.
SKDas

Hi All,
I have taken a Icon view menu control and trying to display the contents of a directory containing bmps as icons in that menu.But it only successfully adds the first bmp to the menucontrol and then
IMENUCTL_AddItemEx returns false. Here is the code. Cany any one guess whats the problem ??The loop is contuning for all the files and successfully displaying all the names of files inside the directory by DBGPRINTF().But IMENUCTL_AddItemEx returns false after the first pass in the while loop.
////////////////////////////////////////////////////////////////////////////////////
CtlAddItem ai;
IFileMgr * pIFileMgr;
FileInfo pInfo;
const char * pszDir= "/Images";
IImage * pImage;
const char *pszImageFile="/Images/heart.bmp";
AECHAR wszBuff[MAX_FILE_NAME+1];
AECHAR *szBuf = L"hello";
uint16 nItem =1;
int result;
result = ISHELL_CreateInstance(pApp->a.m_pIShell,AEECLSID_FILEMGR,(void **)&pIFileMgr);
IIMAGE_Draw(pApp->m_pTitleImage, 0, 0);
IDISPLAY_Update(pApp->a.m_pIDisplay);
gutil_Reset(pApp);
//DBGPRINTF("I am here");
IMENUCTL_SetRect(pApp->m_pIconViewMenu , &(pApp->m_rScreenRect) );
if(pIFileMgr)
{
if(SUCCESS == IFILEMGR_EnumInit(pIFileMgr,pszDir,FALSE))
{
while(IFILEMGR_EnumNext(pIFileMgr,&pInfo))
{
if(STRENDS(".bmp",pInfo.szName))
{
STRTOWSTR(pInfo.szName,wszBuff,MAX_FILE_NAME+1);
ai.pImage = ISHELL_LoadImage ( pApp->a.m_pIShell,pInfo.szName) ;
pInfo.szName[STRLEN(pInfo.szName)-4]='\000';
ai.pText= STRTOWSTR(pInfo.szName,wszBuff,MAX_FILE_NAME+1);
ai.pszResImage = NULL;
ai.pszResText = NULL;
ai.wText = NULL;
ai.wImage = NULL;
ai.wItemID = NULL;
if (IMENUCTL_AddItemEx(pApp->m_pIconViewMenu, &ai)== TRUE)
{
BGPRINTF("added one image" );

else
break;
FREEIF(pImage);
ai.pImage=NULL;
ai.pText=NULL;

IFILEMGR_Release(pIFileMgr);

IMENUCTL_SetActive (pApp->m_pIconViewMenu, TRUE ) ;
//IMENUCTL_Redraw(pApp->m_pIconViewMenu);
IDISPLAY_Update(pApp->a.m_pIDisplay);
pApp->m_eAppState = APP_STATE_MAINMENU;
return TRUE;

/////////////////////////////////////////////////////////////////////////////////
Thanks and Rgds.
SKDas

everything works great as long as i load the BMP with
ISHELL_LoadRes.....
but what has to be done when i have a buffer filled
with BMP data with the HEADERS?
e.g something like this :
BUFFER->STRETCH->UPDATE_DISPLAY
this is working for me :
BUFFER->CONVERTBMP->DISPLAY_BITBLT->UPDATE_DISPLAY
tried to strip of headers with
(byte *)Sourcebmp + *((byte *)Sourcebmp);
and then call IGRAPHICS_StretchBlt but that doesn't work
(for me at least)
any ideas anyone ?

everything works great as long as i load the BMP with
ISHELL_LoadRes.....
but what has to be done when i have a buffer filled
with BMP data with the HEADERS?
e.g something like this :
BUFFER->STRETCH->UPDATE_DISPLAY
this is working for me :
BUFFER->CONVERTBMP->DISPLAY_BITBLT->UPDATE_DISPLAY
tried to strip of headers with
(byte *)Sourcebmp + *((byte *)Sourcebmp);
and then call IGRAPHICS_StretchBlt but that doesn't work
(for me at least)
any ideas anyone ?

Stefano this is which I think is your problem:
You said
"
this is working for me :
BUFFER->CONVERTBMP->DISPLAY_BITBLT->UPDATE_DISPLAY
tried to strip of headers with
(byte *)Sourcebmp + *((byte *)Sourcebmp);
"
In which step did you striped the headers?
I think you should do:
BUFFER->stripe headers before convert ->CONVERTBMP->DISPLAY_BITBLT->UPDATE_DISPLAY

Stefano this is which I think is your problem:
You said
"
this is working for me :
BUFFER->CONVERTBMP->DISPLAY_BITBLT->UPDATE_DISPLAY
tried to strip of headers with
(byte *)Sourcebmp + *((byte *)Sourcebmp);
"
In which step did you striped the headers?
I think you should do:
BUFFER->stripe headers before convert ->CONVERTBMP->DISPLAY_BITBLT->UPDATE_DISPLAY

Sandy:
try to give ai.wItemID a value another then NULL. For each menu item you must have diferent id's.

Sandy:
try to give ai.wItemID a value another then NULL. For each menu item you must have diferent id's.

I have the same question:
Having a BMP file, how can I load it and display it ZOOMED on the screen ? (the BMP isn't in the resource file, but it is on the phone, as it has been downloaded before).

I have the same question:
Having a BMP file, how can I load it and display it ZOOMED on the screen ? (the BMP isn't in the resource file, but it is on the phone, as it has been downloaded before).

finally after some trivial tasks this is known to work (at least for me) ,
(m_BodyBuffer contains windows BMP file with headers)
ISHELL_GetDeviceInfo(pme->pIShell, &dm);
pDataBytes = (byte *)pme->m_BodyBuffer + *((byte *)pme->m_BodyBuffer);
pBmp = CONVERTBMP (pme->m_BodyBuffer, &imageInfo, &bVal);
IGRAPHICS_StretchBlt(pme->m_pGraphics,0,0,dm.cxScreen,dm.cyScreen,pBmp, AEE_RO_COPY);
IGRAPHICS_Update (pme->m_pGraphics) ;
IDISPLAY_Update(pme->pIDisplay);
but stretch needs to be used carefully since enlarging a BMP
without keeping aspect ratio makes it funny on screen

finally after some trivial tasks this is known to work (at least for me) ,
(m_BodyBuffer contains windows BMP file with headers)
ISHELL_GetDeviceInfo(pme->pIShell, &dm);
pDataBytes = (byte *)pme->m_BodyBuffer + *((byte *)pme->m_BodyBuffer);
pBmp = CONVERTBMP (pme->m_BodyBuffer, &imageInfo, &bVal);
IGRAPHICS_StretchBlt(pme->m_pGraphics,0,0,dm.cxScreen,dm.cyScreen,pBmp, AEE_RO_COPY);
IGRAPHICS_Update (pme->m_pGraphics) ;
IDISPLAY_Update(pme->pIDisplay);
but stretch needs to be used carefully since enlarging a BMP
without keeping aspect ratio makes it funny on screen

just adding some "funny" details for the code snip i sent earlier,
BMP is ordinary windows BMP file created with Microsoft Paint
BMP is downloaded to phone from a simple html page link, (IWEB+IHTML)
for BREW simulator v1.1 (v1.1.0.18 to be exact) stripping headers is useless ( stretch doesn't care if i stripe them or not)
for BREW simulator v2.1 (v2.1.0.20) don't know about
stripping because Stretch won't do anything , BMP is displayed
as is 1:1 zoom
for BREW simulator v3.0 (v3.0.0.22) nothing happens, screen
stays blank
either i've got some installtion errors or as i move up to API version
thinks get more and more worse for code to maintain,
anyone feel free drop an idea......

just adding some "funny" details for the code snip i sent earlier,
BMP is ordinary windows BMP file created with Microsoft Paint
BMP is downloaded to phone from a simple html page link, (IWEB+IHTML)
for BREW simulator v1.1 (v1.1.0.18 to be exact) stripping headers is useless ( stretch doesn't care if i stripe them or not)
for BREW simulator v2.1 (v2.1.0.20) don't know about
stripping because Stretch won't do anything , BMP is displayed
as is 1:1 zoom
for BREW simulator v3.0 (v3.0.0.22) nothing happens, screen
stays blank
either i've got some installtion errors or as i move up to API version
thinks get more and more worse for code to maintain,
anyone feel free drop an idea......

Can you tell how we can convert IBitmap to IImage format

Can you tell how we can convert IBitmap to IImage format

Hi ,
In the following code I want to draw the IMAGE using IIMAGE_Draw.I want to draw the shrinked Image that I capture thru IGRAPHICS_Strechblt.I Load an windows BMP by calling IFILE_Read. The image13 is an IBitmap type and when passed to IDISPLAY_Bitblt it is displayed on the screen.But when passed to the IMEMAStream as a parameter it doesnot display anything.where as the raw data in pBuf when passed to the IMEMStream draws the normal image. I want to draw the shrinked image by IIMAGE_Draw method only. Because my Final aim is to pass that IIMAGE as an pImage field in the CtlAddItem structure.Any help is highly appreciated.
GUtilApp * pApp = (GUtilApp * ) pi;
IFile *pIFile = NULL;
char *pBuf = NULL;
AEERect rRect;
FileInfo lInfo;
AEEDeviceInfo di;
uint32 nBytesRead;
CtlAddItem *pai=NULL;
char FileName[100];
IBitmap *ppIBitmap ;
IBitmap* image13;
AEECLSID cls;
AEEBitmapInfo *BI;
cls = ISHELL_GetHandler(pApp->a.m_pIShell, HTYPE_VIEWER, "image/bmp");
if (cls) {
ISHELL_CreateInstance(pApp->a.m_pIShell, cls, (void **)(&pApp->pImage));
}
IDISPLAY_ClearScreen(pApp->a.m_pIDisplay);
pai = (CtlAddItem *)MALLOC (sizeof(CtlAddItem));
IMENUCTL_GetItem(pApp->m_pIconViewMenu, (unsigned short)wParam, pai ) ;
WSTRTOSTR(pai->pText,FileName,AEBUFSIZE+1);
ISHELL_GetDeviceInfo(pApp->a.m_pIShell, &di);
rRect.x = 0;
rRect.y = 0;
rRect.dx = di.cxScreen;
rRect.dy = di.cyScreen;
IGRAPHICS_SetViewport(pApp->m_pGraphics, &rRect, AEE_GRAPHICS_NONE);
pIFile = IFILEMGR_OpenFile(pApp->m_pIFileMgr, FileName, _OFM_READ);
IFILE_GetInfo(pIFile, &lInfo );
pBuf = (char *)MALLOC(sizeof(char)* lInfo.dwSize+1 );
nBytesRead = IFILE_Read(pIFile, pBuf, lInfo.dwSize);
IDISPLAY_GetDeviceBitmap (pApp->a.m_pIDisplay, &ppIBitmap );
IBITMAP_CreateCompatibleBitmap(ppIBitmap,(IBitmap **)&image13,24,24);
if (pApp->m_pGraphics)
{
IGRAPHICS_StretchBlt(pApp->m_pGraphics, 0, 0, 24,24, pBuf, AEE_RO_COPY);
IBITMAP_BltIn(image13,0,0,24,24,ppIBitmap,0,0,AEE_RO_COPY);
IDISPLAY_BitBlt(pApp->a.m_pIDisplay, 50,50,100,100,(byte *)image13, 0,0,AEE_RO_COPY);
//IF THIS LINE IS UNCOMMENTED SHRINKED IMAGE IS SEEN
//IDISPLAY_ClearScreen(pApp->a.m_pIDisplay);
BI=(AEEBitmapInfo*)MALLOC(sizeof(AEEBitmapInfo));
IBITMAP_GetInfo(image13,BI,sizeof(AEEBitmapInfo));
//IMEMASTREAM_Set(pApp->m_pMemStream,(char *)pBufTemp,sizeof(char)*(nBytesRead) /*sizeof(char)* lInfo.dwSize + 1*//*sizeof(char )*((BI->cx) *(BI->cy ))+1*/,0,0);
//WHY THE FOLLOWING LINE DOES NOT DISPLAY ANYTHING WHERE AS THE LINE FOLLOWING IT WHEN UNCOMMENTED DISPLAYS THE IMAGE
IMEMASTREAM_Set(pApp->m_pMemStream,(byte *)image13,sizeof(char)*(576) ,0,0);
//IMEMASTREAM_Set(pApp->m_pMemStream,(byte *)image13,sizeof(char)*nBytesRead ,0,0);
DBGPRINTF("--------->%d",BI->cx);
DBGPRINTF("--------->%d",BI->cy);
DBGPRINTF("--------->%d",BI->nDepth);
IIMAGE_SetStream(pApp->pImage,(IAStream *)pApp->m_pMemStream);
IIMAGE_Draw(pApp->pImage,0,0);
IDISPLAY_Update(pApp->a.m_pIDisplay);
//IGRAPHICS_Update(pApp->m_pGraphics);
FREEIF(pBuf);
FREEIF(pai);
FREEIF(BI);
}
return FALSE;
Thanks and Regards,
Sandy.

Hi ,
In the following code I want to draw the IMAGE using IIMAGE_Draw.I want to draw the shrinked Image that I capture thru IGRAPHICS_Strechblt.I Load an windows BMP by calling IFILE_Read. The image13 is an IBitmap type and when passed to IDISPLAY_Bitblt it is displayed on the screen.But when passed to the IMEMAStream as a parameter it doesnot display anything.where as the raw data in pBuf when passed to the IMEMStream draws the normal image. I want to draw the shrinked image by IIMAGE_Draw method only. Because my Final aim is to pass that IIMAGE as an pImage field in the CtlAddItem structure.Any help is highly appreciated.
GUtilApp * pApp = (GUtilApp * ) pi;
IFile *pIFile = NULL;
char *pBuf = NULL;
AEERect rRect;
FileInfo lInfo;
AEEDeviceInfo di;
uint32 nBytesRead;
CtlAddItem *pai=NULL;
char FileName[100];
IBitmap *ppIBitmap ;
IBitmap* image13;
AEECLSID cls;
AEEBitmapInfo *BI;
cls = ISHELL_GetHandler(pApp->a.m_pIShell, HTYPE_VIEWER, "image/bmp");
if (cls) {
ISHELL_CreateInstance(pApp->a.m_pIShell, cls, (void **)(&pApp->pImage));
}
IDISPLAY_ClearScreen(pApp->a.m_pIDisplay);
pai = (CtlAddItem *)MALLOC (sizeof(CtlAddItem));
IMENUCTL_GetItem(pApp->m_pIconViewMenu, (unsigned short)wParam, pai ) ;
WSTRTOSTR(pai->pText,FileName,AEBUFSIZE+1);
ISHELL_GetDeviceInfo(pApp->a.m_pIShell, &di);
rRect.x = 0;
rRect.y = 0;
rRect.dx = di.cxScreen;
rRect.dy = di.cyScreen;
IGRAPHICS_SetViewport(pApp->m_pGraphics, &rRect, AEE_GRAPHICS_NONE);
pIFile = IFILEMGR_OpenFile(pApp->m_pIFileMgr, FileName, _OFM_READ);
IFILE_GetInfo(pIFile, &lInfo );
pBuf = (char *)MALLOC(sizeof(char)* lInfo.dwSize+1 );
nBytesRead = IFILE_Read(pIFile, pBuf, lInfo.dwSize);
IDISPLAY_GetDeviceBitmap (pApp->a.m_pIDisplay, &ppIBitmap );
IBITMAP_CreateCompatibleBitmap(ppIBitmap,(IBitmap **)&image13,24,24);
if (pApp->m_pGraphics)
{
IGRAPHICS_StretchBlt(pApp->m_pGraphics, 0, 0, 24,24, pBuf, AEE_RO_COPY);
IBITMAP_BltIn(image13,0,0,24,24,ppIBitmap,0,0,AEE_RO_COPY);
IDISPLAY_BitBlt(pApp->a.m_pIDisplay, 50,50,100,100,(byte *)image13, 0,0,AEE_RO_COPY);
//IF THIS LINE IS UNCOMMENTED SHRINKED IMAGE IS SEEN
//IDISPLAY_ClearScreen(pApp->a.m_pIDisplay);
BI=(AEEBitmapInfo*)MALLOC(sizeof(AEEBitmapInfo));
IBITMAP_GetInfo(image13,BI,sizeof(AEEBitmapInfo));
//IMEMASTREAM_Set(pApp->m_pMemStream,(char *)pBufTemp,sizeof(char)*(nBytesRead) /*sizeof(char)* lInfo.dwSize + 1*//*sizeof(char )*((BI->cx) *(BI->cy ))+1*/,0,0);
//WHY THE FOLLOWING LINE DOES NOT DISPLAY ANYTHING WHERE AS THE LINE FOLLOWING IT WHEN UNCOMMENTED DISPLAYS THE IMAGE
IMEMASTREAM_Set(pApp->m_pMemStream,(byte *)image13,sizeof(char)*(576) ,0,0);
//IMEMASTREAM_Set(pApp->m_pMemStream,(byte *)image13,sizeof(char)*nBytesRead ,0,0);
DBGPRINTF("--------->%d",BI->cx);
DBGPRINTF("--------->%d",BI->cy);
DBGPRINTF("--------->%d",BI->nDepth);
IIMAGE_SetStream(pApp->pImage,(IAStream *)pApp->m_pMemStream);
IIMAGE_Draw(pApp->pImage,0,0);
IDISPLAY_Update(pApp->a.m_pIDisplay);
//IGRAPHICS_Update(pApp->m_pGraphics);
FREEIF(pBuf);
FREEIF(pai);
FREEIF(BI);
}
return FALSE;
Thanks and Regards,
Sandy.

hi, the code from Viorel M really works
Though care has to be taken at least for simulator,
you don't want to deal with 256 or 24 bit bmp, 16 color bmp works fine.
good luck to every one!
:o
really tired to deal with the weired things in BREW, can't they write it with C++?

hi, the code from Viorel M really works
Though care has to be taken at least for simulator,
you don't want to deal with 256 or 24 bit bmp, 16 color bmp works fine.
good luck to every one!
:o
really tired to deal with the weired things in BREW, can't they write it with C++?

When I first tried to follow this thread, I was confused about the different image fomats used in Brew. I offer the following clarification to others who might also find itconfusing. Note that different blit calls within the Brew API's expect image input in different formats.
ISHELL_LoadResData(...) with RESTYPE_IMAGE as last parameter returns a block that begins with an AEE header (mime style) and is followed by a Windows BMP structure. The Windows BMP structure begins with the Microsoft defined BITMAPFILEHEADER structure which you can google for details.
ISHELL_LoadResImage(...) returns a pointer to an IImage structure.
ISHELL_LoadResBitmap(...) returns a pointer to an IBitmap structure.
NOTE: It appears that all of the structures returned by the above calls return something that begins with an AEE header but their formats diverge into incompatible differences after that. I was initially mislead by the assumption that the RESTYPE_IMAGE enumeration was a tag indicating the IImage format but through trial and error learned that they do not corresponed. Also, the above are only three among several more device dependant and device independant image formats used in Brew API's.

When I first tried to follow this thread, I was confused about the different image fomats used in Brew. I offer the following clarification to others who might also find itconfusing. Note that different blit calls within the Brew API's expect image input in different formats.
ISHELL_LoadResData(...) with RESTYPE_IMAGE as last parameter returns a block that begins with an AEE header (mime style) and is followed by a Windows BMP structure. The Windows BMP structure begins with the Microsoft defined BITMAPFILEHEADER structure which you can google for details.
ISHELL_LoadResImage(...) returns a pointer to an IImage structure.
ISHELL_LoadResBitmap(...) returns a pointer to an IBitmap structure.
NOTE: It appears that all of the structures returned by the above calls return something that begins with an AEE header but their formats diverge into incompatible differences after that. I was initially mislead by the assumption that the RESTYPE_IMAGE enumeration was a tag indicating the IImage format but through trial and error learned that they do not corresponed. Also, the above are only three among several more device dependant and device independant image formats used in Brew API's.

Hi...
This thread is about zooming and I see you use IGRAPHICS_StretchBlt everywhere but I can get this simple function working... I have a good graphics and bitmap pointers and it simply draw nothing on the screen...
Is it me or the simulator?
Germ

Hi...
This thread is about zooming and I see you use IGRAPHICS_StretchBlt everywhere but I can get this simple function working... I have a good graphics and bitmap pointers and it simply draw nothing on the screen...
Is it me or the simulator?
Germ