7
투명 색상을 gif 및 png 이미지에서 흰색으로 대체하는 가장 좋은 방법은 무엇입니까?이미지에서 투명 색상을 삭제하는 방법은 무엇입니까?
// get transparent color indexes
$trsp = ImageColorsForIndex($image, ImageColorTransparent($image));
// get transparent color set
$delete = imagecolorallocate($image, $trsp['red'], $trsp['green'], $trsp['blue']);
// replace
imagecolorset($image, $delete, 255, 255, 255);
이 작동하지 않습니다.
좋은, 그리고 그들이 반 투명한 경우 색상을 교체하지 않기 때문에 내가는이 솔루션을 좋아 – Latze