• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 660
  • Last Modified:

Create Animated PNG

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
dr0zaxx
Asked:
dr0zaxx
  • 5
  • 3
  • 3
  • +1
1 Solution
 
objectsCommented:
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
 
objectsCommented:
does png actually support animated images?
you may need to save as a gif.
0
 
objectsCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
objectsCommented:
0
 
armoghanCommented:
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
 
dr0zaxxAuthor Commented:
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
 
objectsCommented:
no and i don't think it would support animated png's anyway :(

0
 
girionisCommented:
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
 
girionisCommented:
0
 
armoghanCommented:
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
 
dr0zaxxAuthor Commented:
Yes I cannot display animated PNG directly in J2ME. It is true.

Thanks for the answers anyway.
0
 
girionisCommented:
:)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now