File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes compress jpg image file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "compress jpg image file" Watch "compress jpg image file" New topic
Author

compress jpg image file

narasimha durga
Greenhorn

Joined: May 09, 2009
Posts: 2
how would i compress the jpg image file using java
please..............
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42946
    
  70
Welcoem to JavaRanch.

The java.util.zip package has useful classes for this, particularly ZipOutputStream and GZIPOutputStream.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19790
    
  20

And with javax.imageio.ImageWriter and javax.imageio.ImageWriteParam you can increase compression on an existing JPG file without zipping the file.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compress jpg image file