• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compress jpg image file

 
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: 42968
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
Pie
Posts: 20610
63
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