adjust autorot

This commit is contained in:
Pete Matsyburka
2026-05-23 09:30:56 +03:00
parent d44b35cf0a
commit 89bf83febb
5 changed files with 16 additions and 12 deletions
+2 -2
View File
@@ -363,7 +363,7 @@ module Submissions
image =
begin
ImageUtils.load_vips(attachment.download, content_type: attachment.content_type).autorot
ImageUtils.load_vips(attachment.download, content_type: attachment.content_type, autorot: true)
rescue Vips::Error
next unless attachment.content_type.starts_with?('image/')
next if attachment.byte_size.zero?
@@ -379,7 +379,7 @@ module Submissions
if field['type'] == 'image' && !resized_image.has_alpha?
StringIO.new(resized_image.colourspace(:srgb).write_to_buffer('.jpg', strip: true))
else
StringIO.new(resized_image.write_to_buffer('.png'))
StringIO.new(resized_image.write_to_buffer('.png', strip: true))
end
width = field['type'] == 'initials' ? 50 : 200