trim By Border Color
fun Bitmap.trimByBorderColor(@ColorInt color: Int = Color.TRANSPARENT, trimMargin: Margin? = null): Bitmap
Content copied to clipboard
Trims the borders of a bitmap of a specific color.
Return
A new bitmap with the borders trimmed.
Parameters
color
Color of the borders to be trimmed.
trim Margin
Optional margin in pixels to keep between the edges of the content and the bitmap borders.