]> source.dussan.org Git - redmine.git/commitdiff
Fix gantt PNG export ignores imagemagick_convert_command (#35027).
authorMarius Balteanu <marius.balteanu@zitec.com>
Sun, 20 Feb 2022 19:05:49 +0000 (19:05 +0000)
committerMarius Balteanu <marius.balteanu@zitec.com>
Sun, 20 Feb 2022 19:05:49 +0000 (19:05 +0000)
Patch by Yuichi HARADA.

git-svn-id: http://svn.redmine.org/redmine/trunk@21427 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/helpers/gantt.rb

index 992e287805da423cd75d36ccd030e53db4c4a093..c0ff7a2500fd40302dba9dc50b1b241d23107a45 100644 (file)
@@ -395,6 +395,9 @@ module Redmine
           Redmine::Configuration['minimagick_font_path'].presence ||
             Redmine::Configuration['rmagick_font_path'].presence
         img = MiniMagick::Image.create(".#{format}", false)
+        if Redmine::Configuration['imagemagick_convert_command'].present?
+          MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command'])
+        end
         MiniMagick::Tool::Convert.new do |gc|
           gc.size('%dx%d' % [subject_width + g_width + 1, height])
           gc.xc('white')