• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying gifs...  RSS feed

 
Ben Cramphorn
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would I go about displaying a gif image file in a java application.

The problem is I need to display the image slowly line by line and not just straight onto the screen.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the way to do this is with a clipping rectangle or shape - see java.awt.Graphics and Graphics2D
Set a clipping rectangle to expose a few pixel lines at a time.
You can also do dramatic fades by controlling the alpha.

(amazing -my ancient "scratch-off" applet still works with Java 1.5)
Bill
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Swing/AWT...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!