Help converting project from scala 2.11.8 to 2.13

I think I almost have it. But I can’t figure out how to write the image file.


  def output(fileName: String) = {

    import javafx.embed.swing.SwingFXUtils._
    import java.awt.image.BufferedImage._

    val bimg = new java.awt.image.BufferedImage(width,height,TYPE_INT_ARGB)
    toFXImage(bimg,wimg)
    bimg.???
  }