Class SkiaImageDecoder
-
- All Implemented Interfaces:
-
ai.nexconn.chatui.picture.widget.longimage.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.
-
-
Constructor Summary
Constructors Constructor Description SkiaImageDecoder()
-
Method Summary
Modifier and Type Method Description Bitmapdecode(Context context, Uri uri)Decode an image. -
-
Method Detail
-
decode
Bitmap decode(Context context, Uri uri)
Decode an image. When possible, initial setup work once in this method. This method must return the dimensions of the 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 context.uri- URI of the image.- Returns:
Dimensions of the image.
-
-
-
-