summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-06-27 08:04:28 +0000
committerGo MAEDA <maeda@farend.jp>2018-06-27 08:04:28 +0000
commitf7bb9f93a44643b42f32f1a555d20aa656ca98be (patch)
tree4e6de22a687d5a181dbe8144ebefed4885ca97a7
parent884ac6bf1d833ebcfb594f29d45e81e7c961fada (diff)
downloadredmine-f7bb9f93a44643b42f32f1a555d20aa656ca98be.tar.gz
redmine-f7bb9f93a44643b42f32f1a555d20aa656ca98be.zip
Show images and thumbnails in their natural orientation (#28616).
Patch by Gregor Schmidt. git-svn-id: http://svn.redmine.org/redmine/trunk@17420 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/thumbnail.rb2
-rw-r--r--public/stylesheets/application.css4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/redmine/thumbnail.rb b/lib/redmine/thumbnail.rb
index 5779551da..ab3c4f1bf 100644
--- a/lib/redmine/thumbnail.rb
+++ b/lib/redmine/thumbnail.rb
@@ -38,7 +38,7 @@ module Redmine
FileUtils.mkdir_p directory
end
size_option = "#{size}x#{size}>"
- cmd = "#{shell_quote CONVERT_BIN} #{shell_quote source} -thumbnail #{shell_quote size_option} #{shell_quote target}"
+ cmd = "#{shell_quote CONVERT_BIN} #{shell_quote source} -auto-orient -thumbnail #{shell_quote size_option} #{shell_quote target}"
unless system(cmd)
logger.error("Creating thumbnail failed (#{$?}):\nCommand: #{cmd}")
return nil
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 6b04d9b7c..1a46ac16d 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1512,3 +1512,7 @@ color: #555; text-shadow: 1px 1px 0 #fff;
height:1px;
overflow:hidden;
}
+
+img {
+ image-orientation: from-image;
+}