lab 4 start
This commit is contained in:
parent
da5b03bd7c
commit
afe79f3b4b
@ -12,7 +12,7 @@ class ImageConverter {
|
||||
@TypeConverter
|
||||
fun getByteArrayFromBitmap(bitmap: Bitmap): ByteArray {
|
||||
val outputStream = ByteArrayOutputStream()
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, 70, outputStream)
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream)
|
||||
return outputStream.toByteArray()
|
||||
}
|
||||
@TypeConverter
|
||||
|
Loading…
Reference in New Issue
Block a user