Display of gif files/ animation of images | developer.brewmp.com Display of gif files/ animation of images | developer.brewmp.com

Developer

Display of gif files/ animation of images

Hi all
I want to display .gif file while my application is communicating with server. But i am not able set .gif image in my imgewidget. What is the procedure to display .gif file???

Thanks in advance
Krishna

That should work. Make sure the phone supports GIFs.
-Erik

That should work. Make sure the phone supports GIFs.
-Erik

Hi
I have used ISHELL_CreateInstance() with a class ID of AEECLSID_IMAGEWIDGET to create image widget.
Then to set image in imagewidgt
IImage* img = ISHELL_LoadImage() with .gif file name. but i am not able to load image. (i.e img = 0)
I have read IImage interface in Brew API reference, it does not support .gif file format. (correct me if i am wrong)
Then how to set gif file in image widget??
I have also tried another way to load image.
First read the .gif file data into buf..
1. ISHELL_CreateInstance( AEECLSID_MEMASTREAM, (void **)&memStream_ )
2. AEECLSID cls = ISHELL_GetHandler(((AEEApplet*)GETAPPINSTANCE())->m_pIShell, HTYPE_BROWSE ,image/gif );
3. ISHELL_CreateInstance( cls , (void **)&image_) )
4. int imageSize = buf.getSize();
5. BYTE* imageBytes = (BYTE*)MALLOC(imageSize);//new BYTE[ imageSize ];
6. MEMCPY( imageBytes, buf.getBytePtr(), imageSize );
7. IMEMASTREAM_Set( memStream_, imageBytes, imageSize, 0, FALSE );
8. IIMAGE_SetStream( image_, (IAStream*)memStream_ );
But i am getting cls value 0 in second step. This code is working fine with png image.
Then how to set .gif images in image widget.

Hi
I have used ISHELL_CreateInstance() with a class ID of AEECLSID_IMAGEWIDGET to create image widget.
Then to set image in imagewidgt
IImage* img = ISHELL_LoadImage() with .gif file name. but i am not able to load image. (i.e img = 0)
I have read IImage interface in Brew API reference, it does not support .gif file format. (correct me if i am wrong)
Then how to set gif file in image widget??
I have also tried another way to load image.
First read the .gif file data into buf..
1. ISHELL_CreateInstance( AEECLSID_MEMASTREAM, (void **)&memStream_ )
2. AEECLSID cls = ISHELL_GetHandler(((AEEApplet*)GETAPPINSTANCE())->m_pIShell, HTYPE_BROWSE ,image/gif );
3. ISHELL_CreateInstance( cls , (void **)&image_) )
4. int imageSize = buf.getSize();
5. BYTE* imageBytes = (BYTE*)MALLOC(imageSize);//new BYTE[ imageSize ];
6. MEMCPY( imageBytes, buf.getBytePtr(), imageSize );
7. IMEMASTREAM_Set( memStream_, imageBytes, imageSize, 0, FALSE );
8. IIMAGE_SetStream( image_, (IAStream*)memStream_ );
But i am getting cls value 0 in second step. This code is working fine with png image.
Then how to set .gif images in image widget.

If you are doing this in the simulator, the simulator does not include a GIF decoder. There is one in the UIOne toolkit, I believe.
If you are doing this on a phone, then the phone does not support GIFs.
-Erik

If you are doing this in the simulator, the simulator does not include a GIF decoder. There is one in the UIOne toolkit, I believe.
If you are doing this on a phone, then the phone does not support GIFs.
-Erik