imagecli icon indicating copy to clipboard operation
imagecli copied to clipboard

Compare to ImageMagick

Open theotherphil opened this issue 5 years ago • 6 comments

  1. How usable is this library's function composition compared to ImageMagick? Theirs looks to be more flexible.
  2. What functions are we missing? (See https://imagemagick.org/script/command-line-processing.php#option)
  3. How does performance compare for single operations and long pipelines between this library and ImageMagick?

theotherphil avatar Sep 02 '19 01:09 theotherphil

https://www.reddit.com/r/rust/comments/d4inkc/imagecli_a_pure_rust_image_processing_command/f0d07h0?utm_source=share&utm_medium=web2x

https://imagemagick.org/script/identify.php

Edit: created https://github.com/theotherphil/imagecli/issues/17

theotherphil avatar Sep 15 '19 11:09 theotherphil

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:

https://docs.microsoft.com/en-us/previous-versions/windows/desktop/bb153349(v=vs.85)?redirectedfrom=MSDN

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.

omac777 avatar Sep 15 '19 12:09 omac777

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!

theotherphil avatar Sep 15 '19 12:09 theotherphil

Possibly relevant: https://github.com/influenza/wand-of-rust

davidssmith avatar Sep 15 '19 15:09 davidssmith

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.

davidssmith avatar Sep 15 '19 15:09 davidssmith

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.

YodaEmbedding avatar Sep 15 '19 22:09 YodaEmbedding