2014-07-18 2 views
0

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(); 
?> 
+0

내 질문에 어디에 문제가 있습니까? 게시 된 댓글은 어디에 게시됩니까? – TK5EP

+0

질문에 대한 문제는 "보류 중"상자에 설명되어 있습니다. 이제 네가 재개표를 던진 네세리 정보를 추가했다. 그 대답은 정답이 아니라는 것을 깨닫고 아마 저자에 의해 삭제되었습니다. –

답변

1

I fo 나는 내 자신의 질문에 대한 답을 얻었고, 라즐로 지시 디 (László Zsidi)와 같은 원작에 기초한 다른 도서관이나 동일한 도서관을 사용하는 다른 사람들을 도울 수 있습니다. 내 문제와 투명성 작품 해결이 하나

$Locals_ext = "!\xF9\x04" . chr ((($this->DIS << 2)) | 1 + 0) . 

에 의해

$Locals_ext = "!\xF9\x04" . chr (($this->DIS << 2) + 0) . 

: 클래스에서

, 당신은 2 줄에 하나 개 또는 다른 장소에 표시되는 다음과 같은 부품을 교체해야 지금 OK. 나는 내가 발견 한 3 개의 differents 클래스에서 동일한 작업을 기반으로 시도했다.

도움이되기를 바랍니다.

관련 문제