【发布时间】:2018-04-19 14:15:02
【问题描述】:
我正在通过在一定宽度和高度上平铺小图像来创建 php 图像。在此输出图像中,dpi 默认为 72。但是我需要将其更改为300。更改exif数据就足够了。但我不能为此使用 Imagick。有人可以帮忙吗?
$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);
【问题讨论】:
标签: php