이 코드는 이미지의 맨 아래에 1px의 검정색 선을 그리지 만 예상대로 작동하지 않으며 완전히 검정색을 생성합니다. 이미지 :이미지 하단에 검정색 선을 그립니다. PHP
$img = imagecreatefrompng("image.png");
$dest = imagecreatetruecolor(50, 25);
imagecopy($dest, $img, 0, 0, $px + $position[$pos][0], $py + $position[$pos][1] , 50, 25);
$w = imagesx($dest);
$h = imagesy($dest);
$out = ImageCreateTrueColor(imagesx($dest),imagesy($dest)) or die('Problem In Creating image');
for($x=0; $x<$w; $x++) {
imagesetpixel($out, $x, $h, imagecolorallocate($out, 0, 0, 0));
}
어디에 문제가 있습니까?
헤더를 어디에 설정하고 있습니까? – j08691