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!