Solved

Create Animated PNG

Posted on 2004-09-02
13
637 Views
Last Modified: 2009-12-16
Hi guys,

I know how to use the ImageIO class to create a PNG image. However, is it possible to create an animated PNG? If yes, how? If no, any third party libraries for download?
0
Comment
Question by:dr0zaxx
  • 5
  • 3
  • 3
  • +1
13 Comments
 
LVL 92

Expert Comment

by:objects
ID: 11970428
not sure, perhaps have a dig thru:
http://www.geocities.com/marcoschmidt.geo/java-image-coding.html

will let u know if i come across anything.
0
 
LVL 92

Expert Comment

by:objects
ID: 11970439
does png actually support animated images?
you may need to save as a gif.
0
 
LVL 92

Expert Comment

by:objects
ID: 11970448
theres a draft extension of the standard to support animation:
http://www.vlad1.com/~vladimir/projects/apng/

don't like your chances of finding a java encoder though, and if you did you then have the problem that most things will only read the first frame anyway.

0
 
LVL 92

Expert Comment

by:objects
ID: 11970457
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11970471
If you have more than two PNG images, you can use the follownig method to do animation
http://www.rgagnon.com/javadetails/java-0262.html
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11970473
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:dr0zaxx
ID: 11970557
I cannot use GIF, because I need to display the animation on a mobile phone. J2ME does not support animated GIF.

Looks like I have no luck. :(
0
 
LVL 92

Expert Comment

by:objects
ID: 11970563
no and i don't think it would support animated png's anyway :(

0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 11970607
Look at this article of how to animate PNG files:

http://developers.sun.com/techtopics/mobility/midp/ttips/animatedimages/

And this link shows how to animate sprites, although not exactly what you are looking for it might give you some clues:

http://www-106.ibm.com/developerworks/edu/wi-dw-wi-sprites-i.html
0
 
LVL 35

Expert Comment

by:girionis
ID: 11970615
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11971717
dr0zaxx :
I have posted two links above with the help of which you can implement animation of PNG files. You just have to display them after specific interval
0
 
LVL 1

Author Comment

by:dr0zaxx
ID: 12037068
Yes I cannot display animated PNG directly in J2ME. It is true.

Thanks for the answers anyway.
0
 
LVL 35

Expert Comment

by:girionis
ID: 12041680
:)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to implement Singleton Design Pattern in Java.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now