summaryrefslogtreecommitdiffstats
path: root/lib/redmine/helpers/gantt.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-02-20 19:05:49 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-02-20 19:05:49 +0000
commit1b09f5e4a3b22eddd42765ea5f275419b9e96a14 (patch)
tree380c378143d8812cf8863c22480327784571518e /lib/redmine/helpers/gantt.rb
parent9a738c2069468282a70932c6db6d5c6b7ba24df4 (diff)
downloadredmine-1b09f5e4a3b22eddd42765ea5f275419b9e96a14.tar.gz
redmine-1b09f5e4a3b22eddd42765ea5f275419b9e96a14.zip
Fix gantt PNG export ignores imagemagick_convert_command (#35027).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@21427 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/helpers/gantt.rb')
-rw-r--r--lib/redmine/helpers/gantt.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 992e28780..c0ff7a250 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -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')