fix pdf generation images

This commit is contained in:
Alex Turchyn
2023-07-07 00:54:32 +03:00
parent ead316df00
commit 5352a25ede
2 changed files with 7 additions and 13 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ module Templates
ActiveStorage::Attachment.where(name: ATTACHMENT_NAME, record: attachment).destroy_all
image = Vips::Image.new_from_buffer(binary, '')
image = image.resize(MAX_WIDTH / image.width.to_f)
image = image.autorot.resize(MAX_WIDTH / image.width.to_f)
io = StringIO.new(image.write_to_buffer(FORMAT, Q: Q, interlace: true))