- Version 1.0 Release: Version 1.0 of a new Java / JVM image-manipulation library vips-ffm has been released. It was developed for Photo Fox, a self-hosted photo management tool, as Java's built-in image manipulation tools have limitations and don't support newer formats like HEIC and JXL.
- Library Choices and Benchmarks: Initial investigations led to considering ImageMagick and then libvips. Mastodon switched to libvips, and benchmarks showed it as a good choice. JVM bindings exist using JNI, but the "Foreign Function & Memory API" (JEP 454) and "Class-File API" (JEP 457) were preferred.
- Automatic JVM Bindings Generation: After weeks of work, something was built to automatically generate JVM bindings from libvips headers. This ensures easy updates with new upstream versions, reduces errors, and corrects mistakes across the API. A "helper API" is also generated for safer usage.
- Code Example (Kotlin): An example of basic usage in Kotlin shows how to use the library. It includes loading an image, getting image dimensions, creating a thumbnail, and writing images to files. The code also serves as a correctness and memory leak test during development.
- Next Steps: The author is being conservative with version numbers and will promote the library to
1.0.0
after other users test it. Feedback is welcome, and users can star the repo on GitHub at github.com/lopcode/vips-ffm. - References: ImageMagick - https://imagemagick.org/, libvips - https://www.libvips.org/, JEP 454 - Foreign Function & Memory API - https://openjdk.org/jeps/454, JEP 457 - Class-File API - https://openjdk.org/jeps/457, jextract - https://github.com/openjdk/jextract
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。