<p>JPEG is a lossy format and depends on both the 2d frequency components of the image and the user specified quality level.</p>

<p>It is possible that down-scaling an image can increase the higher frequency components and potentially result in an increase in file size, typically higher frequency components a encoded using a higher number of bits compared to lower frequency components. An example would be to imagine shrinking a checkerboard texture, the smaller it gets the more it shifts into higher frequency.  </p>

<p>It may also be possible that your original image was encoded with a low quality factor and your new image has a high quality factor so it can also gain extra bytes from that. On a more technical level this may be because of a mismatch in quantization bands leading to higher number of DCT coefficients being needed compared to the original JPEG. The quality parameter is not standardized and different applications have different ideas of what '90% quality' means.</p>

<p>Another problem is that because you are using JPEG as a source image it will introduce ringing artifacts into the image, which then need more bits to encode when trying to encode it.</p>

<p>Unfortunately there is no easy fix for this apart from reducing quality.</p>

CC BY-SA 3.0
2017-03-08T09:28:19.447Z
2017-03-08T09:50:06.233Z
2017-03-08T09:50:06.233Z
PaulHK
<p>Your original image is very low in quality and talking with experance image with such dimension should have 3MB size but your file  is already compressed using lossy data DCT algorithm, deflated upto 0.1 rate and had lost a lot of data before you download it!</p>

<p>In order to reduce the dimensions and preserving the filesize ratio, image editor program needs to extract the image and omit the lines vertically and horiznotally to reach to the desired dimensions and compress it again using a lossy data algorithm upto 10 percent but unfortunately  this time the image will loose too much data and you will unable to recognize the faces in it. So you must select a higher quality cause the file just can not tolerate to loose any data again!
This means you can not compress the extracted file as well as it was at first place.</p>

<p>Comparing JPEG encoding (after resizing the image ) with PNG which uses ZLIb algorithm(non lossy data) I believe you may recieve a better result if you save your altered dimension file in to PNG, the image has a lot of same color pixel that will let ZLIB to compress it very well. This is only true in case you have a file which is once compressed using JPEG.</p>

CC BY-SA 3.0
2017-03-09T09:57:40.637Z
There looks to be a number of rather odd things in your answer, but _"Jpg uses fast fourier transform"_ is certainly incorrect.   JPEG uses Discrete Cosine Transforms (DCTs). There are several reasons why this is a better choice than FFT but that's a little difficult to explain with limited time and the restrictions of S.O. comments :-).
Simon F
CC BY-SA 3.0
2017-03-09T12:59:10.150Z
@SimonF Thanks for your comment, I believe DCT is a special form of FFT since DCT only uses cosine waves but FFT uses both sine and cosine waves, you may set the sine expansion =0  and solve the equation using the constraint to have a DCT out of A FFT, but YES YOU ARE RIGHT the exact name of algorithm is DCT for jpeg lossy data. Thanks again
Iman Rosstin
CC BY-SA 3.0
2017-03-09T02:24:19.703Z
2017-03-09T13:04:37.927Z
2017-03-09T13:04:37.927Z
Iman Rosstin
<p>When I download this image:</p>

<p><a href="https://i.sstatic.net/zjaAF.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zjaAF.jpg" alt="https://www.ucn.edu.ni/media/2016/03/graduados-ucn-nicaragua.jpg"></a><br>
<sub>(source: <a href="https://www.ucn.edu.ni/media/2016/03/graduados-ucn-nicaragua.jpg" rel="nofollow noreferrer">ucn.edu.ni</a>)</sub>  </p>

<p>then its total size is 341,0 kB.</p>

<p>The image has a width of 2880 pixels and height of 1100 pixel and 1 X/Y resolution pixel/in.</p>

<p>I opened the image with gimp and pressed <strong>scale image</strong> and reduced the width to 1920px and auto adjusted height of 733px, and keeped the resolution as it is and used the interpolation cubic. If I now export this as a jpg with 90% quality, then the image size is 546 kB! </p>

<p>How is that possible and how can I avoid that?</p>

<image-processing>
reducing image size increases file size?
Adam
# reducing image size increases file size?

(Asked by: username_0 on 2017-03-08)

When I download this image:

[![https://www.ucn.edu.ni/media/2016/03/graduados-ucn-nicaragua.jpg](https://i.sstatic.net/zjaAF.jpg)](https://i.sstatic.net/zjaAF.jpg)  
(source: [ucn.edu.ni](https://www.ucn.edu.ni/media/2016/03/graduados-ucn-nicaragua.jpg))

then its total size is 341,0 kB.

The image has a width of 2880 pixels and height of 1100 pixel and 1 X/Y resolution pixel/in.

I opened the image with gimp and pressed **scale image** and reduced the width to 1920px and auto adjusted height of 733px, and keeped the resolution as it is and used the interpolation cubic. If I now export this as a jpg with 90% quality, then the image size is 546 kB!

How is that possible and how can I avoid that?

**Tags:** image-processing


---

## 2 answers

### Answer by username_1 on 2017-03-08. Score: 6 | Accepted answer

JPEG is a lossy format and depends on both the 2d frequency components of the image and the user specified quality level.

It is possible that down-scaling an image can increase the higher frequency components and potentially result in an increase in file size, typically higher frequency components a encoded using a higher number of bits compared to lower frequency components. An example would be to imagine shrinking a checkerboard texture, the smaller it gets the more it shifts into higher frequency.

It may also be possible that your original image was encoded with a low quality factor and your new image has a high quality factor so it can also gain extra bytes from that. On a more technical level this may be because of a mismatch in quantization bands leading to higher number of DCT coefficients being needed compared to the original JPEG. The quality parameter is not standardized and different applications have different ideas of what '90% quality' means.

Another problem is that because you are using JPEG as a source image it will introduce ringing artifacts into the image, which then need more bits to encode when trying to encode it.

Unfortunately there is no easy fix for this apart from reducing quality.


---

### Answer by username_2 on 2017-03-09. Score: 1

Your original image is very low in quality and talking with experance image with such dimension should have 3MB size but your file is already compressed using lossy data DCT algorithm, deflated upto 0.1 rate and had lost a lot of data before you download it!

In order to reduce the dimensions and preserving the filesize ratio, image editor program needs to extract the image and omit the lines vertically and horiznotally to reach to the desired dimensions and compress it again using a lossy data algorithm upto 10 percent but unfortunately this time the image will loose too much data and you will unable to recognize the faces in it. So you must select a higher quality cause the file just can not tolerate to loose any data again!
This means you can not compress the extracted file as well as it was at first place.

Comparing JPEG encoding (after resizing the image ) with PNG which uses ZLIb algorithm(non lossy data) I believe you may recieve a better result if you save your altered dimension file in to PNG, the image has a lot of same color pixel that will let ZLIB to compress it very well. This is only true in case you have a file which is once compressed using JPEG.

> **Comments:**
> **username_3**: There looks to be a number of rather odd things in your answer, but _"Jpg uses fast fourier transform"_ is certainly incorrect.   JPEG uses Discrete Cosine Transforms (DCTs). There are several reasons why this is a better choice than FFT but that's a little difficult to explain with limited time and the restrictions of S.O. comments :-).  
> **username_2**: @username_3 Thanks for your comment, I believe DCT is a special form of FFT since DCT only uses cosine waves but FFT uses both sine and cosine waves, you may set the sine expansion =0  and solve the equation using the constraint to have a DCT out of A FFT, but YES YOU ARE RIGHT the exact name of algorithm is DCT for jpeg lossy data. Thanks again  

---

