package com.isidroid.utils

import android.content.Context
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Matrix
import android.net.Uri
import java.io.IOException

val Bitmap.sizeString: String
    get() = "${width}x${height}"

fun Bitmap.rotateFullImage(degrees: Float): Bitmap {
    val matrix = Matrix()
    matrix.postRotate(degrees);
    val scaledBitmap = Bitmap.createScaledBitmap(this, width, height, true);
    return Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.width, scaledBitmap.height, matrix, true)
}