I m transporting desktop snapshot image via serializing ImageIcon object over the network using http, this method is quite fast in localhost environment but when i need to transport it over the network i get a delay of 3 sec..i.e if i open notepad.exe at server then client receives that image after 3 sec...
so my main problem here is ..how can i reduce the size of imageicon object ..currently its near to 4MB
I have tried using gzipinputstream & equivalent outputstream but gzipinputstream blocks my thread ...i was chainning like this
do any one knows any API which will allow me to compress my ImageIcon object
naved momin wrote:do any one knows any API which will allow me to compress my ImageIcon object
Simple answer: no.
However, I'm pretty certain that desktop images are saved as bitmaps, so what might work is to convert them to a lo-res JPEG first and then create your ImageIcon from that. If ImageIcon keeps a copy of the original image, that might significantly reduce its footprint.
Beyond that, I have no expertise in this area.
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here