File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to reduce size of ImageIcon object

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Winston Gutkowski
Bartender
Pie
Posts: 9465
49
Eclipse IDE Hibernate Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Winston

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic