stil / gif-endec

PHP GIF encoder and decoder
63 stars 16 forks source link

Transparent animated Gifs #2

Closed Kantakah closed 9 years ago

Kantakah commented 9 years ago

Hi! I installed the GIFEndec because Sybio's Lib made some glitchy pixel salad out of my gif graphics. When I used your test.gif, everything was fine, but with my gif file: http://www.nokuku.com/objects/bluebird_l.gif The code throw this exception:

Uncaught exception 'RuntimeException' with message 'Disposal method 2 is not implemented.'

Please could you help me? Thanks in advance! Lioba

stil commented 9 years ago

This commit should fix your issue. Thanks for bug report, I wouldn't know that something is wrong if you haven't reported it.

Kantakah commented 9 years ago

Hey! Thank you! It's working like a charm! Now I have beautiful sprites made our of all my gifs, no error messages left! I have a little improvement suggestion though: It would be great if you could pass options through the render callback funtion, for example the directory in which you want to save the images. Or in my case, I added a public variable in the render class:
public $frameImgRes = array(); in which each gd resource of a frame is stored under it's index. I hope my explanation is not too confusing ^~^°°

stil commented 9 years ago

http://php.net/manual/en/functions.anonymous.php#example-186

<?php
$message = 'hello';
$example = function () use ($message) {
    var_dump($message);
};
echo $example();
Kantakah commented 9 years ago

oh.... U.U Thank you!!!!