fix image scale result generation

This commit is contained in:
Pete Matsyburka
2023-12-06 19:01:30 +02:00
parent 16a2fde4b7
commit a32dcc0dc5
@@ -69,7 +69,7 @@ module Submissions
scale = [(area['w'] * width) / image.width,
(area['h'] * height) / image.height].min
io = StringIO.new(image.resize([scale * 4, 1].min).write_to_buffer('.png'))
io = StringIO.new(image.resize([scale * 4, 1].select(&:positive?).min).write_to_buffer('.png'))
canvas.image(
io,