Search code examples
matlabimage-processingjpegjpeg2000lossy-compression

Image compression using Lossy Compression technique


I need to convert PNG to JPEG,JPEG 2000 using ImageMagick and Matlab. I want to compress all data with ratio ( e.g. 10) and then specify some file size? Any idea or solution to achieve the specific file size? How can I do it? Thanks


Solution

  • Imagemagick can create a JPG of your desired file size. See http://www.imagemagick.org/Usage/formats/#jpg

    -define jpeg:extent={size}
    As of IM v6.5.8-2 you can specify a maximum output filesize for the JPEG image. The size is specified with a suffix. For example "400kb".