Skip to main content

Posts

Showing posts with the label Image

Image compression using java

There are no specific API is available for compressing the images. Supported format files are JPG (Joint Photography Experts Group) and PNG (Portable Network Graphics) Download Jar (Java Archive) which is developed by Java Query API Create a instance using ImageResize Class and using that object call the method compressImage Sample ImageResize ir = new ImageResize();  ir.compressImage("Source Location", "Destination ", width, height); String Parameter: Source Location and Destination Integer Parameter: width and height Parameters Description: ·          1 st Parameter : Source Location , Example c:\\demo\\image.jpg ·          2 nd Parameter : if you mention “default” then it will compress the original image and if you mention the destination location then it will create a new compressed image ·          3 rd Parameter  ...