http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=105474
배경을 투명처리 하고 싶습니다.
imagefilledrectangle($im, 0, 0, $_GET['width'], $_GET['height'], $white);
$white 이것 때문인것같은데, 이부분을 삭제하니 이미지가 나타나지 않습니다.
배경을 투명하게 하려면 어떻게 해야 할까요?
배경을 투명처리 하고 싶습니다.
imagefilledrectangle($im, 0, 0, $_GET['width'], $_GET['height'], $white);
$white 이것 때문인것같은데, 이부분을 삭제하니 이미지가 나타나지 않습니다.
배경을 투명하게 하려면 어떻게 해야 할까요?
댓글 5개
http://stackoverflow.com/questions/313070/png-transparency-with-php
에 찾아보니 아래와 같이 알파 레이어를 만들어서 마스크 처리하라고 하네요.
원 소스와 아래 소스를 적절히 섞어서 쓰시면 될것 같습니다.
잘되시면 활용팁에 올려주세요.^^
$image = imagecreatetruecolor($size, $size);
imagealphablending($image, false);
imagesavealpha($image, true);
$trans_layer_overlay = imagecolorallocatealpha($image, 220, 220, 220, 127);
imagefill($image, 0, 0, $trans_layer_overlay);
에 찾아보니 아래와 같이 알파 레이어를 만들어서 마스크 처리하라고 하네요.
원 소스와 아래 소스를 적절히 섞어서 쓰시면 될것 같습니다.
잘되시면 활용팁에 올려주세요.^^
$image = imagecreatetruecolor($size, $size);
imagealphablending($image, false);
imagesavealpha($image, true);
$trans_layer_overlay = imagecolorallocatealpha($image, 220, 220, 220, 127);
imagefill($image, 0, 0, $trans_layer_overlay);
명랑폐인님이 알려주신 소스로 사용하니 됩니다. 감사드립니다~
겁쟁이이욜님 참고하세요
// 이미지 텍스트의 색상을 정의 RGB
$trans_layer_overlay = imagecolorallocatealpha($im, 220, 220, 220, 127);
// 텍스트 이미지 기울기 설정
imagealphablending($im, false);
imagesavealpha($im, true);
imagefilledrectangle($im, 0, 0, $_GET['width'], $_GET['height'], $trans_layer_overlay);
겁쟁이이욜님 참고하세요
// 이미지 텍스트의 색상을 정의 RGB
$trans_layer_overlay = imagecolorallocatealpha($im, 220, 220, 220, 127);
// 텍스트 이미지 기울기 설정
imagealphablending($im, false);
imagesavealpha($im, true);
imagefilledrectangle($im, 0, 0, $_GET['width'], $_GET['height'], $trans_layer_overlay);
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기