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

Developer

Forums

Forums:

HI

 

I am facing problem in using Iwidget_SetImageFrame to set desired frame in the animated bci image.

 

I have a animated bci image, if i use Iwidget_SetImageFrame(widget,2); it is not setting any image, it is returning failed. What i need to do set exact desired frame ??

 

Regards

Gautam.

Hi Atul/Shivendra
Somebody please reply.
 
Regards
Gautam

Hi Atul/Shivendra
Somebody please reply.
 
Regards
Gautam

I don't think it works that way. Here is how it should work:
Lets say if you have an animated bitmap that stores all of its frames in a single 512 x 80 pixel bitmap and if you say it has 8 frames then each frame of the animation will be 64 pixels wide (512 pixels divided by 8 frames equals 64 pixels per frame). Now to display single frame using Image widget, you need to:1. Specify number of frames in image using IWidget_SetNFrames(). This is after image is set  using IWidget_SetImage().2. Use IWidget_SetImageFrame() and specify frame to draw and invalidate image widget.
This worked for me. Thanks, Atul

I don't think it works that way. Here is how it should work:
Lets say if you have an animated bitmap that stores all of its frames in a single 512 x 80 pixel bitmap and if you say it has 8 frames then each frame of the animation will be 64 pixels wide (512 pixels divided by 8 frames equals 64 pixels per frame). Now to display single frame using Image widget, you need to:1. Specify number of frames in image using IWidget_SetNFrames(). This is after image is set  using IWidget_SetImage().2. Use IWidget_SetImageFrame() and specify frame to draw and invalidate image widget.
This worked for me. Thanks, Atul