Sybio / ImageWorkshop

ImageWorkshop is a PHP5.3+ library that helps you to manage images based on GD library
http://phpimageworkshop.com/
Other
862 stars 189 forks source link

How install manage animated GIF in datalife engine? #25

Open www-abcd opened 10 years ago

www-abcd commented 10 years ago

I want install this app in datalife engine. Datalife have function watermark but I can install this app because in datalife do not working watermark for gif animation and I really need this feature. Sorry for this question because I am not pro in PHP and I can not do it.

www-abcd commented 10 years ago

Sybioб, can you help me?

Sybio commented 10 years ago

Hi @www-abcd I don't know about datalife engine, and I found that the doc' is written in Russian that I can't read. You should find some help from the datalife engine community, just know that ImageWorkshop is a simple PHP library you should find how to add external library in this CMS ^^

www-abcd commented 10 years ago

Thank you Sybio. I did it. There is another problem. Watermark not working for all gif animation. (I think the pictures with more frame). and show this error. for example this photo: http://d24w6bsrhbeh9d.cloudfront.net/photo/ajrgpGp_460sa.gif and show the error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 296849 bytes) in D:\OpenServer\open_server_4_8_8\domains\gif\src\PHPImageWorkshop\Core\ImageWorkshopLib.php on line 121

How to fix this error?

Sybio commented 10 years ago

Your welcome @www-abcd.

This error appears because your script is trying to use more RAM than authorized by your PHP configuration. In fact GD library uses a lot of RAM to manipulate images and in your case it's too much... Here how to fix it : https://github.com/Sybio/ImageWorkshop/issues/21#issuecomment-27317069

www-abcd commented 10 years ago

Thank you Sybio. Sorry for many questions. It is the great app and I would like to use it. When created gif photo with watermark (from the pictures with more frame), Some colors are spread. Please see this link: http://postimg.org/image/40vq4shgf/

Sybio commented 10 years ago

Indeed... Can you give me your original GIF image ?

Sometimes there is a bug like that because a frame can be partially transparent, and you need to paste all frames on previous one to have the background. I will try something with your GIF ^^

www-abcd commented 10 years ago

Original GIF image: http://d24w6bsrhbeh9d.cloudfront.net/photo/aAYG2wp_460sa.gif

dlestarter commented 10 years ago

sorry I know it's late comment about the issue...Datalife engine has stop gif animation supports since DLE 9.7 (security patch) and completely removed in DLE 9.8, also watermark will not work with gif because algorithm can't be supported in embed watermark..so there is nothing wrong with this script, but the problem is in datalife engine limitation.