Image Utils
class ImageUtils
Content copied to clipboard
author: Blankj
blog : http://blankj.com
time : 2016/08/12
desc : utils about image
Functions
addCircleBorder
Link copied to clipboard
addCornerBorder
Link copied to clipboard
open fun addCornerBorder(src: Bitmap, @IntRange(from = 1 ) borderSize: Int, @ColorInt() color: Int, @FloatRange(from = 0 ) cornerRadius: Float): Bitmap
Content copied to clipboard
open fun addCornerBorder(src: Bitmap, @IntRange(from = 1 ) borderSize: Int, @ColorInt() color: Int, @FloatRange(from = 0 ) cornerRadius: Float, recycle: Boolean): Bitmap
Content copied to clipboard
addImageWatermark
Link copied to clipboard
addReflection
Link copied to clipboard
open fun addReflection(src: Bitmap, reflectionHeight: Int, recycle: Boolean): Bitmap
Content copied to clipboard
addTextWatermark
Link copied to clipboard
bitmap2Bytes
Link copied to clipboard
open fun bitmap2Bytes(bitmap: Bitmap, format: Bitmap.CompressFormat): Array<Byte>
Content copied to clipboard
bitmap2Drawable
Link copied to clipboard
bytes2Bitmap
Link copied to clipboard
bytes2Drawable
Link copied to clipboard
clip
Link copied to clipboard
compressByQuality
Link copied to clipboard
open fun compressByQuality(src: Bitmap, @IntRange(from = 0, to = 100 ) quality: Int): Bitmap
Content copied to clipboard
open fun compressByQuality(src: Bitmap, maxByteSize: Long, recycle: Boolean): Bitmap
Content copied to clipboard
compressBySampleSize
Link copied to clipboard
open fun compressBySampleSize(src: Bitmap, sampleSize: Int, recycle: Boolean): Bitmap
Content copied to clipboard
open fun compressBySampleSize(src: Bitmap, maxWidth: Int, maxHeight: Int): Bitmap
Content copied to clipboard
compressByScale
Link copied to clipboard
open fun compressByScale(src: Bitmap, scaleWidth: Float, scaleHeight: Float): Bitmap
Content copied to clipboard
open fun compressByScale(src: Bitmap, newWidth: Int, newHeight: Int): Bitmap
Content copied to clipboard
drawable2Bitmap
Link copied to clipboard
drawable2Bytes
Link copied to clipboard
open fun drawable2Bytes(drawable: Drawable, format: Bitmap.CompressFormat): Array<Byte>
Content copied to clipboard
drawColor
Link copied to clipboard
fastBlur
Link copied to clipboard
open fun fastBlur(src: Bitmap, @FloatRange(from = 0, to = 1, fromInclusive = false ) scale: Float, @FloatRange(from = 0, to = 25, fromInclusive = false ) radius: Float): Bitmap
Content copied to clipboard
open fun fastBlur(src: Bitmap, @FloatRange(from = 0, to = 1, fromInclusive = false ) scale: Float, @FloatRange(from = 0, to = 25, fromInclusive = false ) radius: Float, recycle: Boolean): Bitmap
Content copied to clipboard
getImageType
Link copied to clipboard
getRotateDegree
Link copied to clipboard
renderScriptBlur
Link copied to clipboard
open fun renderScriptBlur(src: Bitmap, @FloatRange(from = 0, to = 25, fromInclusive = false ) radius: Float): Bitmap
Content copied to clipboard
open fun renderScriptBlur(src: Bitmap, @FloatRange(from = 0, to = 25, fromInclusive = false ) radius: Float, recycle: Boolean): Bitmap
Content copied to clipboard
rotate
Link copied to clipboard
scale
Link copied to clipboard
skew
Link copied to clipboard
toRound
Link copied to clipboard
toRoundCorner
Link copied to clipboard
open fun toRoundCorner(src: Bitmap, radius: Float, recycle: Boolean): Bitmap
Content copied to clipboard
view2Bitmap
Link copied to clipboard