[plug] Proxy module to convert common images to ASCII art?
simon
simon at chrome64.org
Thu Dec 8 10:31:18 WST 2005
Jonathan Young (jonathan at pcphix.com) wrote:
>
> Chris Caston wrote:
>
> >Hello,
> >
> >Is there a proxy module that one can use to convert gifs, jpgs and pngs
> >on the fly?
> >
> >Then perhaps an option to bypass it if you really want to see the image.
> >
> >The application is for browsing the web on an expensive (per kilobyte)
> >connection.
> >
> >regards,
> >
> >Chris
> >
> >
> Someone correct me if I'm wrong, but unless this were a server-side
> application / module wouldn't you still have to download the contents of
> the jpeg in order to convert them?
yup, it would only be of use if you had your proxy on the far end of the
expensive link. Beyond that, you could only change the image to a smaller
image of the same type...... You couldnt send the browser a bunch of text when
its expecting a gif, unless you dynamically rewrite the HTML as well before
sending it along.....
Given that we're talking about having the proxy on the far end of the link,
perhaps you could hack the proxy to run all images through ImageMagick or
similar to convert them to 1 bit b/w dithered images to reduce their size
before they hit the link. It would have to be a bit smarter than that though,
because some image formats only support certain bit depths etc. Bear in mind
also that by changing the image depth etc you are also affecting the level of
possible compression (you are compressing everything on the link right?) so my
guess would be that the gains would be reduced further.
Perhaps it might be possible to change all images to a format that supports
1bit b/w, and then rewrite all the image tags etc to point to the new image -
but this would play havoc with your caching........ If you cache the b/w image
how would it check for changes on the originating server? If you cache the
original image, how would you know what to do when the client requests the b/w
image? (remember, the HTML has been rewritten!).
All in all, no. :D
--
=================
Simon Scott
simon at chrome64.org
mob: 0409113359
=================
More information about the plug
mailing list