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

Developer

Forums

Forums:

Not using IHtmlViewer.

I want to show large picture, but IHtmlViewer can only show part of the picture about screen size.

I want to show large picture, but IHtmlViewer can only show part of the picture about screen size.

widewave wrote:Not using IHtmlViewer.
To load a file directly use ISHELL_LoadImage.
To load from Resfile use ISHELL_LoadResImage.
To draw the image use IIMAGE_Draw.
User can use arrowkeys to see the complete Image.
typedef struct _App{
AEEApplet a;
int DeviceX; // Device screen width.
int DeviceY; // Device screen Height.
int Xpos,Ypos; // Holds the values where images has to be drawn on the screen.
IImage * pImage;
int Im_H,Im_W;
App;
void LoadImage(App *pMe)
{
AEEImageInfo ii;
pMe->pImage = ISHELL_LoadResImage(pMe>a.m_pIShell,RES_FILE,IMAGE);
or
pMe->pImage = ISHELL_LoadImage(pMe>a.m_pIShell,"\image.jpeg");
IIMAGE_GetInfo(pMe->pImage, &ii);
pMe->Im_H = ii.cy; // Height of the image.
pMe->Im_W=ii.cx; // Width of the image.
IIMAGE_Draw(pMe->pImage,0,0);
IDISPLAY_Update(pMe->a.m_pIDisplay);

void ShowCompleteImage(App *pMe,uint16 wParam)
{
if(wParm==AVK_LEFT && pMe->Xpos+pMe->DeviceX<=pMe->Im_W)
pMe->Xpos++;
if(wParam==AVK_RIGHT && pMe->Xpos)
pMe->Xpos--;
if(wParm==AVK_DOWN && pMe->Ypos+pMe->DeviceY<=pMe->Im_H)
pMe->Ypos++;
if(pMe->Ypos && wParam==AVK_UP)
pMe->Ypos--;
IIMAGE_Draw(pMe->pImage,pMe->Xpos,pMe->Ypos);
IDISPLAY_Update(pMe->a.m_pIDisplay);

widewave wrote:Not using IHtmlViewer.
To load a file directly use ISHELL_LoadImage.
To load from Resfile use ISHELL_LoadResImage.
To draw the image use IIMAGE_Draw.
User can use arrowkeys to see the complete Image.
typedef struct _App{
AEEApplet a;
int DeviceX; // Device screen width.
int DeviceY; // Device screen Height.
int Xpos,Ypos; // Holds the values where images has to be drawn on the screen.
IImage * pImage;
int Im_H,Im_W;
App;
void LoadImage(App *pMe)
{
AEEImageInfo ii;
pMe->pImage = ISHELL_LoadResImage(pMe>a.m_pIShell,RES_FILE,IMAGE);
or
pMe->pImage = ISHELL_LoadImage(pMe>a.m_pIShell,"\image.jpeg");
IIMAGE_GetInfo(pMe->pImage, &ii);
pMe->Im_H = ii.cy; // Height of the image.
pMe->Im_W=ii.cx; // Width of the image.
IIMAGE_Draw(pMe->pImage,0,0);
IDISPLAY_Update(pMe->a.m_pIDisplay);

void ShowCompleteImage(App *pMe,uint16 wParam)
{
if(wParm==AVK_LEFT && pMe->Xpos+pMe->DeviceX<=pMe->Im_W)
pMe->Xpos++;
if(wParam==AVK_RIGHT && pMe->Xpos)
pMe->Xpos--;
if(wParm==AVK_DOWN && pMe->Ypos+pMe->DeviceY<=pMe->Im_H)
pMe->Ypos++;
if(pMe->Ypos && wParam==AVK_UP)
pMe->Ypos--;
IIMAGE_Draw(pMe->pImage,pMe->Xpos,pMe->Ypos);
IDISPLAY_Update(pMe->a.m_pIDisplay);

HI
I am not sure about the fact.. but cant v do the same thing as xplained ablove... by IImageCtl API.... it helps in panning of an image

HI
I am not sure about the fact.. but cant v do the same thing as xplained ablove... by IImageCtl API.... it helps in panning of an image

Thank you, brewin.
But are you sure ISHELL_LoadImage can load jpg format image from file?
The sdk say, "Also use ISHELL_LoadImage() to load the bitmap format image directly from the file."

Thank you, brewin.
But are you sure ISHELL_LoadImage can load jpg format image from file?
The sdk say, "Also use ISHELL_LoadImage() to load the bitmap format image directly from the file."

widewave wrote:
But are you sure ISHELL_LoadImage can load jpg format image from file?
The sdk say, "Also use ISHELL_LoadImage() to load the bitmap format image directly from the file."
using ISHELL_LoadImage() you can load any image(but the format should be supported by the handset)

widewave wrote:
But are you sure ISHELL_LoadImage can load jpg format image from file?
The sdk say, "Also use ISHELL_LoadImage() to load the bitmap format image directly from the file."
using ISHELL_LoadImage() you can load any image(but the format should be supported by the handset)