|
120 | 120 | result = ImageProcessing::MiniMagick.loader(define: { jpeg: { size: "100x100" } }).call(@portrait) |
121 | 121 | assert_dimensions [150, 200], result |
122 | 122 |
|
123 | | - result = ImageProcessing::MiniMagick.loader(strip: true).call(@portrait) |
124 | | - assert_empty MiniMagick::Image.new(result.path).exif |
125 | | - |
126 | | - result = ImageProcessing::MiniMagick.loader(strip: nil).call(@portrait) |
127 | | - assert_empty MiniMagick::Image.new(result.path).exif |
128 | | - |
129 | | - result = ImageProcessing::MiniMagick.loader(strip: false).call(@portrait) |
130 | | - assert_empty MiniMagick::Image.new(result.path).exif |
131 | | - |
132 | | - result = ImageProcessing::MiniMagick.loader(colorspace: "Gray").call(@portrait) |
133 | | - assert_equal "Gray", MiniMagick::Image.new(result.path).data["colorspace"] |
134 | | - |
135 | | - result = ImageProcessing::MiniMagick.loader(set: ["comment", "This is a comment"]).call(@portrait) |
136 | | - assert_equal "This is a comment", MiniMagick::Image.new(result.path).data["properties"]["comment"] |
| 123 | + result = ImageProcessing::MiniMagick.loader(geometry: "100x100").call(@portrait) |
| 124 | + assert_dimensions [75, 100], result |
137 | 125 | end |
138 | 126 |
|
139 | 127 | it "applies saver options" do |
140 | 128 | result = ImageProcessing::MiniMagick.saver(define: { jpeg: { fancy_unsampling: "off", extent: "20KB" } }).call(@portrait) |
141 | 129 | assert_operator result.size, :<, 20*1024 |
142 | 130 |
|
143 | | - result = ImageProcessing::MiniMagick.saver(strip: true).call(@portrait) |
144 | | - assert_empty MiniMagick::Image.new(result.path).exif |
145 | | - |
146 | | - result = ImageProcessing::MiniMagick.saver(strip: nil).call(@portrait) |
147 | | - assert_empty MiniMagick::Image.new(result.path).exif |
148 | | - |
149 | | - result = ImageProcessing::MiniMagick.saver(strip: false).call(@portrait) |
150 | | - assert_empty MiniMagick::Image.new(result.path).exif |
151 | | - |
152 | | - result = ImageProcessing::MiniMagick.saver(colorspace: "Gray").call(@portrait) |
153 | | - assert_equal "Gray", MiniMagick::Image.new(result.path).data["colorspace"] |
154 | | - |
155 | 131 | result = ImageProcessing::MiniMagick.saver(set: ["comment", "This is a comment"]).call(@portrait) |
156 | 132 | assert_equal "This is a comment", MiniMagick::Image.new(result.path).data["properties"]["comment"] |
157 | 133 | end |
|
0 commit comments