I'm creating php image by tile small image over certain width and height. In this output image dpi is 72 by default. But I need to change it to 300. Changing exif data is enough. But I cannot use Imagick for this. Anyone can help?
$size = getimagesize($mask);
//Resize to this size
$width = $size[0];
$height = $size[1];
$im = imagecreatetruecolor($width, $height);
// Set the tile
imagesettile($im, $pattern_sys);
// Make the image repeat
imagefilledrectangle($im, 0, 0, $width, $height, IMG_COLOR_TILED);
// Output image with resized
$mask_sys = imagecreatefrompng($mask);
//$mask_new = imagecreate($width ,$height);
imagepng($im, $print_path);
imagecopy( $im , $mask_sys , 0 , 0 , 0 , 0 , $width , $height);
imagepng($im,$design_path);