29
loading...
This website collects cookies to deliver better user experience
`convert -density 300 -units 'PixelsPerInch' image.jpg -extent 2479x3508 -format pdf result.pdf`
<%= image_tag user.avatar.variant(resize_to_limit: [100, 100]) %>
[...] because we use the pre-packaged Ubuntu ImageMagic which is built with the 'installed' option you cannot override the policy from the system path [...] You can disable/reduce options that are enabled by the system policy but once something is disabled you can't re-enable it.
Instead of having ImageMagick request the file itself and do a transform on the result of that request, download the image to /tmp and work off that, using local transforms.
/tmp
before converting it to a PDF document.-alpha remove
to the convert
command.ConvertApi.config.api_secret = 'SECRET'
ConvertApi.convert('jpg', {
File: ConvertApi::UploadIO.new(File.open(file.path)),
}, from_format: 'heic'
).save_files(file.path)