> ..
>
[quoted text clipped - 25 lines]
>
> Message posted via JavaKB.comhttp://www.javakb.com/Uwe/Forums.aspx/java-general/200712/1
...
>The images are dynamically generated, in PNG format.
Smack 'em out to JPEG. That should reduce the size to
at least a third.
>..Size varies.
How *much?* What is the frigging *minimum* and *maximum*?
(Sheesh) Getting information from some people is like
pulling teeth, from a chook.
>I'm thinking of going AJAX for that purpose. But not sure how
>to, any hint?
Don't.

Signature
Andrew Thompson
http://www.physci.org/
Lew - 14 Dec 2007 02:15 GMT
> ...
>> The images are dynamically generated, in PNG format.
[quoted text clipped - 12 lines]
>
> Don't.
There's a standard idiom for showing images in web apps - have a servlet
serve'em up. Then Andrew's placeholder trick can work.
<img src="/Imager?name=foo.jpg" />
I use this for, say, when images are stored in a database instead of a
relative directory of the web app. Also useful for images created on the fly.

Signature
Lew
Roger Lindsjö - 14 Dec 2007 07:16 GMT
>> ...
>>> The images are dynamically generated, in PNG format.
[quoted text clipped - 20 lines]
> relative directory of the web app. Also useful for images created on
> the fly.
Or map Imager/* to your servlet so you can write <img
src="Imager/foo.jpg"> if you want all browsers to understand that the
image name is foo.jpg (should the user try to save the image). This
specially applies to SonyEricsson mobiles if I remember correctly.
//Roger Lindsjö
Lew - 14 Dec 2007 13:49 GMT
> Or map Imager/* to your servlet so you can write <img
> src="Imager/foo.jpg"> if you want all browsers to understand that the
> image name is foo.jpg (should the user try to save the image). This
> specially applies to SonyEricsson mobiles if I remember correctly.
Nice tip. I can make immediate use of that - in fact, for a client's project.
This newsgroup helps us earn a living.

Signature
Lew
Roger Lindsjö - 14 Dec 2007 22:20 GMT
>> Or map Imager/* to your servlet so you can write <img
>> src="Imager/foo.jpg"> if you want all browsers to understand that the
[quoted text clipped - 5 lines]
>
> This newsgroup helps us earn a living.
Glad to be of help, that's one of the main reasons I come here, almost
every day I learn something new.
//Roger Lindsjö
RedGrittyBrick - 14 Dec 2007 11:22 GMT
> ..
>> The images are dynamically generated, in PNG format.
>
> Smack 'em out to JPEG. That should reduce the size to
> at least a third.
IME that depends entirely on the image content. For images with
continuously varying tone and high levels of detail, JPEG will give
better compression (assuming you use lossy compression, as you know, you
can set JPEG quality to 100% for effectively lossless compression).
In other cases PNG can give better compression than JPEG.
To achieve high compression with JPEG involves a tradeoff in quality
which can lead to very noticable muddiness and ringing effects on images
with flat-colour backgrounds.
I'd try both.
Andrew Thompson - 14 Dec 2007 12:28 GMT
>> ..
>>> The images are dynamically generated, in PNG format.
[quoted text clipped - 3 lines]
>
>IME that depends entirely on the image content.
True - good point. Technical drawings or blueprints
can become blurry when the compression is high, and
JPEG is pretty pointless when compression is low.
But for these particular (line based) drawings, I would
even recommend...
>...For images with
>continuously varying tone and high levels of detail, JPEG will give
[quoted text clipped - 8 lines]
>
>I'd try both.
.. trying dropping the colors to 256 and perhaps even
rendering it as a (shock horror) GIF (or PNG*). Dropping
the number of colors can result in a significant reduction in
image byte size.
> ..<http://www.libpng.org/pub/png/book/chapter01.html#png.ch01.div.2.3>
* Huhh. That is neat.

Signature
Andrew Thompson
http://www.physci.org/
>>> What I want to show is dynamic loading image likehttp://www.ajaxload.info/
>>> and automatically switches to the image once it has been loaded.
>> Ughh. Now that is pointless and stupid. Instead of
>> an image that is scanning down the page line by line
[quoted text clipped - 3 lines]
>> What format are the images?
>> How big are the images (in px and bytes)?
> The images are dynamically generated, in PNG format. Size varies.
> I'm thinking of going AJAX for that purpose. But not sure how
> to, any hint?
Have you tried generating *interlaced/progressive* PNG?
http://www.libpng.org/pub/png/book/chapter01.html#png.ch01.div.2.3