PHP Classes

Transparency problem with GIFEncoder? Maybe it's me?

Recommend this page to a friend!

      GIF images into animated GIF with native PHP class  >  All threads  >  Transparency problem with...  >  (Un) Subscribe thread alerts  
Subject:Transparency problem with...
Summary:Transparency problem with GIFEncoder? or anoter problem?
Messages:6
Author:laurentm
Date:2007-07-29 19:45:08
Update:2012-10-30 23:15:41
 

  1. Transparency problem with...   Reply   Report abuse  
Picture of laurentm laurentm - 2007-07-29 19:45:08
Hello László,

thank you very much for your nice two class : GIFDecoder & GIFEncoder!
It's very cool and useful, congratulations!

So I'm using the GIFDecoder class and it's OK to get the frames and the delay for each frame. Nice work!
But when I want to rebuild a gif with these frames I encounter sometimes a trouble with GIFEncoder. It depends on the gif I have decoded.

I've tested with the file example.gif (el barto):
1. use GIFDecoder on this file: its' OK and I get the 17 frames.
2. use GIFEncoder on the 17 frames. Not OK. The generated image seems to be a list of single pics, not really a merge.

I uploaded those files for the demo :
1. The original file I used
img77.imageshack.us/img77/5472/exam ...

2. The new file I've generate with GIFEncoder (I used the 17 frames I get with GIFDecoder )
img523.imageshack.us/img523/752/exa ...

Maybe is it the transparency bug ? Or may be I've done an error?
Thank you vey much if you (or someone) may explain what is the problem.

regards,

ps: sorry for my not very good english. Tell me if you don't understand very well my post, Thank you.

--
Laurent

  2. Re: Transparency problem with...   Reply   Report abuse  
Picture of László Zsidi László Zsidi - 2007-07-29 20:47:07 - In reply to message 1 from laurentm
Hi,

Your English knowledge is good and what is more it's better than my English knowledge, I understand whatever you mean perfectly:)
I will review your problem, but if you can please send me a completely example here: laszlo.zsidi@ge.com

Thank you,

László


  3. Re: Transparency problem with...   Reply   Report abuse  
Picture of László Zsidi László Zsidi - 2007-07-29 22:50:35 - In reply to message 2 from László Zsidi
It's a very interesting anomaly.
Thought the assebled first and the last frame have a difference background color than the more frames!?
Try to disassemble the oroginal animated image and be sure the bg. color of the first and the last frame.

  4. Re: Transparency problem with...   Reply   Report abuse  
Picture of laurentm laurentm - 2007-07-30 18:02:53 - In reply to message 3 from László Zsidi
Hi László,

thank you very much for your answer!

This is the complete example you asked for. I hope that it can help you.

I tested 2 files:
- exemple.gif : bg. color of the first and the last frame seem to be the same.
- ribbon.gif : bg color of the first and the last frame are different.

Here I post links to initial file, rebuild file and capture of all the frames I get.

----------------------------------------------------

* exemple.gif initial:
img77.imageshack.us/img77/5472/exam ...

* exemple.gif frames with GIFDecoder:
img75.imageshack.us/img75/8122/bart ...

* exemple.gif rebuilt with GIFEncoder:
img523.imageshack.us/img523/752/exa ...


* ribbon.gif initial:
img511.imageshack.us/img511/6251/ri ...

* ribbon.gif frames with GIFDecoder:
img511.imageshack.us/img511/7586/ri ...

* ribbon.gif rebuilt with GIFEncoder:
img131.imageshack.us/img131/4003/ri ...

----------------------------------------------------

I wonder if you get the same frames I get?

Ask me for any info you need.

Thank you,

regards,

--
Laurent

  5. Re: Transparency problem with...   Reply   Report abuse  
Picture of alex alex - 2012-10-30 23:15:41 - In reply to message 3 from László Zsidi
Hi László

I have the same problem, and I think this comes from the evil decoder.class.php between frames when the gif is too optimized.

Is it possible to do something to fix the problem?

Thank you

  6. Re: Transparency problem with...   Reply   Report abuse  
Picture of Choqx Marcelo Jose Choqx Marcelo Jose - 2017-01-09 19:40:08 - In reply to message 5 from alex
soy de peru me llamo marcelo soy freelance y estoy muy agradecido por el seńor László Zsidi

Pero tengo el mismo problema del fondo blanco.

e intenado moficando el GIFEncoder.class.php reeemplazando el valor rgb 0xFF por 0x00 y no logro con poner el fondo negro

no hablo ingles, solo google traductor.

necesito colocar el fondo negro.
mi correo marcelouss@hotmail.com

______________________________________________

I'm from Peru, my name is marcelo, I'm freelance and I'm very grateful for Mr. László Zsidi

But I have the same problem with the white background.

And intentionally modifying the GIFEncoder.class.php by replacing the value rgb 0xFF by 0x00 and I do not succeed with putting the black background

I do not speak English, I just google translator.

I need to place the black background.
My email marcelouss@hotmail.com