Wrapper support for webp gif apng.Core Module
support for apng webp and gif currently
https://github.com/CHXAIOGE/ModulesSample
https://github.com/CHXAIOGE/ApngSequenceModule
https://github.com/CHXAIOGE/ApngSequence
https://github.com/CHXAIOGE/FrameSequence
https://github.com/CHXAIOGE/FrameSequenceModule
register support:
ApngLoader.init(this);
Graphics.get().getRegistry().append(new FrameSequenceModule(), FrameSequenceLoader.class);
Graphics.get().getRegistry().append(new ApngSequenceModule(), ApngSupportLoader.class);
file[strongly recommanded] or inputstream
try {
Graphics.get().load(rawImageStream , new Target() {
@Override
public void onLoadFailed() {
}
@Override
public void onResourceReady(DrawableWrapper drawableWrapper) {
drawableWrapper.setLoopMode(DrawableHelper.REPEAT_MODE_FINITE);
drawableWrapper.setRepeatCount(1);
drawableWrapper.setPlayListener(new PlayListener() {
@Override
public void onPlayFinished() {
}
});
drawableWrapper.start();
}
}).into(imageView);
} catch (Exception e) {
}