Apples

Apples

by Garik

submit your photo


Picture of the Week Themes
Suggest and vote on themes

Please participate in Meta
and help us grow.

Tell me more ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

Has anyone ever noticed that if you open a image in mspaint (.jpg, .jpeg) and then just save it, the image size is reduced by many folds. I use this method to reduce the file size.

However, I am not sure about the quality loss due to this. Can anyone please tell/explain the quality loss if any using this method?

share|improve this question
Yes everyone has noticed this. I would highly suggest not using MS Paint. Basically anything is a step up from MS Paint. Try Xnview or Irfanview, among thousands of others. – dpollitt Feb 19 at 16:40

3 Answers

up vote 2 down vote accepted

The fact that the image file gets smaller tells you that you are losing quality. The JPEG format is optimised for a size vs. quality compromise, so the file size is more or less a direct measure of the quality.

If you view the image and zoom to 1:1 scale or more, you can usually see the artifacts caused by the JPEG compression.

The compression works by making 8x8 pixel blocks with a color gradient to resemble the original data as close as possible, then the difference between that mosaic and the original data is stored with the amount of precision that corresponds to the quality level chosen. The higher the compression, the more of the mosaic is visible.

Here is an example of how the compression artifacts are visible around the edges of an object (a maple leaf) against a smooth background (the sky):

enter image description here

share|improve this answer

Yes quality will most likely be lost. The JPEG format implements lossy compression, i.e. data integrity is traded off against filesize. When saving a JPEG you can usually decide what quality setting to use, and thus how much to compress the files, it sounds like MsPaint is using a default quality value which is lower than the quality setting of the files you're opening, which is why they are ending up smaller.

A better approach is to use a tool that allows you to choose the quality setting so that you can decide for yourself what loss of quality is acceptable in pursuit of smaller file sizes.

share|improve this answer
Thanks for your answer, Is there any way that I can check the actual loss of quality, is there any tool available for that. – Ankit Feb 19 at 16:27
Quality will definitely be lost. Even at maximum quality, jpeg will alter the image slightly, every time. At lesser settings, like what MS Paint uses, it will alter the image significantly. – cadmium Feb 19 at 22:24
Highly pedantic note: re-saving thee same image will reach an equilibrium after a handful of opens and resaves at the same quality level. – mattdm Feb 19 at 22:26

Multiple encodings with any lossy format will result in additional quality loss. This is what is called generations of loss and is a concept that dates back to analog techniques where each time you made a copy, the quality of the copy was inferior to that of the original.

Digital tools allows us to avoid generational quality loss when using lossless formats (formats that store all available information without deterioration), however lossless formats require much more space and are therefore rarely used for final output

Lossy formats such as JPEG work by storing an image that closely resembles the original but throw out information that they deem to be unnecessary. Encoding an image more than once will generally reduce quality further since the algorithm does not have the original full quality image to work from and must instead encode the lower quality image.

The file size will generally give a rough estimate of loss of detail if you are encoding within the same compression scheme, at least when files sizes decrease. It is however possible to increase the size of an image (say for example you had a lossless image, saved it as a 10 quality JPEG and then resaved that as a 100 quality JPEG). While the file size would grow, it would be storing noise at high quality rather than information from the original image.

In theory a tool could compare the pixel data of an original image with the differences in the final image to get a better estimate of information loss, but it's hard to quantify how meaningful those changes may be. For example, if every pixel in the image was a few color values brighter, the overall image would seem very similar, where as if one pixel was off by a large value, it would be much more obvious, even if the entire rest of the image was untouched. Similarly, if areas of fairly uniform color are actually made uniform, it may be a large change in pixel values, but have a limited impact on how someone perceives the image.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.