g3togif (was: web fax viewer...)

Gert Doering (gert@greenie.muc.de)
Sun, 25 May 1997 23:03:55 +0200


Hi,

Luigi Rizzo wrote:
> > > I think the best results could be achieved by producing a gif file
> > > with about 100dpi on each direction and using antialiasing when
> ...
> > g3topbm | pnmscale -xscale 0.5 -yscale 0.5 | ppmtogif
> 
> I think pnmscale does not do antialiasing, but I'll try it.

I think it will do something, 'cause I see grey levels in the pgm file
that it outputs. Dunno what algorithm it uses, though.

> On the other hand, viewfax does a good job at 1/2 and 1/4 resolution,
> so I'll just have a look at what it does.

Nothing :) - just throw away every second row. (Interesting, isn't it?)

> > If we had a specialized conversion tool to do just this (shrink to 100 dpi
> > [which is fairly easy as the standard resolution is approx. 200x200 or 
> > 200x100 dpi] and create a GIF from that) it should be reasonable fast, 
> > you're right.
> yes, I said 100dpi to mean "half hres"x"low vres"

Yep.

> > What I would like to see, though, is a way to get different sizes of the
> > fax on the client side - some faxes really aren't readable at 100 dpi or
> > even less -- *without* transmitting the image twice.
> > 
> > Maybe use the image scaling functions built into many/most www browsers?
> 
> I am not sure on what you mean, but html tags for images allow you to
> specify both a lowres and a highres version of the same image. Is that
> what you have in mind ?

Hmm, this is an interesting thought (have a thumbnail first, and then get
the real thing if it's interesting), but wasn't exactly what I was trying
to do.

Most WWW browsers have a tag that you can use to specify the percent value
that it should scale a given image to, so you can only create + transmit
*one* image, and have the browser scale it to 1/4 or 1/2 or so. If you
request another "resolution", you'll get the same image (->should be in
the browser's cache), just scaled differently.

> Also, I would not be too worried about transmitting the image twice,
> because the 1/4-size image is probably some 10KB, and in many cases it
> is all you need. 

You have a point here. 10k is about 3-4 seconds on an (unloaded) 28.8
line, so even a 10-page fax is transmitted in reasonable time.

> I think that to solve your problem (variable
> resolution display) the only approach is to spawn an external viewer.

Or use Java. With all that hype, it has to be good for something :-)

But since I'm not going to implement anything of it, I will just throw
ideas and suggestions around, and wait for someone to do all the dirty
work. I like this ;-)))

gert
-- 
USENET is *not* the non-clickable part of WWW!
           //www.muc.de/~gert/
Gert Doering - Munich, Germany      gert@greenie.muc.de
fax: +49-89-3545980     gert.doering@physik.tu-muenchen.de
.