BitmapFactoryUtils

open class BitmapFactoryUtils

Functions

checkIsGifResource
Link copied to clipboard

Check if the resource is a gif file, by looking at the file_extension

open fun checkIsGifResource(resourceID: Int): Boolean
checkIsJpegResource
Link copied to clipboard

Check if the resource is a jpeg file, by looking at the file_extension

open fun checkIsJpegResource(resourceID: Int): Boolean
checkIsPngResource
Link copied to clipboard

Check if the resource is a jpeg file, by looking at the file_extension

open fun checkIsPngResource(resourceID: Int): Boolean
checkIsSvgResource
Link copied to clipboard

Check if the raw resource is a svg file, by looking at the file_extension

open fun checkIsSvgResource(resourceID: Int): Boolean
checkIsXMLResource
Link copied to clipboard

Check if the resource is a xml file, by looking at the file_extension

open fun checkIsXMLResource(resourceID: Int): Boolean
checkResourceType
Link copied to clipboard

Check if the resource has a specific suffix in the file name.

open fun checkResourceType(resourceID: Int, suffixes: Array<String>): Boolean
decodeFile
Link copied to clipboard

Decode a image file into a Bitmap.

open fun decodeFile(filename: String, minSize: Int, square: Boolean): Bitmap
open fun decodeFile(filename: String, minSize: Int, square: Boolean, fixRotation: Boolean): Bitmap
decodeResource
Link copied to clipboard

Decode a drawable or a raw image resource.

open fun decodeResource(res: Resources, resId: Int): Bitmap
open fun decodeResource(res: Resources, resId: Int, minSize: Int): Bitmap
decodeSize
Link copied to clipboard
open fun decodeSize(stream: InputStream): Array<Int>
open fun decodeSize(filename: String): Array<Float>
open fun decodeSize(res: Resources, resId: Int): Array<Int>
decodeStream
Link copied to clipboard

Decode a drawable or a raw image resource.

open fun decodeStream(stream: InputStream, minSize: Int): Bitmap
drawResource
Link copied to clipboard

Draw a XML Drawable resource to a Bitmap because a XML Drawable not can be decoded by #decodeResource

open fun drawResource(res: Resources, resId: Int): Bitmap
open fun drawResource(res: Resources, resId: Int, width: Int, height: Int): Bitmap
getImageRotation
Link copied to clipboard

Get the orientation of the image file base on the exif information.

open fun getImageRotation(fileStream: InputStream): Int
open fun getImageRotation(filename: String): Int
missingOrBrokenIcon
Link copied to clipboard
open fun missingOrBrokenIcon(): Bitmap
preloadResource
Link copied to clipboard
open fun preloadResource(res: Resources, resId: Int)

Properties

memoryFileHashMap
Link copied to clipboard
open val memoryFileHashMap: SparseArray<MemoryFile>
NOTHING_BITMAP
Link copied to clipboard
val NOTHING_BITMAP: Bitmap
NOTING_BITMAP
Link copied to clipboard
val NOTING_BITMAP: Bitmap