Why is this .jpg so big

So I have a whole group of pictures of similar sizes and content.  Most are about 3 or 4 Mb.  This file(attached) is 24 Mb and I'm trying to figure out why?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I saved the image with some compression and got it down to 4MB so maybe the author of the image created a jpeg with no compression
It is large because of the file dimensions and the content.

If I create a very large image (same dimensions and fill it up with only black) the image will be small because JPEG knows how to compress that image.

Now, if I add in some detail such as a piece of candy it will increase size again.  Your file has LOTS of detail in the form of small "hairs" or "dust particles" which makes Jpeg compression less useful in this scenario.  (Although the sky appears white, it actually is composed of small particles if you zoom in.  Tis is one reason why the file size is large).

If you have Photoshop I recommend using the Save for Web feature to compress the image to a usable size.  It really depends on what your needs are for.
The image has 490 dpi - which is a lot for computer based images.  You would have this kind of detail for large print images (e.g. photo printing)
On a pc 96  dpi is enough - you wouldn't discern any difference on your monitor between 490 and 96
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

hrolsonsAuthor Commented:
But I have a bunch of others that are very similar to this one.  Same size, quality and complexity.  I'll attach 1 that is only 3 Mb.  I know I can make the big one smaller, I just don't understand why it's so big in the first place.
hrolsonsAuthor Commented:
Right, these are for printing large pictures, not for viewing on a computer.
Your second image is 96dpi, like I said above the first image is 490dpi
This means the second image is a fifth of the size based purely on how many pixels per inch the picture is using. Actually less than a fifth but the image is smaller in dimensions and has repeating black areas that can be compressed considerably.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Paul SauvéRetiredCommented:
The resolution of the image is 490 x 490 pixels/inch and is 12.235" x 8.163".

If you reduce the number of ppi to, say, 150 x 150 and keep the same size, you will reduce the image size by a factor of about 3.25 or to about 7.3 Mb!

If you are planning to print the image, I think that 72 ppi should be OK (this is the resolution you get with digital cameras).
Your first image has much more "dots per inch" or pixels in a given area.  Not only that but it has a higher resolution as well.
Any reason to repeat what I have already said?
hrolsonsAuthor Commented:
So now I'm officially confused.

The first image is 5995x4000 pixels and 490 ppi.

The second is 5580x3720 pixels and 72 ppi.

Wouldn't the similar dimensions result in a similar ppi?
No, dpi is nothing to do with dimensions - It is to do with how many pixels occupy each inch.
Think SD TV's and HD TV's - they can be similar sizes but the HD tv has 5 times the amount of pixels giving you the clearer image
For each inch of the HD tv there is 5 times the number of pixels - it doesn't change the size of the screen.
David BruggeCommented:
I would like to clear something up for the record for anyone else that seeks out this question for a similar problem.

Image pixel per inch is one of the biggest misunderstood aspect of web graphics. Clearly put, ppi has no impact on the presentation of images on the web. Web browsers completely ignore ppi settings (sometimes referred to as dpi settings).

What matters is the total with and height in pixels, that is all. A 400 px image will appear as half the width of an 800 px regardless of any ppi setting it was saved with.

Where the ppi is used, is when the image is printed. At that time, the printer looks at the ppi to calculate how large to print the image. If the ppi is higher than the resolution of the printer (very unlikely) the printer throws the extra pixels away. If the ppi of the image is lower than the resolution of the printer, the printer fills in the space between pixels with its best guess.

Most people know that the quality of a jpg image deteriorates each time it is saved. What most people don't know is that while the quality decreases, the file size can actually increase. This is because of what activematx pointed out above. The more detail in an image, the less the jpeg algorithm can compress it.

When a jpeg is saved, jpeg artifacts are introduced. The higher the level of compression, the more artifacts. What started out as a white mottled sky in the test.jpg image above, quickly filled up with artifacts when it was saved. You can see the artifacts here in this detail...
detail of test.jpg showing jpg artifacts in sky areaThe next time the file is saved, it sees the artifacts as image detail. What was once an image of smooth gradients (something the jpeg algorithm compresses easily), now was filled with a complex pattern.

To compensate for this, most people will lower the quality setting to bring the file size back closer to the original, but in so doing, add even more artifacts.

I suspect that the test.jpg was originally saved with a low quality setting and then re-saved with a high quality setting in order not to degrade the image any more than was necessary.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Images and Photos

From novice to tech pro — start learning today.