how much data loss (in %) image compression method the 'JPEG'

 채택된 답변

Walter Roberson
Walter Roberson 2017년 2월 13일

1 개 추천

JPEG can be configured between no data loss and 99% data loss.
See the imwrite() 'quality' parameter, and 'mode', 'lossless'

댓글 수: 1

For passers-by, I should note that setting the 'quality' parameter to 100% does not make the process lossless.
% generate a small synthetic image with flat regions and hard edges
inpict = im2uint8(rand(10,10,3));
inpict = imresize(inpict,5,'nearest');
imshow(inpict)
% 100% is the best, right?
fname = 'test.jpg';
imwrite(inpict,fname,'quality',100);
jpegged = imread(fname);
% ... not quite.
imshow(jpegged)
You'd actually have to specify that you want lossless mode, as Walter mentions.
imwrite(inpict,'myfile.jpg','mode','lossless');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

질문:

2017년 2월 13일

댓글:

DGM
2023년 2월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by