3

I try to convert a JPG file to PNG, but the size is still too big, about 7 MB. What's wrong? I used Microsoft Paint to convert it.

The original file is only 500 KB in JPEG, yet the PNG file is 7 MB.

What's wrong? And what should I do?

This is the jpeg file http://www71.zippyshare.com/v/96674516/file.html

1

2 Answers 2

5

slhck's answer is almost correct, but the main difference between those two formats lies in the size of the palette (number of colors) used. If the palette is relatively small converting a jpeg into png will in fact reduce its size. Another problem you have is using paint for pngs: it is well known that paint doesn't optimize its pngs. Try something like pngoptimizer to reduce the size of the pngs generated by paint.

5
  • I tried photoshop and got 3MB instead of 7MB. This is a much better answer.
    – user4951
    Apr 2, 2013 at 11:07
  • note that you can still optimize photoshop's pngs. but for a photography png will never catch up to jpeg
    – bobrobbob
    Apr 2, 2013 at 11:11
  • 2
    @JimThio If you explained more about the problem you were trying to solve I could have provided you with a more specific answer. We couldn't magically guess that reducing the bit depth or number of colors was an option for you, because that entirely depends on the situation and material used (e.g. images versus plain graphics). Please try and be more specific next time.
    – slhck
    Apr 2, 2013 at 11:12
  • PngOptimizer solved my problem (PDF was corrupt due to PNG that had been embedded) - also took PNG from 300k to 3k.
    – eddiewould
    Nov 9, 2017 at 0:24
11

Nothing's wrong: This is how it is supposed to be.

PNG images use lossless compression, whereas JPEG uses lossy compression. Lossy compression lets you reduce the file size, but it is not reversible.

When you convert from a lossy JPEG picture, which stores the data in blocks, to a PNG image, which stores pixel-by-pixel values in a bitmap, you will increase the size needed to represent the data.*

So, converting a PNG into JPEG will (usually) reduce the size, but this is not possible the other way round.

* Unless the data was easy to compress with a lossless algorithm, for example because it was an image with a flat, solid color.

2
  • Not "always increase", since PNG was designed to use a data compression algorithm on those "pixel-by-pixel values", so if the image has many large areas of the same colour (and the JPEG lossyness didn't get in the way) it is quite possible to have "the other way round".
    – C.B.
    Aug 20, 2013 at 10:57
  • 1
    You're right, I amended my answer.
    – slhck
    Aug 20, 2013 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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