Project

General

Profile

Patch #41312 » 0001-Update-MiniMagick-to-v5.0.1.patch

Katsuya HIDAKA, 2024-09-24 18:15

View differences:

Gemfile
41 41

  
42 42
# Optional gem for exporting the gantt to a PNG file
43 43
group :minimagick do
44
  gem 'mini_magick', '~> 4.13.0'
44
  gem 'mini_magick', '~> 5.0.1'
45 45
end
46 46

  
47 47
# Optional Markdown support
lib/redmine/helpers/gantt.rb
394 394
        font_path =
395 395
          Redmine::Configuration['minimagick_font_path'].presence ||
396 396
            Redmine::Configuration['rmagick_font_path'].presence
397
        img = MiniMagick::Image.create(".#{format}", false)
397
        img = MiniMagick::Image.create(".#{format}")
398 398
        if Redmine::Configuration['imagemagick_convert_command'].present?
399 399
          MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command'])
400 400
        end
401
        MiniMagick::Tool::Convert.new do |gc|
401
        MiniMagick.convert do |gc|
402 402
          gc.size('%dx%d' % [subject_width + g_width + 1, height])
403 403
          gc.xc('white')
404 404
          gc.font(font_path) if font_path.present?
(5-5/5)