Skip to content

Commit

Permalink
Merge pull request #3946 from benwbrum/3945-rmagic-api-chanage
Browse files Browse the repository at this point in the history
Resolves #3945 by passing parameter to block
  • Loading branch information
benwbrum authored Feb 2, 2024
2 parents 71ac3f0 + 72db9c8 commit deca126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/image_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def self.compress_image(filename)
GC.start
percent = decile * 10
compressed = Magick::ImageList.new(filename)
compressed.write(working_file) { self.quality = percent}
compressed.write(working_file) { |options| options.quality = percent}
p "Compressed file is now #{File.size(working_file)} at quality #{percent}"

unless needs_compression? working_file
Expand Down

0 comments on commit deca126

Please sign in to comment.