Back to Subsampling Scale Image View

SkiaImageDecoder (library 3.10.0 API)

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

3.10.05.7 KB
Original Source

Skip navigation links

com.davemorrissey.labs.subscaleview.decoder

Class SkiaImageDecoder


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.

Constructor Summary

Constructors | Constructor and Description | | --- | | SkiaImageDecoder() | | SkiaImageDecoder(Bitmap.Config bitmapConfig) |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method and Description | | --- | --- | | Bitmap | decode(Context context, 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

public SkiaImageDecoder()
- 

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)

Method Detail

- 

decode

[@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.

Skip navigation links