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