how to compress jpeg to reduce size

Patton Echols p.echols at comcast.net
Sat Feb 5 23:04:32 UTC 2011


On 02/05/2011 02:37 PM, Tapas Mishra wrote:
> I have an image which is 1.7Mb in size it is a scanned document.
> I have to submit it online in an application where they do not accept
> more than 1 Mb size JPEG
> so how can I reduce the size of this image.Any format other than this
> gif,png,jpg also is acceptable but
> file size should be 1 Mb only.So how can I achieve this let me know if
> some one has any suggestions for the same.
>



 From the imagemagick tools use convert like this:

$ convert input.jpg -quality nn output.jpg

where nn is between 1 and 100.  1 is the lowest quality (highest 
compression).  Obviously you want the least compression that will fit 
the size requirement.

You can also try resizing slightly:

$ convert input.jpg -resize 800x800 output.jpg

This will resize the picture to the 800px in the longest dimension.  
Aspect ratio is preserved.

Of course, you can use Gimp or another gui tool to do the same.

Cheers.
--PE




More information about the ubuntu-users mailing list