com.bumptech.glide.load.resource.ImageDecoderResourceDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glide Show documentation
Show all versions of glide Show documentation
A fast and efficient image loading library for Android focused on smooth scrolling.
package com.bumptech.glide.load.resource;
import android.annotation.SuppressLint;
import android.graphics.ColorSpace;
import android.graphics.ImageDecoder;
import android.graphics.ImageDecoder.DecodeException;
import android.graphics.ImageDecoder.ImageInfo;
import android.graphics.ImageDecoder.OnHeaderDecodedListener;
import android.graphics.ImageDecoder.OnPartialImageListener;
import android.graphics.ImageDecoder.Source;
import android.os.Build;
import android.util.Log;
import android.util.Size;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.Options;
import com.bumptech.glide.load.PreferredColorSpace;
import com.bumptech.glide.load.ResourceDecoder;
import com.bumptech.glide.load.engine.Resource;
import com.bumptech.glide.load.resource.bitmap.DownsampleStrategy;
import com.bumptech.glide.load.resource.bitmap.Downsampler;
import com.bumptech.glide.load.resource.bitmap.HardwareConfigState;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.util.Synthetic;
import java.io.IOException;
/**
* Downsamples, decodes, and rotates images according to their exif orientation using {@link
* ImageDecoder}.
*
* Obeys all options in {@link Downsampler} except for {@link
* Downsampler#FIX_BITMAP_SIZE_TO_REQUESTED_DIMENSIONS}.
*
* @param The type of resource to be decoded (Bitmap, Drawable etc).
*/
@RequiresApi(api = 28)
public abstract class ImageDecoderResourceDecoder implements ResourceDecoder