I would like to ask if is correct way of using it when I want to save file in memory from writer and convert it to BufferedImage or should i write it to outputstream and convert it to BufferedImage?
Link to documentation https://sksamuel.github.io/scrimage/io/
My code looks like this:
def getImage(url: URL, width: Int, height: Int): BufferedImage = {
val writer = new PngWriter()
val image = ImmutableImage.loader().fromStream(url.openStream()).fit(width, height)
image.replaceTransparencyInPlace(Color.white)
ImageIO.read(image.forWriter(writer).stream())
}