Java 类com.bumptech.glide.load.resource.gif.GifData 实例源码

项目:saarang-iosched    文件:GifBitmapWrapperTransformation.java   
@Override
public Resource<GifBitmapWrapper> transform(Resource<GifBitmapWrapper> resource, int outWidth, int outHeight) {
    Resource<Bitmap> bitmapResource = resource.get().getBitmapResource();
    if (bitmapResource != null) {
        Resource<Bitmap> transformed = wrapped.transform(bitmapResource, outWidth, outHeight);
        if (transformed != bitmapResource) {
            GifBitmapWrapper gifBitmap = new GifBitmapWrapper(transformed, null);
            return new GifBitmapWrapperResource(gifBitmap);
        }
    } else {
        //TODO: this should be pushed down into a GifData transformation?
        Resource<GifData> gifResource = resource.get().getGifResource();
        GifData gifData = gifResource.get();
        Transformation<Bitmap> newTransformation =
                new MultiTransformation<Bitmap>(gifData.getFrameTransformation(), wrapped);
        gifData.setFrameTransformation(newTransformation);
        return new GifBitmapWrapperResource(new GifBitmapWrapper(null, new GifDataResource(gifData)));
    }
    return resource;
}
项目:AppDevFestSudeste2015    文件:GifBitmapWrapperTransformation.java   
@Override
public Resource<GifBitmapWrapper> transform(Resource<GifBitmapWrapper> resource, int outWidth, int outHeight) {
    Resource<Bitmap> bitmapResource = resource.get().getBitmapResource();
    if (bitmapResource != null) {
        Resource<Bitmap> transformed = wrapped.transform(bitmapResource, outWidth, outHeight);
        if (transformed != bitmapResource) {
            GifBitmapWrapper gifBitmap = new GifBitmapWrapper(transformed, null);
            return new GifBitmapWrapperResource(gifBitmap);
        }
    } else {
        //TODO: this should be pushed down into a GifData transformation?
        Resource<GifData> gifResource = resource.get().getGifResource();
        GifData gifData = gifResource.get();
        Transformation<Bitmap> newTransformation =
                new MultiTransformation<Bitmap>(gifData.getFrameTransformation(), wrapped);
        gifData.setFrameTransformation(newTransformation);
        return new GifBitmapWrapperResource(new GifBitmapWrapper(null, new GifDataResource(gifData)));
    }
    return resource;
}
项目:devfestnorte-app    文件:GifBitmapWrapperTransformation.java   
@Override
public Resource<GifBitmapWrapper> transform(Resource<GifBitmapWrapper> resource, int outWidth, int outHeight) {
    Resource<Bitmap> bitmapResource = resource.get().getBitmapResource();
    if (bitmapResource != null) {
        Resource<Bitmap> transformed = wrapped.transform(bitmapResource, outWidth, outHeight);
        if (transformed != bitmapResource) {
            GifBitmapWrapper gifBitmap = new GifBitmapWrapper(transformed, null);
            return new GifBitmapWrapperResource(gifBitmap);
        }
    } else {
        //TODO: this should be pushed down into a GifData transformation?
        Resource<GifData> gifResource = resource.get().getGifResource();
        GifData gifData = gifResource.get();
        Transformation<Bitmap> newTransformation =
                new MultiTransformation<Bitmap>(gifData.getFrameTransformation(), wrapped);
        gifData.setFrameTransformation(newTransformation);
        return new GifBitmapWrapperResource(new GifBitmapWrapper(null, new GifDataResource(gifData)));
    }
    return resource;
}
项目:saarang-iosched    文件:GifBitmapWrapperTransformation.java   
@Override
public Resource<GifBitmapWrapper> transform(Resource<GifBitmapWrapper> resource, int outWidth, int outHeight) {
    Resource<Bitmap> bitmapResource = resource.get().getBitmapResource();
    if (bitmapResource != null) {
        Resource<Bitmap> transformed = wrapped.transform(bitmapResource, outWidth, outHeight);
        if (transformed != bitmapResource) {
            GifBitmapWrapper gifBitmap = new GifBitmapWrapper(transformed, null);
            return new GifBitmapWrapperResource(gifBitmap);
        }
    } else {
        //TODO: this should be pushed down into a GifData transformation?
        Resource<GifData> gifResource = resource.get().getGifResource();
        GifData gifData = gifResource.get();
        Transformation<Bitmap> newTransformation =
                new MultiTransformation<Bitmap>(gifData.getFrameTransformation(), wrapped);
        gifData.setFrameTransformation(newTransformation);
        return new GifBitmapWrapperResource(new GifBitmapWrapper(null, new GifDataResource(gifData)));
    }
    return resource;
}
项目:saarang-iosched    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:AppDevFestSudeste2015    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:devfestnorte-app    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:saarang-iosched    文件:ImageVideoGifDataLoadProvider.java   
public ImageVideoGifDataLoadProvider(DataLoadProvider<ImageVideoWrapper, Bitmap> bitmapProvider,
        DataLoadProvider<InputStream, GifData> gifProvider) {
    cacheDecoder = new GifBitmapWrapperStreamResourceDecoder(new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getCacheDecoder()));
    sourceDecoder = new GifBitmapWrapperResourceDecoder(
            bitmapProvider.getSourceDecoder(),
            gifProvider.getSourceDecoder());
    encoder = new GifBitmapWrapperResourceEncoder(bitmapProvider.getEncoder(), gifProvider.getEncoder());
}
项目:saarang-iosched    文件:GifDataDrawableTranscoder.java   
@Override
public Resource<GifDrawable> transcode(Resource<GifData> toTranscode) {
    return new GifDrawableResource(toTranscode);
}
项目:saarang-iosched    文件:GifBitmapWrapperResourceDecoder.java   
public GifBitmapWrapperResourceDecoder(ResourceDecoder<ImageVideoWrapper, Bitmap> bitmapDecoder,
        ResourceDecoder<InputStream, GifData> gifDecoder) {
    this.bitmapDecoder = bitmapDecoder;
    this.gifDecoder = gifDecoder;
}
项目:saarang-iosched    文件:GifBitmapWrapper.java   
public GifBitmapWrapper(Resource<Bitmap> bitmapResource, Resource<GifData> gifResource) {
    this.bitmapResource = bitmapResource;
    this.gifResource = gifResource;
}
项目:saarang-iosched    文件:GifBitmapWrapper.java   
public Resource<GifData> getGifResource() {
    return gifResource;
}
项目:saarang-iosched    文件:GifBitmapWrapperResourceEncoder.java   
public GifBitmapWrapperResourceEncoder(ResourceEncoder<Bitmap> bitmapEncoder, ResourceEncoder<GifData> gifEncoder) {
    this.bitmapEncoder = bitmapEncoder;
    this.gifEncoder = gifEncoder;
}
项目:AppDevFestSudeste2015    文件:GifDataDrawableTranscoder.java   
@Override
public Resource<GifDrawable> transcode(Resource<GifData> toTranscode) {
    return new GifDrawableResource(toTranscode);
}
项目:AppDevFestSudeste2015    文件:GifBitmapWrapperResourceDecoder.java   
public GifBitmapWrapperResourceDecoder(ResourceDecoder<ImageVideoWrapper, Bitmap> bitmapDecoder,
        ResourceDecoder<InputStream, GifData> gifDecoder) {
    this.bitmapDecoder = bitmapDecoder;
    this.gifDecoder = gifDecoder;
}
项目:AppDevFestSudeste2015    文件:GifBitmapWrapper.java   
public GifBitmapWrapper(Resource<Bitmap> bitmapResource, Resource<GifData> gifResource) {
    this.bitmapResource = bitmapResource;
    this.gifResource = gifResource;
}
项目:AppDevFestSudeste2015    文件:GifBitmapWrapper.java   
public Resource<GifData> getGifResource() {
    return gifResource;
}
项目:AppDevFestSudeste2015    文件:GifBitmapWrapperResourceEncoder.java   
public GifBitmapWrapperResourceEncoder(ResourceEncoder<Bitmap> bitmapEncoder, ResourceEncoder<GifData> gifEncoder) {
    this.bitmapEncoder = bitmapEncoder;
    this.gifEncoder = gifEncoder;
}
项目:devfestnorte-app    文件:GifDataDrawableTranscoder.java   
@Override
public Resource<GifDrawable> transcode(Resource<GifData> toTranscode) {
    return new GifDrawableResource(toTranscode);
}
项目:devfestnorte-app    文件:GifBitmapWrapperResourceDecoder.java   
public GifBitmapWrapperResourceDecoder(ResourceDecoder<ImageVideoWrapper, Bitmap> bitmapDecoder,
        ResourceDecoder<InputStream, GifData> gifDecoder) {
    this.bitmapDecoder = bitmapDecoder;
    this.gifDecoder = gifDecoder;
}
项目:devfestnorte-app    文件:GifBitmapWrapper.java   
public GifBitmapWrapper(Resource<Bitmap> bitmapResource, Resource<GifData> gifResource) {
    this.bitmapResource = bitmapResource;
    this.gifResource = gifResource;
}
项目:devfestnorte-app    文件:GifBitmapWrapper.java   
public Resource<GifData> getGifResource() {
    return gifResource;
}
项目:devfestnorte-app    文件:GifBitmapWrapperResourceEncoder.java   
public GifBitmapWrapperResourceEncoder(ResourceEncoder<Bitmap> bitmapEncoder, ResourceEncoder<GifData> gifEncoder) {
    this.bitmapEncoder = bitmapEncoder;
    this.gifEncoder = gifEncoder;
}
项目:saarang-iosched    文件:GifDataDrawableTranscoder.java   
@Override
public Resource<GifDrawable> transcode(Resource<GifData> toTranscode) {
    return new GifDrawableResource(toTranscode);
}
项目:saarang-iosched    文件:GifBitmapWrapperResourceDecoder.java   
public GifBitmapWrapperResourceDecoder(ResourceDecoder<ImageVideoWrapper, Bitmap> bitmapDecoder,
        ResourceDecoder<InputStream, GifData> gifDecoder) {
    this.bitmapDecoder = bitmapDecoder;
    this.gifDecoder = gifDecoder;
}
项目:saarang-iosched    文件:GifBitmapWrapper.java   
public GifBitmapWrapper(Resource<Bitmap> bitmapResource, Resource<GifData> gifResource) {
    this.bitmapResource = bitmapResource;
    this.gifResource = gifResource;
}
项目:saarang-iosched    文件:GifBitmapWrapper.java   
public Resource<GifData> getGifResource() {
    return gifResource;
}
项目:saarang-iosched    文件:GifBitmapWrapperResourceEncoder.java   
public GifBitmapWrapperResourceEncoder(ResourceEncoder<Bitmap> bitmapEncoder, ResourceEncoder<GifData> gifEncoder) {
    this.bitmapEncoder = bitmapEncoder;
    this.gifEncoder = gifEncoder;
}