Image - an image processing library based upon Vix

Ah, indeed - Image.resize/2 takes an argument that is a factor. So you were resizing the image to be 1_280 times larger than the original. Which would be extremely large - but I still don’t think it should fail. I’ll reproduce using Vix functions only and open an issue there so we can get @akash-akya’s opinion.

Image.thumbnail/2 is definitely the correct function for resizing images. I know the naming can cause some confusion. I am reflecting the underlying libvips function names. Perhaps thats not the right strategy in this case?

The other thing to note is that AWS (native AWS) requires a minimum chunk size for a stream which is 5MB. Therefore I would recommend adding the :buffer_size option to Image.stream/2. For example:

@s3_buffer_size 5 * 1024 * 1024
...
|> Image.stream!(suffix: ".jpg", buffer_size: @s3_buffer_size)
...
1 Like