Up to [cvs.NetBSD.org] / pkgsrc / graphics / ruby-mini-magick
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
graphics/ruby-mini-magick: update to 5.4.0
5.4.0 (2026-08-31)
* Added :inherit_fds option for handing open file descriptors to the IM
command, so an input that's already an open IO can be passed as /dev/fd/N
instead of being written out to a file first:
File.open("input.jpg", "rb") do |file|
MiniMagick.identify(inherit_fds: [file]) do |identify|
identify << "/dev/fd/#{file.fileno}"
end
end
Thanks to @flavorjones for the contribution!
graphics/ruby-mini-magick: update to 5.3.3 5.3.3 (2026-08-06) * Restored support for passing an IO object such as StringIO as :stdin to MiniMagick::Tool#call, which got broken in 5.3.2 when Open3.capture3 was replaced with Open3.popen3 for manual timeouts.
graphics/ruby-mini-magick: update to 5.3.2 5.3.2 (2026-07-14) * Restored instantiating legacy MiniMagick::Tool::* classes for backwards compatibility, which got broken in 5.0. * Reintroduced manual timeouts instead of relying on $MAGICK_TIME_LIMIT, which wasn't reliably enforcing the timeout (and isn't compatible with GraphicsMagick).
graphics/ruby-mini-magick: update to 5.3.1 5.3.1 (2025-08-19) * Fixed MiniMagick.cli_prefix being mutated when set to an array.
graphics/ruby-mini-magick: update to 5.3.0 5.3.0 (2025-07-11) * 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)
graphics/ruby-mini-magick: update to 5.2.0 5.2.0 (2025-02-22) * 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
graphics/ruby-mini-magick: update to 5.1.2 5.1.1 (2025-02-01) * Add logger gem to dependencies for Ruby 3.4+. 5.1.2 (2025-02-02) * Add benchmark gem to dependencies
graphics/ruby-mini-magick: update to 5.1.0
5.1.0 (2025-01-12)
* 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.
graphics/ruby-mini-magick: update to 5.0.1
5.0.1 (2024-07-24)
* 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).
graphics/ruby-mini-magick: update to 5.0.0
5.0.0 (2024-07-08)
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.
graphics/ruby-mini-magick: update to 4.13.1 4.13.0 (2024-06-13) * Warnings about convert command being deprecated on ImageMagick 7 are now ignored. * The next major version of MiniMagick will switch to using magick on IM7, as it might not be fully compatible with magick convert. * If processing images is returning warnings (e.g. TIFF images tend to do that), but they're otherwise fine, you can prevent MiniMagick from forwarding warnings to standard error: MiniMagick.configure do |config| config.warnings = false end * When the ImageMagick subprocess has been abruptly killed by the operating system (e.g. OOM kill), in which case the exit status will be unknown, MiniMagick will now handle this gracefully. * When validating the image, the cheap info will now be automatically stored on the MiniMagick::Image object, so a subsequent call to #type, #width, #height, #dimensions, #size or #human_size will not call identify again. * The posix-spawn shell backend has been deprecated (see #558). * Ruby uses vfork since Ruby 2.2, so posix-spawn doesn't provide performance benefits on relevant Ruby versions anymore. Additionally, Ruby 3 switched to non-blocking pipes by default, which should hopefully resolve deadlocks with open3 (see #347 and #437). Due to this change, posix-spawn is currently incompatible with Ruby 3. * MiniMagick::Image#mime_type has been deprecated, due to returning incorrect MIME type for formats not starting with image/*. * ImageMagick does have a way to return the MIME type, but it requires reading the whole image, which is significantly slower. It's recommended to use Marcel or MimeMagic for determining MIME type from magic header. Alternatively, you can use mime-types or MiniMime for obtaining MIME type from file extension or from MiniMagick::Image#type. * Ruby 2.3+ is now required. 4.13.1 (2024-06-15) * 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.
graphics/ruby-mini-magick: update to 4.12.0 4.12.0 (2022-12-06) * Added new tmpdir configuration, which defaults to Dir.tmpdir (#541) MiniMagick.configure do |config| config.tmpdir = File.join(Dir.tmpdir, "/my/new/tmp_dir") end * Don't leave temporary files lying around when MiniMagick::Image#format failed (#547) * Replace File.exists? with File.exist?, which should fix Ruby 3.2 compatibility (#550) * Fixed a case where the log could not be parsed correctly when there were multiple lines (#540) * Added status to the exception message when the ImageMagick command fails (#542) * Allow passing format to Image#get_pixels so we can request "RGBA" pixels (#537) * Suppress warning to ambiguous argument (#529) * Use Thread#join with a timeout argument instead of the Timeout standard library (#525)
graphics/ruby-mini-magick: update to 4.11.0 4.11.0 (2020-11-06) * Fix fetching metadata when there are GhostScript warnings (#522) * Fixed some method redefined warnings (#505) * Added MiniMagick::Image.get_image_from_pixels (#516) * extend MiniMagick::Tool#stack to support arguments so that it can be used with Active Storage
graphics/ruby-mini-magick: update to 4.10.1 Update ruby-mini-magick to 4.10.1. 4.10.1 (2020-01-06) * Still pick up ImageMagick over GraphicsMagick if both are installed 4.10.0 (2020-01-06) * Prioritize discovery of ImageMagick 7 over 6 if both are installed (@drnic) * Add MiniMagick::Image#landscape? and #portrait? methods for checking orientiation (@theomarkkuspaul) * Fix Ruby 2.7 warnings (@kamipo) 4.9.5 (2019-07-18) * Fixed MiniMagick::Image.open not working with non-ASCII filenames anymore after previous version (thanks to @meganemura) 4.9.4 (2019-07-11) * Fixed a remote shell execution vulnerability when using MiniMagick::Image.open with URL coming from unsanitized user input (thanks to @rootxharsh) * Fixed some Ruby warnings (thanks to @koic) 4.9.3 (2019-04-08) * make MiniMagick::Tool not respond to everything
graphics/ruby-mini-magick: update to 4.9.2
4.9.2 (2018-09-21)
* Fix breakage for MRI 2.3 and below
4.9.1 (2018-09-21)
* 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
4.9.0 (2018-09-210
New features
* Support ImageMagick 7
o MiniMagick::Tool::Convert will now generate magick convert commands (and
the same for others)
o 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
Update ruby-mini-magick to 4.8.0. v4.8.0 2017/07/06 * 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)
Update ruby-mini-magick to 4.7.2. v4.7.2 2017/06/20 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 2017/06/15 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.
Update ruby-mini-magick to 4.7.0. 4.7.0 2017/03/28 * 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.
Update ruby-mini-magick to 4.6.1. v4.6.1 12 Feb 2017 * 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 3 Dec 2016 * 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)
Update ruby-mini-magick to 4.5.1. v4.5.1 * Fixed MiniMagick logging commands by default 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 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
Update ruby-mini-magick to 4.4.0. 4.4.0 * Using MiniMagick::Image#format now works when the image instance is a layer/frame/page. * Calling MiniMagick::Tool#clone as a way of adding the -clone CLI option now works properly (before it would call Object#clone). * Badly encoded lines in identify -verbose don't cause an error anymore in MiniMagick::Image#details. * MiniMagick::Image#details doesn't hang anymore when clipping paths are present * Added MiniMagick::Image#tempfile for accessing the underlying temporary file.
Update ruby-mini-magick to 4.3.6. * Restore the old behaviour of MiniMagick::Image#respond_to? by looking at mogrify -help and finding the method. This restores compatibilty with CarrierWave.
Update ruby-mini-magick to 4.3.5. v4.3.5 * mini_magick/version.rb is now properly required in the main file (previously MiniMagick.version was throwing a NoMethodError unless you explicitly required mini_magick/version.rb) v4.3.4 * Fix MiniMagick::Tool#tile method being applied as a creation operator (tile:) instead of an option (-tile)
Update ruby-mini-magick to 4.3.3.
v4.3.3
* Fixed a bug where, if you would reference any image info inside Image#format
{} or Image#combine_options {}, this info would be cached even after these
methods were executed, leaving the MiniMagick::Image instance with stale
data.
v4.3.2
* Fixed MiniMagick::Image.new("...").format("<ext>") not working if the image
didn't have an extension.
v4.3.1
* Reverted making MiniMagick configuration thread safe, until we figure out
what caused #328.
v4.3.0
* Fixed early reportings of ImageMagick/GraphicsMagick not being installed by
removing the automagically generated methods (commit)
* MiniMagick.with_cli is now thread-safe, as well as other configuration
options
v4.2.10
* Make GraphicsMagick's mogrify support the "-gravity" option.
v4.2.9
* Fixes MiniMagick::Image#size to properly return filesize in bytes
* Added MiniMagick::Image#human_size which holds ImageMagick's human-readable
size string.
v4.2.8
This version has been yanked as it holds a backwards incompatibility which
breaks CarrierWave.
* MiniMagick.with_cli will now restore the old CLI even when errors occur.
* Fixed race condition which caused the MiniMagick::Tool methods not to be
defined yet (can happen in multithreaded environments)
Backwards compatibility
* MiniMagick::Image#size now returns a string with the filesize unit included
Update ruby-mini-magick to 4.2.7. 4.2.7 * Fix Ruby 1.9.3 4.2.5 * Fixed MiniMagick::Image#details parsing 4.2.4 * Fixed detecting MiniMagick version * Fix the private method 'format' called on mogrify for real 4.2.3 * Fixed a rush mistake 4.2.2 * Raise proper error in #cheap_info on invalid image * Improved MiniMagick::Image#details parsing * Attempt to solve private method 'format' called on mogrify 4.2.1 * Attempt to fix #279 4.1.1 * Fix MiniMagick::Image#composite defaulting to JPG extension. The default is now the extension of the base image, the one on which composite is called.
Update ruby-mini-magick to 4.1.0. 4.1.0 * Added MiniMagick::Tool#stack for building ImageMagick stacks: MiniMagick::Tool::Convert.new do |convert| convert << "wand.gif" convert.stack do |stack| stack << "wand.gif" stack.rotate(30) end convert << "images.gif" end convert wand.gif \( wand.gif -rotate 90 \) images.gif 4.0.4 * Allow filenames with colon in their names (thanks to @agorf)
Update ruby-mini_magick to 4.0.3. Changes are not available, please refer release page on GitHub: https://github.com/minimagick/minimagick/releases
Update ruby-mini-magick to 3.7.0. Changes are not available, but handle filename with special character.
Update ruby-mini-magick to 3.6.0. Exact changes aren't available, but fixed handling of filename with special characters.
Update ruby-mini-magick to 3.5.0. No official changes are available, but various bugfixes and document updates.
Update ruby-mini-magick to 3.4. * Dec 28, 2011 - Releasing v3.4 - Better windows support. Fixed problem with combine_options. Fixed up readme. [hcatlin] * Dec 21, 2011 - Refactored gem structure a little and added a few bug fixes to better support Windows users - No changes to API though [2potatocakes]
Relax dependency to ruby-subexec. Bump PKGREVISION.
Restrict dependency pattern due to gemspec. Bump PKGREVISION.
Update ruby-mini-magick pacakge to 3.3. Changes are unknown.
Update ruby-mini-magick package to 3.2. Changes are unavailable.
Updaet graphics/ruby-mini-magick to 2.1. * Use lang/ruby/gem.mk instead of misc/rubygems/rubygem.mk. * Add LICENSE. * Remove default value of GEM_BUILD. * Ajust new ruby package's framework. Changes are unknown.
Updated ruby-mini-magick to 1.2.5
* Fix build problem of ruby-mini-magick package correcting URL parameter to rakefile to fix build problem with newer rake's strict checking. * Add LICENSE. No PKGREVISION bump since there is no change with built package.
Initial import of ruby18-mini-magick-1.2.3 as graphics/ruby-mini-magick. MiniMagick gives you access to all the command-line options ImageMagick has (found at http://www.imagemagick.org/script/mogrify.php). Using MiniMagick as an alternative to RMagick allows the Ruby processes memory to remain small because it spawns ImageMagick's mogrify program, which has much lower memory usage than RMagick.
Initial revision