Releases: minimagick/minimagick
v4.9.1
v4.9.0
New features
-
Support ImageMagick 7
MiniMagick::Tool::Convert
will now generatemagick convert
commands (and the same for others)MiniMagick::Tool::Magick
was added for generatingmagick
commands
-
MiniMagick.cli_prefix
was added to configure a prefix for commandsMiniMagick.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 optionsMiniMagick::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 operatorMiniMagick::Tool::Magick.new do |magick| magick.pango("...") # pango:... # ... end
-
Handle GraphicsMagick returning
unknown
in EXIF data
v4.8.0
- Add options to
MiniMagick::Image.open
which are forwarded toopen-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
- 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
- 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
- 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 whenTimeout::Error
is raised, we also kill the subprocess running the command withSIGTERM
. - 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 asOpen3.popen3
with a block.
v4.6.1
v4.6.0
- 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 toImage#details
, which uses ImageMagick's ability to retrieveidentify -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 theconvert
command before original path is added - Support Pathname in
Image.new
, as we already supported Pathname inImage.open
- Added
Tool#stdout
which adds-
to the command (the same asTool#stdin
does)
v4.5.1
v4.5.0
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
toRails.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 deletingMiniMagick::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 toMiniMagick::Tool.new