# Empty GIF generator not actually empty

**URL:** <https://www.ruby-forum.com/t/empty-gif-generator-not-actually-empty/190938>\
**Category:** NGINX\
**Created:** [July 1, 2010, 7:57am UTC](https://www.ruby-forum.com/t/empty-gif-generator-not-actually-empty/190938 "2010-07-01T07:57:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorin\_Halpert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ebca7d/32.png) [@Lorin\_Halpert](https://www.ruby-forum.com/u/Lorin_Halpert)\
**Post date:** [July 1, 2010, 7:57am UTC](https://www.ruby-forum.com/t/empty-gif-generator-not-actually-empty/190938/1 "2010-07-01T07:57:43Z")

</div>

Using the built-in generator changes the color of the background color  
under  
Chrome, yet using my own blank doesn’t cause this. I’ve attached a  
“known  
good” blank created in Fireworks (same byte size) so it can replace the  
one  
in the nginx codebase. I am under windows with no development tools so I  
can’t create a patch myself but I’m able to test a new binary to  
validate  
that it’s fixed.

---

<div class="post-metadata">

**Author:** ![Lorin\_Halpert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ebca7d/32.png) [@Lorin\_Halpert](https://www.ruby-forum.com/u/Lorin_Halpert)\
**Post date:** [July 1, 2010, 8:24am UTC](https://www.ruby-forum.com/t/empty-gif-generator-not-actually-empty/190938/2 "2010-07-01T08:24:03Z")

</div>

On Thu, Jul 01, 2010 at 01:48:31AM -0400, Lorin Halpert wrote:

> Using the built-in generator changes the color of the background color under  
> Chrome, yet using my own blank doesn’t cause this. I’ve attached a “known  
> good” blank created in Fireworks (same byte size) so it can replace the one  
> in the nginx codebase. I am under windows with no development tools so I  
> can’t create a patch myself but I’m able to test a new binary to validate  
> that it’s fixed.

The current empty GIF has 2 colors: #0: black and #1 white.  
The white (#1) color is used as background and as transparent color.

The suggested GIF has two colors: #0 gray (C0C0C0) and #1 black.  
The transparent color is #0 (gray). The background color is #256  
and there is no such color number in the GIF table. I’m not sure  
how browsers will handle this case. Probably they use just #1 color.

However, I do not understand the issue. Could you show example on  
the web where built-in GIF changes background color ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Lorin\_Halpert](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ebca7d/32.png) [@Lorin\_Halpert](https://www.ruby-forum.com/u/Lorin_Halpert)\
**Post date:** [July 1, 2010, 8:25am UTC](https://www.ruby-forum.com/t/empty-gif-generator-not-actually-empty/190938/3 "2010-07-01T08:25:13Z")

</div>

On Thu, Jul 01, 2010 at 10:23:14AM +0400, Igor S. wrote:

> The white (#1) color is used as background and as transparent color.
> 
> The suggested GIF has two colors: #0 gray (C0C0C0) and #1 black.  
> The transparent color is #0 (gray). The background color is #256

The background color is #255 …

> and there is no such color number in the GIF table. I’m not sure  
> how browsers will handle this case. Probably they use just #1 color.
> 
> However, I do not understand the issue. Could you show example on  
> the web where built-in GIF changes background color ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**
