This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PERFORMANCE problem in ENCODING java.awt.Image

 
velmurugan
Greenhorn
Posts: 24
  • 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
Posts: 42967
73
  • 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