简体   繁体   中英

Image saved with imwrite() with lossless mode is not visible

I want to save my image as JPEG so I used imwrite function in MATLAB. But because JPEG follows lossy format, I am not getting exact intensity values when the file is saved as .jpg

I tried

imwrite(a, 'a.jpg', 'Mode', 'lossless');

So I got the exact intensity values but the image is not visible in respective folder. It is visible only in the MATLAB environment.

I must save my image in JPEG format only. So please suggest me any other alternative to save image as JPEG which can save image with same intensity values.

The basic issue is that despite the fact that the image was saved correctly, no image viewer recognizes the lossless format. It seems to be the original jpeg format that nobody uses today because of the poorer compression (better than BMP but poorer than lossy jpeg). I assume you must use jpeg because some software or website you use need this format, but it will most likely not decode lossless correctly. jpeg loses data, I don't see a way around it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM