crystal-libraries-needed icon indicating copy to clipboard operation
crystal-libraries-needed copied to clipboard

Image manipulation library like MiniMagick

Open Sija opened this issue 8 years ago • 12 comments
trafficstars

https://github.com/minimagick/minimagick

Sija avatar May 22 '17 00:05 Sija

Though they are the de-facto standard for image manipulation, ImageMagick is a huge security risk. GraphicsMagick is way better, but still has lots of issues. I'd rather try to find a secure and stable image manipulation library to use in Crystal. I'm not sure about reasonable alternatives but we might as well look for it... There is a proposal for VIPS #27 which is way faster but still relies on libmagick for less common image types. This was incorrect: libvips can use libmagick as a fallback but will use other libs if available

straight-shoota avatar May 22 '17 09:05 straight-shoota

magickwand-crystal may be as some alternative for now.

veelenga avatar May 22 '17 11:05 veelenga

@veelenga yep, I'm aware of it, yet for my taste it's rather unusable alternative, thus this issue.

Sija avatar May 22 '17 14:05 Sija

Why is ImageMagic a huge security risk?

mjago avatar May 22 '17 21:05 mjago

Because it is very poorly-written code, written back when the world wasn't full of actively-hostile attackers. Consider this recent news story:

yahoo_retires_imagemagick_library

And by recent, I mean: 21 May 2017

drosehn avatar May 22 '17 21:05 drosehn

I concur that yahoo has been a security risk over the last five years (I had an insignificant email account with them that was compromised twice).

mjago avatar May 22 '17 21:05 mjago

A list of ImageMagick CVEs: https://www.cvedetails.com/vulnerability-list/vendor_id-1749/Imagemagick.html

Though I wouldn't read too much into it. Implementing it ourselves isn't a magic bullet to make it bug free. It may have less whacky memory accesses, but OTOH, ImageMagick is pretty battle tested and will be for some time.

Papierkorb avatar May 22 '17 21:05 Papierkorb

Libvips is a far superior to Image magick https://github.com/jcupitt/libvips

activestylus avatar Dec 01 '17 00:12 activestylus

libvips has to have glib2.0-dev. Other dependencies are optional, see below.

Not a fan of adding random dependencies, that alone makes it inferior.

Papierkorb avatar Dec 01 '17 12:12 Papierkorb

@Papierkorb me neither, yet libvips is IMO worth goin' the extra mile...

Sija avatar Dec 01 '17 13:12 Sija

Imagemagick also has dependencies, it's just a lot easier to use apt-get/yum/etc to install them as a total package. Libvips not only processes images faster, it has a smaller memory footprint than both ImageMagick and GraphicsMagick. Maybe its just my imagination too, but the resized images look crispier shrug

activestylus avatar Dec 04 '17 08:12 activestylus

Any progress on this?

meykbelieve avatar Aug 27 '22 03:08 meykbelieve

Some weeks ago a saw [this one] (https://github.com/naqvis/crystal-vips)

megatux avatar Oct 21 '22 18:10 megatux