Gifcreator PHP 클래스를 사용하여 10 개의 PNG 이미지에서 애니메이션 GIF 이미지를 만들려고합니다. 애니메이션 이미지가 생성되었지만 원본 이미지의 투명도가 손실됩니다. 검은 색 bakground가 있습니다. 설명서에는 투명도가 처음로드 된 이미지에 의해 결정된다는 내용이 나와 있습니다. 10 개의 이미지는 배경이 투명합니다. 나는 그것이 흰색을 기반으로한다고 페인트에 htem을 적재했다.GifCreator PHP 클래스의 투명성이 작동하지 않습니다.
anoyone이 해결책이 있습니까?
감사합니다,
클래스는 여기에 있습니다 : 여기 https://github.com/Sybio/GifCreator
내 스크립트를 http://www.egloff.eu/rsmaptest/slideshow.php
여기에 첫 번째 이미지 : http://www.egloff.eu/rsmaptest/images/image0.png
코드 :
<?php
// Include the class
require_once('./testcreator/GifCreator.php');
// Instanciate the class (uses default options with the addition of width/height specified)
$gif = new GifCreator(0, 2, array(0, 0, 0),550,550);
// Add each frame to the animation
$gif->addFrame(file_get_contents('images/image9.png'), 100, true);
$gif->addFrame(file_get_contents('images/image8.png'), 100, true);
$gif->addFrame(file_get_contents('images/image7.png'), 100, true);
$gif->addFrame(file_get_contents('images/image6.png'), 100, true);
$gif->addFrame(file_get_contents('images/image5.png'), 100, true);
$gif->addFrame(file_get_contents('images/image4.png'), 100, true);
$gif->addFrame(file_get_contents('images/image3.png'), 100, true);
$gif->addFrame(file_get_contents('images/image2.png'), 100, true);
$gif->addFrame(file_get_contents('images/image1.png'), 100, true);
$gif->addFrame(file_get_contents('images/image0.png'), 500, true);
// Output the animated gif
header('Content-type: image/gif');
echo $gif->getAnimation();
?>
내 질문에 어디에 문제가 있습니까? 게시 된 댓글은 어디에 게시됩니까? – TK5EP
질문에 대한 문제는 "보류 중"상자에 설명되어 있습니다. 이제 네가 재개표를 던진 네세리 정보를 추가했다. 그 대답은 정답이 아니라는 것을 깨닫고 아마 저자에 의해 삭제되었습니다. –