image compression should bitmap image?
6 次查看(过去 30 天)
显示 更早的评论
haii, I want to ask whether the image should be compressed bitmap format? because when I perform image compression with format PNG and JPEG formats generated ratio does not correspond to my formula the ratio = original image size / image compress. But if the ideal format png / jpeg fox was my first to the bitmap with Photoshop, the ratio produced in accordance with my formula.
0 个评论
回答(1 个)
Walter Roberson
2017-1-12
No. It is just that image compression ratio is not meaningful when you compare the image files. Image files are container formats that can include all kinds of extra information such as copyright, date taken, focal length, comments, pixel resolution, preview images. You could potentially have compressed the image portion of the file by a factor of 100 and yet end up with a larger file, if the writing of the container adds in more information than was there before.
In short, comparing the directory bytes information about two image files does not tell you anything reliable about the image compression ratios of the images stored in image files.
3 个评论
Image Analyst
2017-1-13
Use imwrite() to save arrays in an image format. Don't use save(), which saves it in a MATLAB proprietary format. What you're saving is a structure in a proprietary format, not an image that's been compressed and saved to an image file in JPG format.
Walter Roberson
2017-1-13
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!