Traneptora / jxlatte

Java JPEG XL decoder
MIT License
44 stars 5 forks source link

Kotlin Multiplatform? #29

Closed StefanOltmann closed 10 months ago

StefanOltmann commented 10 months ago

What do you think about making this a Kotlin Multiplatform lib?

Quickly going over the code there seems to be nothing that requires this to be in Java. BufferedImage can be replaced with Skiko, Charsets are supported by Ktor.

Kotlin and Java are very close and your lib would have a way broader reach while still having a JAR usable by plain Java projects. You can even target Windows and have an EXE.

Traneptora commented 10 months ago

Nothing requires it to be in java except the fact that the entire project is written in java and switching to another language would require a full rewrite. I don't understand what you are asking.

Any application that targets the jvm can use jxlatte as a library.

StefanOltmann commented 10 months ago

No, it doesn’t require a full rewrite. It’s merely a matter of converting it with tooling provided in IntelliJ IDEA, which does a great deal of the job.

For Multiplatform Java libs need to be replaced, but I don’t see that much here. I think it’s only skiko for PNG image saving.

Come to the Kotlin side, we have cookies! 😉

Traneptora commented 10 months ago

Automatically converting the code to another language I don't know makes it entirely unmaintaintainable.

Traneptora commented 10 months ago

Also, this code doesn't use ImageIO to write PNGs. I rolled my own.

StefanOltmann commented 10 months ago

I meant converting it to Kotlin and keeping it that way. So moving on from Java. This was just an idea.

By the time you have implemented the full feature set I may create a Kotlin fork to make it usable on all platforms like I did with Adobe XMP & Apache Commons Imaging before.