Skip to content

Commit

Permalink
fix: heavy sketch file 🍒 (#2993)
Browse files Browse the repository at this point in the history
Co-authored-by: Michał Saleniuk <[email protected]>
Co-authored-by: Michał Saleniuk <[email protected]>
  • Loading branch information
3 people authored May 10, 2024
1 parent 1a4a439 commit bcee848
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class DrawingCanvasViewModel : ViewModel() {
Bitmap.Config.ARGB_8888
)
val canvas = Canvas(bitmap).apply { drawPaint(Paint().apply { color = Color.White.toArgb() }) }
context.contentResolver.openFileDescriptor(tempSketchFile, "rw")?.use { fileDescriptor ->
context.contentResolver.openFileDescriptor(tempSketchFile, "rwt")?.use { fileDescriptor ->
FileOutputStream(fileDescriptor.fileDescriptor).use { fileOutputStream ->
paths.forEach { path -> path.drawNative(canvas) }
bitmap.compress(Bitmap.CompressFormat.JPEG, QUALITY, fileOutputStream)
Expand Down

0 comments on commit bcee848

Please sign in to comment.