How can I compress a ppm file using JPEG compression with 66% ?

4 views (last 30 days)
Hi
I have written following line
a = imread('Barbara_orig.ppm');
imwrite(a,'Barbara_orig.jpg','Quality',66, 'jpeg');
But it shows following error:
Error using imwrite>parse_inputs (line 558)
Invalid input syntax or unrecognized format "Quality".
Error in imwrite (line 418)
[data, map, filename, format, paramPairs] = parse_inputs(varargin{:});
Error in Untitled3 (line 2)
imwrite(a,'Barbara_orig.jpg','Quality',66, 'jpeg');

Answers (1)

Walter Roberson
Walter Roberson on 2 Aug 2017
imwrite(a, 'Barbara_orig.jpg', 'Quality', 66);

Categories

Find more on Denoising and Compression in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!