php - how to change the DPI of an image from 72DPI to 300DPI with Imagick -


i have image of 72dpi , want change 300dpi printing purposes, want stuff need done imagick, tried code following no positive results.

<? $im = new imagick(); $im->setresolution(72,72); $im->setoption('density','300x300'); $im->readimage("test.png"); header("content-type: image/png"); echo $im; ?> 

can help/clarify me usage of setoption or can 1 explain hot change dpi in either imagick or gd

i think want:

i have setted resolution pixel/inch 300 dpi:

<?php $im = new imagick(); $im->setimageunits(imagick::resolution_pixelsperinch); $im->setimageresolution(300,300); $im->readimage("test.png"); $im->setimageformat("png"); header("content-type: image/png"); echo $im; ?> 

hope you!


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -