Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compress jpg image file  RSS feed

 
narasimha durga
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how would i compress the jpg image file using java
please..............
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcoem to JavaRanch.

The java.util.zip package has useful classes for this, particularly ZipOutputStream and GZIPOutputStream.
 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And with javax.imageio.ImageWriter and javax.imageio.ImageWriteParam you can increase compression on an existing JPG file without zipping the file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!