瀏覽代碼

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
tags/4.0.0
Go MAEDA 6 年之前
父節點
當前提交
f7bb9f93a4
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1
    1
      lib/redmine/thumbnail.rb
  2. 4
    0
      public/stylesheets/application.css

+ 1
- 1
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

+ 4
- 0
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;
}

Loading…
取消
儲存