|
Replies:
5
-
Last Post:
Nov 4, 2009 1:51 PM
by: ugochirico
|
Threads:
[
Previous
|
Next
]
|
|
|
|
|
|
How to load animated gif at run time
Posted:
Oct 16, 2008 1:28 AM
|
|
|
HI this is probably very easy but I can't seem to find the code I have bytes of animatedgif downloaded from server How do I show the animated gif on the form Image.CreateImage() fails
|
|
|
|
|
|
|
Re: How to load animated gif at run time
Posted:
Oct 16, 2008 4:10 AM
in response to: okaminer
|
|
|
|
|
Hi, this is not supported by some devices which is why we offer our animation support (via the resource editor). You will need to use the MMAPI and the MediaComponent to "Play" an animated gif which might not work for all devices.
> HI this is probably very easy but I can't seem to find the code > I have bytes of animatedgif downloaded from server > How do I show the animated gif on the form > Image.CreateImage() fails > [Message sent by forum member 'okaminer' (okaminer)] > > http://forums.java.net/jive/thread.jspa?messageID=308001 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|
|
|
|
Re: How to load animated gif at run time
Posted:
Oct 16, 2008 10:17 AM
in response to: okaminer
|
|
|
Hi Shay Thanks for reply but of course I wont to use your solution  My code is as follow and for some reason it get screwed up
InputStream is = getClass().getResourceAsStream("/OceanFish.gif"); DataInputStream di = new DataInputStream(is); StaticAnimation simage = StaticAnimation.createAnimation(di);
Do you change the animated image when creating the resource file?
|
|
|
|
|
|
|
|
Re: How to load animated gif at run time
Posted:
Oct 16, 2008 10:42 AM
in response to: okaminer
|
|
|
|
|
Hi, we change the gif image when creating the resource file (decoding a GIF is VERY CPU intensive and complex) so the code bellow won't work. You will need to create a resource file for this to work or use MMAPI.
On Oct 16, 2008, at 7:17 PM, lwuit-users@mobileandembedded.org wrote:
> Hi Shay > Thanks for reply but of course I wont to use your solution  > My code is as follow and for some reason it get screwed up > > InputStream is = getClass().getResourceAsStream("/OceanFish.gif"); > DataInputStream di = new DataInputStream(is); > StaticAnimation simage = StaticAnimation.createAnimation(di); > > Do you change the animated image when creating the resource file? > [Message sent by forum member 'okaminer' (okaminer)] > > http://forums.java.net/jive/thread.jspa?messageID=308270 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|
|
|
|
|
|
Re: How to load animated gif at run time
Posted:
Oct 17, 2008 8:37 AM
in response to: okaminer
|
|
|
Thanks Resource file it will be
|
|
|
|
|