White bg
This commit is contained in:
@@ -121,10 +121,10 @@ fun FileListerScreen(modifier: Modifier = Modifier) {
|
||||
picture = renderSvgAndroid(context, svg)
|
||||
|
||||
// Save picture to file
|
||||
val file = File(latestImage.parent, "${latestImage.nameWithoutExtension}.framed.png")
|
||||
val file = File(latestImage.parent, "${latestImage.nameWithoutExtension}.framed.${System.currentTimeMillis()}.jpg")
|
||||
file.createNewFile()
|
||||
file.outputStream().use { outputStream ->
|
||||
Bitmap.createBitmap(picture!!).compress(Bitmap.CompressFormat.PNG, 90, outputStream)
|
||||
Bitmap.createBitmap(picture!!).compress(Bitmap.CompressFormat.JPEG, 90, outputStream)
|
||||
}
|
||||
|
||||
feedbackText = "Rendered ${latestImage.name}"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package aza.instant
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.Picture
|
||||
import android.graphics.Typeface
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
@@ -9,6 +12,7 @@ import com.caverock.androidsvg.SVGExternalFileResolver
|
||||
import qrcode.QRCode
|
||||
import qrcode.raw.ErrorCorrectionLevel
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.util.Base64
|
||||
import kotlin.io.path.Path
|
||||
import kotlin.io.path.readBytes
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<g transform="matrix(1.15883,0,0,1.0046,-19.4886,11.4199)">
|
||||
<rect x="129" y="126" width="5931" height="4622.72" style="fill:white;"/>
|
||||
</g>
|
||||
<rect x="0" y="0" width="7133" height="4904" style="fill:white;"/>
|
||||
<g transform="matrix(1,0,0,1,470.5,396)">
|
||||
<use xlink:href="#_Image1" x="0" y="0" width="6192px" height="4128px"/>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
Reference in New Issue
Block a user