提交 f4f9fb5d 编写于 作者: G George Claghorn

Correct orientation detection

上级 813e19de
......@@ -39,7 +39,7 @@ def read_image
end
def rotated_image?(image)
%w[ RightTop LeftBottom ].include?(image["orientation"])
%w[ RightTop LeftBottom ].include?(image["%[orientation]"])
end
end
end
......@@ -18,8 +18,8 @@ class ActiveStorage::Analyzer::ImageAnalyzerTest < ActiveSupport::TestCase
blob = create_file_blob(filename: "racecar_rotated.jpg", content_type: "image/jpeg")
metadata = extract_metadata_from(blob)
assert_equal 4104, metadata[:width]
assert_equal 2736, metadata[:height]
assert_equal 2736, metadata[:width]
assert_equal 4104, metadata[:height]
end
test "analyzing an SVG image without an XML declaration" do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册