I need to take a photo someone has uploaded through a form, resize, merge with a high-res frame @ 300dpi and keep it all @ 300dpi for the best quality for print.
is it possible to handle high-res images through GD and if so, could you provide some information on how? I have code that already does the resizing and merging, but i’m not sure if its going to work at the correct dpi.
Thanks
It’s basically possible: Just use the proper amount of pixels. (The
dpiunit has no meaning in digital imaging, it serves only to convert a digital [pixel] image into a physical format).Example:
However, you’ll need plenty of memory to deal with images this large. The rule of thumb is
this requirement increases if you do copying or resizing, because the script needs to keep multiple copies in memory.
You will need a very generous
memory_limitsetting for this to work.Also note that GD can only deal with RGB images.
For large images and CMYK data, ImageMagick may be a better option if you can use it on your server.