I have some image bigger than A4 (ISO format 8.27 × 11.7 inches) in 300 DPI. I want to reisze it to A4 format and set it to their original resolution (300 DPI).
Scale, resize, resizeWidthRatio always change the horizontal (and/or) vertical resolution, but no "real" image width or height
Is there a way to do it with Gd ?
For instance an A4 format image is 8.27 × 11.7 inches so at 300 DPI the image will have a size of 2481 × 3510 pixels, it always follow this equation:
Code: Select all
pixels = inches × resolution
That being said, there is nothing that prevents you from manually setting the resolution to 300 DPI after the resize operation by calling SetHorizontalResolution and SetVerticalResolution methods.
Who is online
Users browsing this forum: No registered users and 1 guest