Open theotherphil opened 5 years ago
You are certainly on the right path when looking to imagemagick as the main inspiration for your tool. It's certainly hard to beat for all its capabilties and supported image formats.
I also see your motivation for rewriting such capability in rust for potential performance improvements when accomplishing similar tasks.
You also highlighted the imagemagick scripting IMHO the most useful and powerful capability. You can create an image from scratch just using the scripting capability by drawing different elements within it i.e. circles, bezier curves, etc...
Of the most useful image formats I believe DDS and OpenEXR:
OpenEXR https://en.m.wikipedia.org/wiki/OpenEXR
That is because they have the highest bits per component i.e. 64-bit per pixel, 16 bits for Red, 16 for Blue, 16 for Green, 16 for Alpha. ALSO because they provide lossless representation of the image within DDS and OpenExr.
Thanks for the comment. This library currently only supports 8 bits per pixel: https://github.com/theotherphil/imagecli/blob/master/src/image_ops.rs#L195. This should definitely be fixed, but it won't be particularly easy.
I intend to add support for more drawing operations (including bezier curves). This should be pretty straightforward. I'm not sure how elaborate I want to get with the scripting. I'd like to have something pretty flexible, but at some point it probably becomes easier to just spin up a python interpreter and use that!
Possibly relevant: https://github.com/influenza/wand-of-rust
Also it would be useful to have a fast Fourier transform operation, but to do that you'd probably need to depend on a linear algebra library, and Rust doesn't really have a great one yet.
Not to derail the discussion, but to speed up development, you can probably add features without worrying too much about performance. RustFFT claims to be reasonably fast (non-GPU). Mark anywhere you use it as FutureOptimizable
or something.