Radoslaw Juszczyk
09/01/2022, 11:17 AMinterface AssetsFactory {
fun createTextImage(text:String, padding: Int, backgroundColor: Color): File
}
With JavaFX I would simply create a layout and use SwingFXUtils.fromFXImage
I want something like:
fun createImageFile(size: IntSize, content: @Composable ()-> Unit): BufferedImage
Any ideas/suggestions?Kirill Grouchnikov
09/01/2022, 3:14 PMImageComposeScene
that has a render
method. From there you can call Image.encodeToData().bytes
that will give you the PNG content to save.Kirill Grouchnikov
09/01/2022, 8:05 PM