How to resize an image ? 🤔
JN
666total at wp.pl
Sun Dec 27 19:07:10 UTC 2020
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.
I use the trusty stb_image C libraries (bindings here
https://code.dlang.org/packages/stb ), specifically the
stbir_resize_* functions.
More information about the Digitalmars-d-learn
mailing list