com.bumptech.glide.load.ResourceEncoder Java Examples

The following examples show how to use com.bumptech.glide.load.ResourceEncoder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EngineKey.java    From giffun with Apache License 2.0 5 votes vote down vote up
public EngineKey(String id, Key signature, int width, int height, ResourceDecoder cacheDecoder,
        ResourceDecoder decoder, Transformation transformation, ResourceEncoder encoder,
        ResourceTranscoder transcoder, Encoder sourceEncoder) {
    this.id = id;
    this.signature = signature;
    this.width = width;
    this.height = height;
    this.cacheDecoder = cacheDecoder;
    this.decoder = decoder;
    this.transformation = transformation;
    this.encoder = encoder;
    this.transcoder = transcoder;
    this.sourceEncoder = sourceEncoder;
}
 
Example #2
Source File: EngineKeyFactory.java    From giffun with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("rawtypes")
public EngineKey buildKey(String id, Key signature, int width, int height, ResourceDecoder cacheDecoder,
        ResourceDecoder sourceDecoder, Transformation transformation, ResourceEncoder encoder,
        ResourceTranscoder transcoder, Encoder sourceEncoder) {
    return new EngineKey(id, signature, width, height, cacheDecoder, sourceDecoder, transformation, encoder,
            transcoder, sourceEncoder);
}
 
Example #3
Source File: ChildLoadProvider.java    From giffun with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public ResourceEncoder<Z> getEncoder() {
    if (encoder != null) {
        return encoder;
    } else {
        return parent.getEncoder();
    }
}
 
Example #4
Source File: GifDrawableLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
@Override
public ResourceEncoder<GifDrawable> getEncoder() {
    return encoder;
}
 
Example #5
Source File: StreamBitmapDataLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
@Override
public ResourceEncoder<Bitmap> getEncoder() {
    return encoder;
}
 
Example #6
Source File: FileDescriptorBitmapDataLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
@Override
public ResourceEncoder<Bitmap> getEncoder() {
    return encoder;
}
 
Example #7
Source File: ImageVideoDataLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
@Override
public ResourceEncoder<Bitmap> getEncoder() {
    return encoder;
}
 
Example #8
Source File: StreamFileDataLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
@Override
public ResourceEncoder<File> getEncoder() {
    return NullResourceEncoder.get();
}
 
Example #9
Source File: ImageVideoGifDrawableLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
@Override
public ResourceEncoder<GifBitmapWrapper> getEncoder() {
    return encoder;
}
 
Example #10
Source File: GifBitmapWrapperResourceEncoder.java    From giffun with Apache License 2.0 4 votes vote down vote up
public GifBitmapWrapperResourceEncoder(ResourceEncoder<Bitmap> bitmapEncoder,
        ResourceEncoder<GifDrawable> gifEncoder) {
    this.bitmapEncoder = bitmapEncoder;
    this.gifEncoder = gifEncoder;
}
 
Example #11
Source File: EmptyDataLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
@Override
public ResourceEncoder<Z> getEncoder() {
    return null;
}
 
Example #12
Source File: FixedLoadProvider.java    From giffun with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public ResourceEncoder<Z> getEncoder() {
    return dataLoadProvider.getEncoder();
}
 
Example #13
Source File: PaletteBitmapEncoder.java    From glide-support with The Unlicense 4 votes vote down vote up
public PaletteBitmapEncoder(ResourceEncoder<Bitmap> bitmapEncoder, ResourceEncoder<Palette> paletteEncoder) {
	this.paletteEncoder = paletteEncoder;
	this.bitmapEncoder = bitmapEncoder;
}
 
Example #14
Source File: PaletteCacheEncoder.java    From glide-support with The Unlicense 4 votes vote down vote up
public PaletteCacheEncoder(ResourceEncoder<Palette> paletteEncoder) {
	this.paletteEncoder = paletteEncoder;
}
 
Example #15
Source File: ChildLoadProvider.java    From giffun with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the {@link ResourceEncoder} to use to write the decoded and transformed resource to
 * the disk cache.
 *
 * @param encoder The encoder to use.
 */
public void setEncoder(ResourceEncoder<Z> encoder) {
    this.encoder = encoder;
}
 
Example #16
Source File: DataLoadProvider.java    From giffun with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the {@link ResourceEncoder} to use to write the decoded and transformed resource
 * to the disk cache.
 */
ResourceEncoder<Z> getEncoder();