Back to Subsampling Scale Image View

ImageDecoder (library 3.10.0 API)

docs/javadoc/com/davemorrissey/labs/subscaleview/decoder/ImageDecoder.html

3.10.03.9 KB
Original Source

Skip navigation links

com.davemorrissey.labs.subscaleview.decoder

Interface ImageDecoder


public interfaceImageDecoder

Interface for image decoding classes, allowing the default BitmapFactory based on the Skia library to be replaced with a custom class.

Method Summary

All Methods Instance Methods Abstract Methods | Modifier and Type | Method and Description | | --- | --- | | Bitmap | decode(Context context, Uri uri) Decode an image. |

Method Detail

- 

decode

[@NonNull](https://developer.android.com/reference/android/support.annotation.NonNull.html?is-external=true "class or interface in android")[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")

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 Parameters:context - Application contexturi - URI of the imageReturns:the decoded bitmapThrows:Exception - if decoding fails.

Skip navigation links