Skip to content

Releases: minimagick/minimagick

v4.9.1

21 Sep 09:39
Compare
Choose a tag to compare
  • Properly handle EXIF parsing with ImageMagick 7
  • Show an informative exception message on Timeout::Error
  • Wait for the MiniMagick command to terminate after sending SIGTERM with open3

v4.9.0

21 Sep 00:42
Compare
Choose a tag to compare

New features

  • Support ImageMagick 7

    • MiniMagick::Tool::Convert will now generate magick convert commands (and the same for others)
    • MiniMagick::Tool::Magick was added for generating magick commands
  • MiniMagick.cli_prefix was added to configure a prefix for commands

    MiniMagick.cli_prefix = "firejail"
    
    MiniMagick::Tool::Magick.new { |magick| ... } # executes `firejail magick ...`

Other Improvements

  • Fix deadlocks when using posix-spawn as a shell backend

  • Fix Errno::ESRCH sometimes being raised when the ImageMagick command would time out

  • #label and #caption will now generate regular options

    MiniMagick::Tool::Convert.new do |convert|
                             # BEFORE:       NOW:
      convert.label("foo")   # label:foo    -label foo
      convert.caption("bar") # caption:bar  -caption bar
    end
  • Add pango creation operator

    MiniMagick::Tool::Magick.new do |magick|
      magick.pango("...") # pango:...
      # ...
    end
  • Handle GraphicsMagick returning unknown in EXIF data

v4.8.0

06 Jul 09:54
Compare
Choose a tag to compare
  • Add options to MiniMagick::Image.open which are forwarded to open-uri when URL is used (@acrogenesis)
  • Fixed MiniMagick::Image#get_pixels not returning all pixels for images that have first or last bytes that could be interpreted as control characters in their RGB output (@Landreas)

v4.7.2

20 Jun 07:43
Compare
Choose a tag to compare
  • Avoid defining methods at runtime whenever a processing method is invoked, which means that Ruby can keep its method cache, instead of having to clear it on each processing invocation (thanks to @printercu).

v4.7.1

15 Jun 11:25
Compare
Choose a tag to compare
  • Fix errors when calling MiniMagick::Image.open with URLs like https://pbs.twimg.com/media/DCOD2DXVwAI4xsL.jpg:large, where the : would get included in the file extension and cause errors with some ImageMagick commands due to : being a special character to ImageMagick.

v4.7.0

28 Mar 04:12
Compare
Choose a tag to compare
  • Added MiniMagick::Image#get_pixels, which returns a matrix where each member is a 3-element array of numbers between 0 and 255, one for each of the RGB channels.
  • When MiniMagick.timeout is set and the command times out, previously the command would still continue running in the background. Now when Timeout::Error is raised, we also kill the subprocess running the command with SIGTERM.
  • Implementation of posix-spawn has been improved, where now both stdout and stderr are read from at the same time, stdin pipe is closed immediately after writing the input, and stdout and stderr pipes are closed once the command finishes. This now has essentially the same behaivour as Open3.popen3 with a block.

v4.6.1

12 Feb 09:25
Compare
Choose a tag to compare
  • Fixed MiniMagick::Image#data to be work for multilayer images where array is returned as the JSON representation (@bytheway875)
  • Fixed stdout and stderr buffer overload that can happen when processing many images using posix-spawn (@lest)

v4.6.0

03 Dec 14:46
Compare
Choose a tag to compare
  • Fix Image#exif raising an error when an exif value contains a "=" chracter
  • Fix Image#exif raising an error when an exif value spans on multiple lines
  • Introduced Image#data as an alternative to Image#details, which uses ImageMagick's ability to retrieve identify -verbose output in JSON format. This eliminates possibility of any parsing errors. It is available on ImageMagick 6.8.8-3 or above.
  • Allow Image#format to accept a hash of options as a third argument, which will be added to the convert command before original path is added
  • Support Pathname in Image.new, as we already supported Pathname in Image.open
  • Added Tool#stdout which adds - to the command (the same as Tool#stdin does)

v4.5.1

25 Mar 09:21
Compare
Choose a tag to compare
  • Fixed MiniMagick logging commands by default

v4.5.0

20 Mar 14:48
Compare
Choose a tag to compare

New features

  • Added the ability for ImageMagick commands to accept standard input:

    identify = MiniMagick::Tool::Identify.new
    identify.stdin # adds "-"
    identify.call(stdin: image_content)
  • Added ability to capture stdout, stderr and exist status by passing a block to MiniMagick::Tool#call:

    compare = MiniMagick::Tool::Compare.new
    # build the command
    compare.call do |stdout, stderr, status|
      # ...
    end
  • Added ability to assign MiniMagick.logger to Rails.logger

Bug fixes

  • The value of MiniMagick.whiny configuration option is now respected
  • The new filename when calling #format is now generated better when calling on a layer
  • Delete *.cache files generated by .mpc files when deleting MiniMagick::Image

Deprecations

  • Whiny option should now be passed as a keyword argument:

    MiniMagick::Tool::Identify.new(false) # deprecated
    MiniMagick::Tool::Identify.new(whiny: false) # good
  • Passing the whiny argument to MiniMagick::Tool#call is deprecated, it should now always be passed to MiniMagick::Tool.new