Solved

Create Animated PNG

Posted on 2004-09-02
13
634 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

708 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

13 Experts available now in Live!

Get 1:1 Help Now