gems mini_magick 4.0.0
v4.0.0

latest releases: 5.2.0, 5.1.2, 5.1.1...
10 years ago

Features

  • Improved configuration for MiniMagick, see MiniMagick::Configuration
  • Enabled using ImageMagick's command-line tools directly.
  • Added MiniMagick::Image#validate!, which raises MiniMagick::Invalid when the image is invalid (useful for nicer control flow).
  • Added reader methods for common MiniMagick::Image attributes: #width, #height, #type, #size, #exif etc.
  • Added MiniMagick::Image#resolution
  • MiniMagick::Image.new now accepts an optional block, which does an additional #combine_options (just a handy shortcut).
  • Added MiniMagick::Image#layers (aliased to #frames and #pages) for accessing layers from multilayered images (GIFs, PSDs, PDFs etc).
  • Allowed options to take multiple values (commit)
  • Added MiniMagick::Image#signature, which helps determine if two images are different (pull request)

Backwards incompatible

  • Removed implicit queueing of commands. Previously when you did image.resize("500x500"), the resizing will actually get executed only when we call a terminal method, like #write. Now commandsa are executed immediately, which may be slower depending on how much chained commands you have. To get around this, just use MiniMagick::Image#combine_options.
  • Removed deprectated methods MiniMagick::Image.from_blob and MiniMagick::Image.from_file.
  • Removed MiniMagick::Image#<<
  • Removed dashed versions of processing methods, so the following won't work anymore:
MiniMagick::Image.open(path).combine_options do |c|
  c.send("brightness-contrast", "0x10")
end
# NoMethodError: undefined method `brightness-contrast' for #<MiniMagick::Tool::Mogrify:0x007f548bcf0530>
  • It currently doesn't work on JRuby
    • JRuby has a bug in the "open3" standard library, they added it to their bug list, and hopefully they will fix it soon. Until then you can use the 3.x versions of MiniMagick.

Bug fixes

  • MiniMagick::Image#format now doesn't leave any tempfiles behind.
  • Fixed some issues when files would have spaces in their filenames.
  • Fixed some issues where certain shell errors would raise weird errors.
  • Fixed image["EXIF:*"] returning gibberish.
  • Allowed some EXIF data to have commas in their value (commit)
  • Lowered memory usage.
  • Metods for command-line tools are now defined dynamically based on -help, so now each tool will respond only to options it actually has.
  • All image info is now being cached (commit)
  • Any eventual stderr when command passes is now outputed (commit)
  • #respond_to? now works properly for MiniMagick::Image (commit)

Don't miss a new mini_magick release

NewReleases is sending notifications on new releases.