Package 

Class SkiaImageDecoder

  • All Implemented Interfaces:
    com.pdfview.subsamplincscaleimageview.decoder.ImageDecoder

    
    public class SkiaImageDecoder
     implements ImageDecoder
                        

    Default implementation of ImageDecoder using Android's BitmapFactory, based on the Skia library. This works well in most circumstances and has reasonable performance, however it has some problems with grayscale, indexed and CMYK images.

    • Method Summary

      Modifier and Type Method Description
      Bitmap decode(Context context, @NonNull() Uri uri) Decode an image.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SkiaImageDecoder

        SkiaImageDecoder()
    • Method Detail

      • decode

        @NonNull() Bitmap decode(Context context, @NonNull() Uri uri)

        Decode an image. The URI can be in one of the following formats:File: file:///scard/picture.jpgAsset: file:///android_asset/picture.pngResource: android.resource://com.example.app/drawable/picture

        Parameters:
        context - Application context
        uri - URI of the image