[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question, Bug in a tutorial



Erik wrote:

> > The image file formats I like best are '.RGB' (also known as "SGI
> > format")
> > and '.PNG'.
> 
> png rocks, rgb is good for gl, but the image files are fairly big and with
> things like libpng I think the simplicity of parsing is neglegible?

Yep. RGB only has run-length encoding - which isn't much of a
compression
scheme for photos and such.

RGB is easy to parse - PNG basically *requires* you to use libpng -
which
is far from easy.
 
> I beleive gif89a can do 32b with 8b alpha (as well as animations and monkeys
> come out of its butt)

Well, whatever - but the whole patent thingy basically makes them
unacceptable.
 
> > JPEG uses lossy compression - unacceptable for most applications.
> 
> I think I gotta disagree with you there. JPEG has a lot of good applications I
> think, like non-simple textures on models and non-simple interterface screens.
> If you look at a texture for grass or dirt or an organic lifeform, something
> with a lot of smoother color variance, or look at the setup screens of games
> like rites of war and total annialation: kingdoms, those are places where jpg
> would be a good choice. it IS lossy, but it's only noticable on very simple
> graphics where png would be a smaller image file anyways...

Now I disagree.

JPEG's lossy compression scheme is highly tuned to exploit things that
the
human visual system doesn't care too much about.  But those assumptions
are for an image displayed square on to the eye with one pixel on the
display equal to one pixel in the image. It also assumes that gamma
correction is performed in the image and not afterwards - it assumes
that the brightness, contrast and colour tint won't be altered in the
display processing.

This makes JPEG ideal for web page graphics and stuff like that.

The artifacts it introduces when the image is magnified, printed,
tinted, post-gamma-corrected, post-illuminated or displayed in
perspective rapidly become utterly unacceptable in most applications.

The WORST thing about JPEG is that once you have converted an image
to JPEG, you are screwed.  Converting it back out of JPEG into a more
suitable format leaves all those artifacts in place.

By all means use JPEG for startup screens, control panels, etc - but
for any kind of animation (especially in 3D), you should steer well
clear of JPEG.

> > So - RGB and PNG get my vote.
> 
> I say jpg and png :)

Well, I'll grant you JPEG so long as you promise never to do 3D
with it.

But for ease of loading, you have to grant me RGB!

PNG definitely roolz though...now if only Web browsers would
deal with it properly - and if only the authors of PNG could
sort out the animation issues and nail down MNG (or whichever
PNG varient is going to win in the end).

I recently rebuilt my web site to be GIF-less using PNG's
everywhere...but most browsers still don't display PNG's
that have an alpha channel properly - so it was a challenge
to keep my site looking how I like it.

-- 
Steve Baker                  http://web2.airmail.net/sjbaker1
sjbaker1@airmail.net (home)  http://www.woodsoup.org/~sbaker
sjbaker@hti.com      (work)