Bot releases are hidden (Show)
tmpdir
configuration, which defaults to Dir.tmpdir
(#541)
MiniMagick.configure do |config|
config.tmpdir = File.join(Dir.tmpdir, "/my/new/tmp_dir")
end
MiniMagick::Image#format
failed (#547)File.exists?
with File.exist?
, which should fix Ruby 3.2 compatibility (#550)Thread#join
with a timeout
argument instead of the Timeout standard library (#525)method redefined
warnings (#505)MiniMagick::Image.get_image_from_pixels
(#516)MiniMagick::Tool#stack
to support arguments so that it can be used with Active StorageSupport ImageMagick 7
MiniMagick::Tool::Convert
will now generate magick convert
commands (and the same for others)MiniMagick::Tool::Magick
was added for generating magick
commandsMiniMagick.cli_prefix
was added to configure a prefix for commands
MiniMagick.cli_prefix = "firejail"
MiniMagick::Tool::Magick.new { |magick| ... } # executes `firejail magick ...`
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
MiniMagick::Image.open
which are forwarded to open-uri
when URL is used (@acrogenesis)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)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.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.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
.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.Image#exif
raising an error when an exif value contains a "=" chracterImage#exif
raising an error when an exif value spans on multiple linesImage#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.Image#format
to accept a hash of options as a third argument, which will be added to the convert
command before original path is addedImage.new
, as we already supported Pathname in Image.open
Tool#stdout
which adds -
to the command (the same as Tool#stdin
does)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
MiniMagick.whiny
configuration option is now respected#format
is now generated better when calling on a layer*.cache
files generated by .mpc files when deleting MiniMagick::Image
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
MiniMagick::Image#format
now works when the image instance is a layer/frame/page.MiniMagick::Tool#clone
as a way of adding the -clone
CLI option now works properly (before it would call Object#clone
).identify -verbose
don't cause an error anymore in MiniMagick::Image#details
.MiniMagick::Image#details
doesn't hang anymore when clipping paths are presentMiniMagick::Image#tempfile
for accessing the underlying temporary file.