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

Re: [MacPerl] Making Thumbnails



According to Chaz Larson:
> 
> But then you're pretty much defeating the whole purpose of having an index
> page in the first place, aren't you?  The visitor will have to load all the
> full-size images in order to decide which full-size image to look at.
> 
Not really.  It (again) depends upon just how complex the
picture is.  For instance, I shrank down ten pictures which
were moderately complex.  The miniature pictures were
approximately 15K in size each.  The full size pictures
were approximately 20k in size each.  The full sized
pictures are 8.5" x 11" pictures.  But they contain a lot
of space with the same color in them.  They were cartoon
characters.  Not Bugs Bunny or any of those, but along the
same general type of drawing.  Even though the artist
involved did put a lot of detail into the pictures, the
pictures themselves contained few colors (about seven or
eight) and therefore the GIF compressor only needed to use
three bits to begin the compression.  I can only guess, but
I'm thinking the LZW compression probably didn't go above
sixty unique entries.  In any event, since the files were
so small there really wasn't any reason not to use the full
sized pictures as the thumbnails too.

Now, if the pictures were about something like a photo of a
wilderness scene.  Or someone's picture - that's
different.  That's a much more complex picture than a
cartoon picture.  So you'd want to try JPEG first and see
how small JPEG can compress it.  Again, if the compressed
picture turns out to be a really small file, then I'd use
just that.  If it were too large, then tone down the
precision of the picture _first_ before you scale it.  This
is because a less precise picture at one size looks more
precise at a smaller size.  So if you have a JPEG picture
which is one foot by one foot and it looks pretty bad -
when you then scale it down it appears to look better
simply because you've shoved more information into a
smaller area.  So the picture _seems_ to become clearer.

But to re-iterate what I said - if the picture is complex
then yes, you have to reduce/scale down the picture so it
takes less time to transmit it.  But if the picture is a
simple picture, then no you do not have to reduce/scale
down the image.  You usually can get away with just
transmitting the larger picture and using the width and
height variables.

The reverse is true too.  If you have a picture that is
simple.  (AND I MEAN SIMPLE TOO!) you can make a very small
picture and then scale it up.  This is how those color bars
are done sometimes.  You make a little gif file with a very
small color square in it and then you use the width and
height parameters to stretch the picture.  You can do the
same thing with horizontally oriented simple pictures (like
a series of lines) or vertically oriented simple pictures.
But when you get into more complex pictures you begin
seeing distortion or stretching.  But even then some
pictures still look ok (like a comet on a black background
could be stretched in the direction of the tail so it just
looks like the tail is longer).

Notes: All other questions on this subject will be answered
via e-mail as this isn't a MacPerl question.


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch