On the other hand, I believe my dependence on scrimage is pretty flexible. I could refactor the project to use a different library pretty easily. I basically need some Pixel type which encodes the color of a pixel, and a way to convert an array of Pixel objects into an image file such as PNG. Which library should I use for this?
As for your original question, you can look on a website such as mvnrepository or index.scala-lang.org which versions are available for which Scala version. However, despite 2.13 support having been added in the github repository, it seems like no new version has been released in a long time. It looks like some people have released their own forks though.
the first %% means, append the Scala binary version, so that in your case "scrimage-core" would become "scrimage-core_2.13". The last % specifies the library version. That you’ll have to look up, x.x is just a placeholder by the author, so they don’t need to change the README every time the version changes. For example:
libraryDependencies += "com.sksamuel.scrimage" % s"scrimage-core_${scalaBinaryVersion}" % "2.x.x"
// or eqivalently, e.g. (if the currently selected binary Scala version is 2.12)
libraryDependencies += "com.sksamuel.scrimage" % "scrimage-core_2.12" % "2.x.x"
Note that SBT will show you the URLs it tries when searching for artifacts and you can often open them in browser, cut some suffix and browse available artifacts. Try that on some artifacts and you’ll get the intuition on which URL part corresponds to Scala binary version and which to artifact version.
It also seems that scalafx supports image creation. Since I plan, anyway, on using scalafx in my project. I think I’ll investigate it. There’s a short video by Mark Lewis introducing image creation using scalafx.
It is much harder to write images using JavaFX than Swing. The gain from this was supposed to be speed in rendering by having better support for graphics cards. Unfortunately, in my testing the 2D graphics speed of Swing is much better than JavaFX. I’m sure JavaFX is better for 3D since that wasn’t really an option with Swing.
It is less straightforward. Most of it is just knowing enough about the API in order to make it happen. Even if you know the API there is more code involved in making it happen. I believe that it also forces you to do it in a way that works asynchronously, though I haven’t done it in a while so I can’t be certain of that. Since it is something I want to show novice programmers, the main thing that stood out to me was that I could do it in Swing and it was straightforward for the students. The move the JavaFX/ScalaFX changed that.