On Friday, 25 December 2020 at 20:59:03 UTC, vnr wrote:
Hello 😺

For a small "script" that generates printable files, I would need to change the size of an image (which is loaded into memory as an array of bytes) to shrink it to scale if it exceeds the A4 page size.

To load the images into memory and generate a PDF, I use the "printed" package. It is not very provided but is sufficient for my use, I just need the resize option... Is there a relatively simple way to do this?

Thank you.

printed use the DPI information in your image to set the target size. You do not necessarily need to change the pixels. Save your PNG / JPEG with proper DPI information.

Reply via email to