결과 : http://i.stack.imgur.com/p1kVz.png추가 PNG 워터 마크
, 내가 다른 PNG로 PNG를 복사하기 위해 노력하고있어하지만 당신은 그것을 볼 수있는이
<?php // File and new size
$filename = 'watermark.png';
// Get new sizes
list($width, $height) = getimagesize($filename);
// Load
$resim = 'http://www.petrominpng.com.pg/images/logo_big.png';
$ext = end(explode('.', $resim));
if($ext == "jpeg" || $ext == "jpg")
{
$thumb = imagecreatefromjpeg($resim);
}
else if($ext == "png")
{
$thumb = imagecreatefrompng($resim);
}
$sx = imagesx($thumb);
$sy = imagesy($thumb);
if($sx >= $sy)
{
$sxd = $sx/2;
$degisim = $sxd/$width;
/*
echo $sxd." ".$width." ";
echo $sxd-$width." |";
*/
$sxy = $height * $degisim;
/*
echo " $sxy $height | $degisim";
exit();
*/
}
else
{
$sxy = $sy/2;
$degisim = $sxy/$height;
/*
echo $sxd." ".$width." ";
echo $sxd-$width." |";
*/
$sxd = $width * $degisim;
/*
echo " $sxy $height | $degisim";
exit();
*/
}
$source = imagecreatefrompng($filename);
// Resize
imagecopyresized($thumb, $source, $sx/5, $sy/4, 0, 0, $sxd, $sxy, $width, $height);
// Output
header('Content-type: image/png');
imagepng($thumb);
imagedestroy($thumb);
?>
처럼 돌아 왜 아무 생각이 난 이미지에 문제가 있습니까? 어떻게해야 제대로 할 수 있습니까?
내 워터 마크
http://i.stack.imgur.com/TZFCa.png
어떻게 PNG32 –
FYI로 변환 할 수 있습니까?포토샵에서 32 비트 PNG를 만들라고하더라도 8 비트 PNG를 생성합니다. – Homer6
imagick으로 가능합니다 $ im = new Imagick ($ image); $ im-> setImageDepth (32); $ im-> setImageFormat ('PNG32'); $ im-> writeImage ($ filename); –