From 8cc79f502e4b5e3f4fcdcf9af2a5caf047312fb9 Mon Sep 17 00:00:00 2001 From: lucfranken Date: Thu, 17 May 2018 12:49:11 +0200 Subject: Active storage: Image variant options not correct ### Steps to reproduce Using Rails 5.2.0 When following this example: http://api.rubyonrails.org/classes/ActiveStorage/Variant.html `avatar.variant(resize: "100x100", monochrome: true, flip: "-90")` ### Expected behavior Image should be rendered as flipped. ### Actual behavior I get an error: > failed with error: gm mogrify: Unrecognized option (-90). ### Fix: According to: https://github.com/minimagick/minimagick the option should be called rotate: `avatar.variant(resize: "100x100", monochrome: true, rotate: "-90")` So **flip** changed to **rotate**. ### System configuration **Rails version**: 5.2.0 **Ruby version**: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17] --- activestorage/app/models/active_storage/variant.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage/app/models/active_storage/variant.rb') diff --git a/activestorage/app/models/active_storage/variant.rb b/activestorage/app/models/active_storage/variant.rb index 2a7006553c..1df36e37d9 100644 --- a/activestorage/app/models/active_storage/variant.rb +++ b/activestorage/app/models/active_storage/variant.rb @@ -42,7 +42,7 @@ # You can combine any number of ImageMagick/libvips operations into a variant, as well as any macros provided by the # ImageProcessing gem (such as +resize_to_fit+): # -# avatar.variant(resize_to_fit: [800, 800], monochrome: true, flip: "-90") +# avatar.variant(resize_to_fit: [800, 800], monochrome: true, rotate: "-90") # # Visit the following links for a list of available ImageProcessing commands and ImageMagick/libvips operations: # -- cgit v1.2.3