| Author |
Getting all image frames from animated .gif files
|
Gerald Lam
Greenhorn
Joined: Aug 23, 2010
Posts: 6
|
|
Hey, I've basically searched everywhere in trying to find out how to do this.
Can anyone point me in the right direction?
As in, I'm trying to extract all the files from an animated .gif files to .png file while keeping transparency.
EDIT : Nevermind, used C# instead.
|
 |
Rob Spoor
Saloon Keeper
Joined: Oct 27, 2005
Posts: 18368
|
|
The ImageIO class could have helped you out:
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Gerald Lam
Greenhorn
Joined: Aug 23, 2010
Posts: 6
|
|
Hm, I've already tried that, but it fits the image to screen.
So if an image is 32x32 but it has a 2px border of transparency,
it'll become 28x28
|
 |
Rob Spoor
Saloon Keeper
Joined: Oct 27, 2005
Posts: 18368
|
|
|
Odd. I've tried that with a few images but all resulting images were equally large.
|
 |
Gerald Lam
Greenhorn
Joined: Aug 23, 2010
Posts: 6
|
|
Weird, I tried it with this picture, but for this one, it doesn't resize tho, it just removes part of the picture.
Also, do you happen to know how to implement animated .gif files into slick?
|
 |
Rob Spoor
Saloon Keeper
Joined: Oct 27, 2005
Posts: 18368
|
|
Gerald Lam wrote:Weird, I tried it with this picture, but for this one, it doesn't resize tho, it just removes part of the picture.

It also happens to me with that image. My guess is that the GIF file was created with only the first image that large. I don't have any GIF editing software installed right now so I can't verify.
Also, do you happen to know how to implement animated .gif files into slick?
Not at all, sorry.
|
 |
Gerald Lam
Greenhorn
Joined: Aug 23, 2010
Posts: 6
|
|
Hmm, I made that on photoshop and I'm sure every frame is the same size.
Extracting it with the C# extractor I had works fine, it's just that I'm having problems with this.
I need to do it on java so instead of using tons of images to animate it, I can just use a .gif file.
|
 |
 |
|
|
subject: Getting all image frames from animated .gif files
|
|
|