• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PERFORMANCE problem in ENCODING java.awt.Image

 
velmurugan
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends, We are having a performace problem in encoding java.awt.Image in to any of the PNG or DIB or GIF formats. The problem is the size of the image is more than expected. We are getting 22 kb to 27 kb PNG image. But our requirement is 10 - 11 kb only. Here I am attaching the class file, which is actually doing encoding part. If any one can give valuable suggestion it will be great help to us. Thanq.
[ December 20, 2006: Message edited by: kvel murugan ]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So is 10-11 KB a size that is reasonably to be expected for the image you have, or do you require an image of that size? Those are two different things.

Have you had a look at the javax.imageio.ImageWriteParam.setCompressionQuality method? It can be used to set the compression level (and hence the quality and size of the resulting file).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic