docs/javadoc/com/davemorrissey/labs/subscaleview/decoder/SkiaImageDecoder.html
com.davemorrissey.labs.subscaleview.decoder
All Implemented Interfaces:ImageDecoder
public classSkiaImageDecoderextends[Object](https://developer.android.com/reference/java/lang/Object.html?is-external=true "class or interface in java.lang")implements[ImageDecoder](../../../../../com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html "interface in com.davemorrissey.labs.subscaleview.decoder")
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.
Constructors | Constructor and Description |
| --- |
| SkiaImageDecoder() |
| SkiaImageDecoder(Bitmap.Config bitmapConfig) |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method and Description |
| --- | --- |
| Bitmap | decode(Context context, Uri uri)
Decode an image.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public SkiaImageDecoder()
-
public SkiaImageDecoder([@Nullable](https://developer.android.com/reference/android/support.annotation.Nullable.html?is-external=true "class or interface in android")[Bitmap.Config](https://developer.android.com/reference/android/graphics/Bitmap.Config.html?is-external=true "class or interface in android.graphics")bitmapConfig)
-
[@NonNull](https://developer.android.com/reference/android/support.annotation.NonNull.html?is-external=true "class or interface in android")public[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html?is-external=true "class or interface in android.graphics")decode([Context](https://developer.android.com/reference/android/content/Context.html?is-external=true "class or interface in android.content")context,[@NonNull](https://developer.android.com/reference/android/support.annotation.NonNull.html?is-external=true "class or interface in android")[Uri](https://developer.android.com/reference/android/net/Uri.html?is-external=true "class or interface in android.net")uri)
throws[Exception](https://developer.android.com/reference/java/lang/Exception.html?is-external=true "class or interface in java.lang")
Description copied from interface: ImageDecoder
Decode an image. The URI can be in one of the following formats:
File: file:///scard/picture.jpg
Asset: file:///android_asset/picture.png
Resource: android.resource://com.example.app/drawable/picture
Specified by:decode in interface ImageDecoderParameters:context - Application contexturi - URI of the imageReturns:the decoded bitmapThrows:Exception - if decoding fails.