Trying to set the DPI via PHP not working right
Posted: 2008-12-04T10:33:07-07:00
I am trying to set the DPI of my image to 600dpi , it starts off as a full page image with 72dpi but with the pixels set to a number so that when I convert it to 600dpi it will print to a regular 8.5"x11" page. I cannot figure out how to set the DPI, the closest I have come is with -density 600, and when I do that it makes the DPI extremely high. I couldn't figure out why it would pick the number it did for DPI, then I resized the image in photoshop to 1" and it showed the resolution as 600dpi then. So it is basically condensing the image into 600dpi, but also making it only 1" wide. Anyone know how can I set the image to be 600dpi without making the size 1"?
The code I am using is below:
Thank you,
SK
The code I am using is below:
Code: Select all
<?php
exec("convert -density 600 -units pixelsperinch test.png test.pdf");
?>
SK