
True-color GIF with 32697 colors - ssclafani
http://phil.ipal.org/tc.html#
======
sitharus
The file size isn't too bad, but in Safari the rendering time is terrible. You
can see it render each block, and it takes about 10 seconds to render the
whole thing.

I assume this is because it's not a commonly used feature, so the code paths
are only implemented for compliance rather than performance.

~~~
buddydvd
It's actually more of a hack to deal with malformed GIFs and goes directly
against spec. To address GIFs where each frame has a 0 frame delay, most GIF
decoders implement a minimum frame delay value.

See: [http://nullsleep.tumblr.com/post/16524517190/animated-gif-
mi...](http://nullsleep.tumblr.com/post/16524517190/animated-gif-minimum-
frame-delay-browser-compatibility)

 __Edit __: This is what it looks like with all frame delays set to 2
centiseconds:<http://i.imgur.com/24xpZEd.gif>

On Chrome and Firefox, you should see it animate more quickly.

~~~
Wevah
GIF performance seems improved in safari, at least in 6.x, though this is just
anecdotal evidence. The GIFs with 0.02 second frames (the actual ones, not
just the "here's what it looks like under x browser" ones) seem to render with
the same frame rate for me in Safari and Chrome now.

------
DanBC
I took a screenshot so interested people can see how badly images can be
mangled by the proxies used by some mobile companies.

(<http://i.imgur.com/DYbVSbj.png>)

~~~
lucisferre
Wow what mobile companies do that?

~~~
dangrossman
AT&T, Verizon, Sprint, T-Mobile... depending on network, image size, device
and browser user-agent.

~~~
Stratoscope
I just tried it on Verizon from Chrome on my ThinkPad (via mobile hotspot) and
my Galaxy Note II. Both displayed a perfect image, albeit very slowly.

Not saying there aren't cases where it does happen; obviously from that
screenshot there are; I just didn't run into it.

------
jamesbritt
<https://news.ycombinator.com/item?id=5691086>

Same URL but without the dupe-eluding # tacked on the end.

~~~
wfunction
Why hasn't HN fixed this?

~~~
jamesbritt
I once posted an "Ask HN" about this and it was soon killed.

At this point I have to assume it is a feature, not a bug, so it's hard to
fault people who take advantage of it.

------
Aardwolf
> So a GIF file with more than 256 colors gets very large very quickly.

Sure, due to a library that doesn't do compression! Has anyone an example of
one with compression?

Also, looking at this:

<https://bugzilla.mozilla.org/show_bug.cgi?id=149205>

It seems that the block by block thing is not an animation on purpose, it's
really how browsers render it (and other programs load only the first frame
etc...), because each sub-image is a frame. So not that ideal.

~~~
Hello71
Yes. It's called libpng.

------
muyuu
I lost an argument about this years ago. In Uni I learnt that you could create
GIFs with more than 256 colours, but when challenged I could find none. And
all references in the net mentioned just 256. I was sure but I ended up
believing I just had a brainfart or was lied to in class.

This is ~10 years late to my argument :(

------
gojomo
The images could be compressed; the relevant patents expired a few years ago.
(Is this an old page?)

~~~
kyrias
The last modified date on <http://phil.ipal.org/tc217.gif> is 12 Dec 1999,
which was 3 years before the last patent expired.

------
koyote
Internet explorer (10) doesn't even render it properly in the first place.

(<http://i.imgur.com/R87CGQ4.png>)

~~~
fractaled
Your zoom appears to be set to 125% (not sure if that absolves IE or not -- I
see similar lines in Opera when zooming). Looks okay to me at 100%.

------
sltkr
Cool, I wrote about a similar technique (but with a somewhat different
approach which I think balances file size/quality concerns better in
practice):

[http://notes.tweakblogs.net/blog/8712/high-color-gif-
images....](http://notes.tweakblogs.net/blog/8712/high-color-gif-images.html)

------
aleksi
"32697 colors" is not True Color, it's High Color.

~~~
mischanix
The point is that if you render the image in blocks of 16x16, there can only
be 256 colors per block, so there can be as many colors in the image as there
are pixels. This 217*217 image has some duplicate pixels in the lower and
higher values but gets fairly close to that maximum.

------
__del__
I can't be the only one bothered by the choice of dithering algorithm in that
example, right?

<http://en.wikipedia.org/wiki/Dithering#Algorithms>

------
sc00ter
_"No one tried or needed to generate images with more than 256 colors since
they could not be viewed on anything less than high priced graphics
workstations."_

Except that given this refers to the late 80's, Amigas had been displaying
4096 colors since the mid 80s. Not millions of colours until the early 90s but
still a far cry from the 256 colours of the average PC.

(No, gif was not a native datatype, but the Amiga was remarkably ahead of its
time with plug-able file formats.)

------
unreal37
This is no different than 200 256-color GIFS loaded side by side. Sure, the
entire image is 32K colors, but each 16x16 block is limited to 256 colors
still.

Plus the forced animation makes it effectively useless.

What's the point of that?

~~~
0x0
Well, in a 16x16 block you only have 16x16=256 pixels, so the blocks
themselves are basically "true color". Stack blocks and you'll have lossless
true color. Of course, this was more interesting before .png support became
widespread in browsers.

(Also, I believe you're not restricted to 16x16/256col blocks. If you can fit
a pattern of 255 distinct colors + transparency over a larger image, you could
stack several frames to create the same effect, without having to drop down to
16x16 local blocks)

------
michaelpinto
This makes me angry with Adobe: I feel cheated that for the past twenty years
I could have been making GIF images with more than 256 colors in Photoshop.

------
pixelcort
A couple days ago that there was another page submitted to HN describing how
gif animation worked. It then suggested this technique was possible.

------
rocky1138
Picasa Photo Viewer, when the image is downloaded then opened using this
program, doesn't show anything over just the first block (top left).

~~~
jimktrains2
Same in Chrome Version 26.0.1410.63 (Ubuntu 12.04)

~~~
petercooper
It shows on the iPad in Mobile Safari but loads and fills out slowly in a grid
of squares in rows and columns of 3 or 4 (I forget). It took about 15 seconds
in all to render. Fascinating nonetheless and I learnt something.

~~~
Moto7451
Mobile Chrome on Android 4.0.3 has The same behavior. At first I thought it
was an animated gif.

Edit: looks like it is an animation of the rendering process.

------
doctorpangloss
Photoshop correctly opens and interprets this image. Frame propagation is used
to achieve the effect.

------
adregan
There is something charming about 256 colors though.

------
JeremyMorgan
What's the point of this? Hi Res animated gifs? Color me sort of interested...

------
jrabone
Fails miserably on Chrome / Android 4.2 / Nexus 7 ...

~~~
jrabone
Actually it's my proxy server that failed, didn't realise it was an animated
GIF and I have it set to deanimate images by default. Ooops!

