Understand an gif is animated or not in JAVA -


i have gif image , able detect whether gif animated gif or not using java. question detection rather displaying gif.

i see mime type of animated gif isn't different of static gif.

how can it?

you need imagereader. if size 1 not animated, above animated. check out:

public snippet() {         file f = new file("test.gif");         imagereader = imageio.getimagereadersbysuffix("gif").next();           imageinputstream iis;         try {             iis = imageio.createimageinputstream(f);             is.setinput(iis);               int images= is.getnumimages(true);         } catch (ioexception e) {             e.printstacktrace();         }   } 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -