package com.bumptech.glide.load.resource.gifbitmap; import com.bumptech.glide.load.engine.Resource; import com.bumptech.glide.load.ResourceDecoder; import com.bumptech.glide.load.model.ImageVideoWrapper; import java.io.IOException; import java.io.InputStream; public class GifBitmapWrapperStreamResourceDecoder implements ResourceDecoder{ private ResourceDecoder gifBitmapDecoder; public GifBitmapWrapperStreamResourceDecoder(ResourceDecoder gifBitmapDecoder) { this.gifBitmapDecoder = gifBitmapDecoder; } @Override public Resource decode(InputStream source, int width, int height) throws IOException { return gifBitmapDecoder.decode(new ImageVideoWrapper(source, null), width, height); } @Override public String getId() { return gifBitmapDecoder.getId(); } }