Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a 2560x1600 JPEG image and its file size is 2,532KB. Due to a website's upload restriction, I had to reduce the size of the image. Naturally I thought, "I'll just resize it in Windows so I can upload it." After re-saving the JPEG from Paint, its size was greatly reduced to 905KB at the same dimensions. Why is this happening? If anyone can enlighten me that would be greatly appreciated. Thanks in advance.

share|improve this question

migrated from stackoverflow.com Dec 28 '11 at 8:02

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 1 down vote accepted

JPEG files utilize compression, and it's usually something you can customize when you save the file. JPEG compression (usually measured in percentage, 0-100) sacrifices quality for file size. A JPEG at 90-100% quality will be larger in file weight like the 2.5MB file you mentioned. Crank the compression down to 20-30% and you'll see a drastic difference in quality (blocky portions, less vibrant color, blurring) but the file size will be much smaller.

I'm not sure what type of control Paint gives you over JPEG compression, but it's almost certainly the culprit.

More sophisticated applications like Photoshop or GIMP will give you control over this when saving.

share|improve this answer
add comment

Another potential side effect of resaving the file is that the color subsampling has changed. Since our eyes are more sensitive to changes in luminance than chrominance, a way of saving space is to reduce the chrominance resolution. JPEG images have 4 basic options for subsampling of the color components:

1) No subsampling - each Y block has a corresponding Cr and Cb block to define an 8x8 block of pixels
2) Horizontal - 2 Y blocks and 1 Cr + 1 Cb define a 16x8 block of pixels
3) Vertical - 2 Y blocks and 1 Cr + 1 Cb define a 8x16 block of pixels
4) Horizontal + Vertical - 4 Y blocks and 1 Cr + 1 Cb define a 16x16 block of pixels

Subsampling is an effective way of shrinking the image size without creating blocking artifacts caused by reducing the quality level.

share|improve this answer
add comment

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.