Skip to content

Releases: minimagick/minimagick

v5.3.1

19 Aug 19:52

Choose a tag to compare

  • Fixed MiniMagick.cli_prefix being mutated when set to an array.

v5.3.0

11 Jul 07:34
c53b8bb

Choose a tag to compare

  • Actually require Ruby 2.5+ in the gemspec.
  • Fix Ruby 2.5 compatibility when using MiniMagick.restricted_env configuration.
  • Drop benchmark dependency.
  • Fix keyword argument forwarding when trying to call MiniMagick.compare(errors: false)

v5.2.0

22 Feb 13:37
34433dc

Choose a tag to compare

  • Added MiniMagick.restricted_env configuration for stopping IM command from inheriting environment variables from the parent process.
  • Fixed "ambiguous * has been interpreted as an argument prefix" warning

v5.1.2

13 Mar 07:38
21b48d9

Choose a tag to compare

  • Add benchmark gem to runtime dependencies

v5.1.1

01 Feb 22:32
7c17853

Choose a tag to compare

  • Add logger gem to dependencies for Ruby 3.4+.

v5.1.0

12 Jan 21:15
6737877

Choose a tag to compare

  • New cli_env configuration was added for setting extra environment variables for every CLI command:

    MiniMagick.configure do |config|
      config.cli_env = { "MAGICK_MEMORY_LIMIT" => "128MiB" }
    end
  • New graphicsmagick configuration was added for telling MiniMagick to use GraphicsMagick instead of MiniMagick:

    MiniMagick.configure do |config|
      config.graphicsmagick = true # prepend all commands with "gm"
    end

    Previously, the recommended approach was setting MiniMagick.cli_prefix = "gm", but that doesn't work when ImageMagick 7 is installed, as in that case MiniMagick will try to prepend magick on top of gm.

v5.0.1

24 Jul 08:32
4dfe121

Choose a tag to compare

  • MiniMagick::Image#write doesn't delete the internal tempfile anymore, which restores use cases like:

    image = MiniMagick::Image.open("...")
    image.resize("500x500")
    image.write("foo.jpg")
    image.blur
    image.write("bar.png")
  • Prevented MiniMagick::Image#to_ary being called by ruby in certain cases, such as [image].flatten(1).

v5.0.0

08 Jul 18:23
bbb9619

Choose a tag to compare

Improvements

  • New class method shorthands were added for the tool API:

    # BEFORE
    MiniMagick::Tool::Convert.new { |convert| ... }
    MiniMagick::Tool::Identify.new { |convert| ... }
    # ...
    
    # AFTER
    MiniMagick.convert { |convert| ... }
    MiniMagick.identify { |identify| ... }
    # ...
  • Image#write now deletes the underlying tempfile if Image.open was used, instead of relying on the tempfile to eventually be garbage collected.

Backwards compatibility

  • Removed official GraphicsMagick support. GraphicsMagick can be used by setting cli_prefix:

    MiniMagick.configure do |config|
      config.cli_prefix = "gm"
    end

    Some features won't be supported, such as MiniMagick.timeout (GraphicsMagick doesn't support time limits), Image#data (GraphicsMagick doesn't support JSON image details) and Image#exif (returns different format).

    As a result, MiniMagick.cli and MiniMagick.processor configuration has been removed as well.

  • MiniMagick::Image and MiniMagick.convert now use magick instead of the deprecated magick convert on ImageMagick 7. This should be backwards compatible, but there might be small differences in options and behavior.

  • Removed deprecated posix-spawn shell backend, along with MiniMagick.shell_api configuration.

    Ruby 2.x has long used vfork, so there is no performance advantage of using posix-spawn. Additionally, Ruby 3.x has switched to non-blocking pipes, which should resolve deadlocks people experienced with Open3. See #558 for more details.

  • Removed obsolete Image#run_command.

  • Removed deprecated Image#mime_type, as it wasn't accurate.

    MIME type from file content should be determined either using Marcel or MimeMagic, or mime-types or MiniMime using Image#type.

  • The MiniMagick::Tool::* classes have been deprecated in favor of the class-level interface.

  • The MiniMagick.timeout configuration now uses the native ImageMagick timeout environment variable $MAGICK_TIME_LIMIT. This variable doesn't support timeouts lower than 1 second.

  • The MiniMagick.whiny configuration has been renamed to MiniMagick.errors.

  • Images are no longer automatically validated on Image.open, Image.read or Image.create.

  • The deprecated Image#details method has been removed in favor of the more reliable Image#data.

  • The Image#respond_to_missing? method has been removed, meaning that Image#respond_to? will return false for ImageMagick option methods.

    As a result, the undocumented MiniMagick::Tool.option_methods method has been removed as well, along with the no-op MiniMagick.reload_tools.

  • Removed the obsolete MiniMagick.processor_path configuration, which as mostly an alias for MiniMagick.cli_path.

  • Removed the deprecated MiniMagick.debug configuration in favor of MiniMagick.logger.level = Logger::DEBUG.

  • Removed the unused MiniMagick.validate_on_write configuration.

  • Additional Pathname#open or URI#open options for Image.open need to be passed in as keyword arguments instead of a hash.

v4.13.2

08 Jul 09:13
eed76bf

Choose a tag to compare

  • Silence convert deprecation warning in latest version of ImageMagick 7.

v4.13.1

15 Jun 10:18
58a6a5e

Choose a tag to compare

  • Revert an optimization to save an identify call when retrieving image information by doing this work while validating on create, as this caused validation to hang for some SVG files.