Jump to content

Why does jpg export at smaller files sizes has worse quality


Recommended Posts

I'm not sure this is inevitable, or something that can be fixed.

I have a high res jpg supplied by a photographer that is 5553px x 1951 DPI 300. If I export at that size but 70% jpeg quality, everything looks fine.

However if I export at the size it will be used for (a website header) 1380 x 485, then the quality is way reduced. I don't mean it is slightly not as sharp due to fewer pixels (because you'd expect that when compared to viewing the full size but smaller).

What I mean it has jpeg compression artefacts. Is this inevitable? Is it because the jpeg artefacts are there, but more noticeable at smaller dimensions?

Thanks to anyone who can help!

 

 

Link to comment
Share on other sites

Jpeg uses a composition of multiple compression methods. One of these is using blocks of 8x8 pixels, and in many jpegs with higher compression you can spot these blocky artifacts. In is natural (law of physics) that you will see more artifacts in files with lower resolution, especially when you zoom in and compare them to a file of greater pixel size, but viewed at same viewing size (different zoom factors).

And as ashf pointed out, there are more specialized apps who do a better job in encoding jpgs.

Please keep in mind that unfortunately you can’t see which parameters where used during compression, and different apps use different interpretations of the quality parameter, so 85% quality can give different results. So you need to do some test exports with various quality values (for every output size range, e.g. 1 MPixel, 2, 4 etc) to find a setting  which wrks best for you. Or simply export as png or tiff and use another app for jpeg compression.

Link to comment
Share on other sites

The most noticeable JPEG compression artefacts occur at the edges of solid blocks of colour, so if the image includes text you will need to keep the amount of compression as low as possible.

Alfred spacer.png
Affinity Designer/Photo/Publisher for Windows 1.10 • Windows 10 Home/Pro
Affinity Photo for iPad 1.10 • Designer for iPad 1.10 • iPadOS 15.6.1 (iPad Air 2)

Link to comment
Share on other sites

Thanks everyone, very useful info to know that I should rely on Affinity. What apps are recommended?

The image doesn't have text, the artefacts are showing people's faces as its' an image of a group of performers. The artefacts show around faces:

It is the header here

https://musicasecreta.org

 

EDIT: that one has now been sharpened a bit)

Link to comment
Share on other sites

40 minutes ago, Fixx said:

I do not think there are bad artefacts in the image but it needs sharpening.

The only really noticeable artefacts are around the bolt heads in the wooden planks behind the ladies.

30 minutes ago, JimmyJack said:

Yes, I think this has less to do with compression artifacts (although there is some) and more to do with the resample method.

As @Fixx observed, the image needs sharpening. I don’t think the resampling method is responsible for the fact that the wooden background is in sharper focus than the ladies’ faces!

Alfred spacer.png
Affinity Designer/Photo/Publisher for Windows 1.10 • Windows 10 Home/Pro
Affinity Photo for iPad 1.10 • Designer for iPad 1.10 • iPadOS 15.6.1 (iPad Air 2)

Link to comment
Share on other sites

A really nice photo.

Besides sharpening - which must be done after resizing- i would use a levels adjustment and set gamma to 0.8, masked to the ladies.

Currently all seem a bit dark and don’t distinguish from dark background. I know this deviates from the „real“ image, but more light helps viewers. 
 

And for the future - if you are the photographer- try to get some more separation (depth of field blur) between main object and background

Link to comment
Share on other sites

16 hours ago, JimmyJack said:

Can we see the original?

I'll need to get permission of the owner, but I could watermark it and save as, which I presume would not lose quality (which seems to be the case, see attached)

 

16 hours ago, Alfred said:

I don’t think the resampling method is responsible for the fact that the wooden background is in sharper focus than the ladies’ faces!

In the original the ladies' are very sharp. When resizing they seem to lose a lot more sharpness than the background, presumably;y because the bg is rectangular pieces of dark wood or whatever

 

6 hours ago, NotMyFault said:

Besides sharpening - which must be done after resizing-

Aha, I am resizing during export, so will need to resize first obviously.

I'm not sure how to sharpen. Obviously I can see the sharpen in the filters menu, but I see unsharp mask (?) , Clarity (just seems to make it lighter) and High Pass (makes it grey)

I've had a go and uploaded me efforts to compare to original web image

 

6 hours ago, NotMyFault said:

i would use a levels adjustment and set gamma to 0.8, masked to the ladies.

Not sure how to mask just to the ladies as it's all one layer.

6 hours ago, NotMyFault said:

And for the future - if you are the photographer-

No, it's a professional.

 

So attached are

1 original (watermarked) EDIT: looks like the upload to the forum has compressed it and colours are less vibrant. See original linked here

2 My first cropped and resized export as on site (80% jpeg)

3 My second cropped and resized export sharpened (80% jpeg)

 

original.jpg

header resized.jpg

header resized sharpened.jpg

Link to comment
Share on other sites

4 minutes ago, Mr Lucky said:

I'm not sure how to sharpen. Obviously I can see the sharpen in the filters menu, but I see unsharp mask (?) , Clarity (just seems to make it lighter) and High Pass (makes it grey)

Briefly, Unsharp Mask masks the original with a blurred (i.e. “unsharp”) version to yield a sharper result. High Pass sharpening requires a blend mode: Overlay for high contrast (strong sharpening) or Soft Light for low contrast (subtle sharpening).

Alfred spacer.png
Affinity Designer/Photo/Publisher for Windows 1.10 • Windows 10 Home/Pro
Affinity Photo for iPad 1.10 • Designer for iPad 1.10 • iPadOS 15.6.1 (iPad Air 2)

Link to comment
Share on other sites

The original looks fine (it just needs to be opened in it's own window. In-line in the thread it gets compressed).
It's a little interesting that the photog would give you something in a lossy format (jpg) but whatever, we will work from this starting point.

The main point here (imho) is.... why create a problem to then have to unwind that very problem?
To be sure this is a significant reduction. Some loss of quality is inevitable... But the resample method is causing most of the problem.
Another method will cause less of an issue and therefore less to clean up.
That being said it looks pretty clear to me that you've used a bilinear resample. 
Here is a comparison between your second image above (bilinear I think) and Bicubic (I used jpg 80, because that's what you used).

287185282_womenmusicorigvsbiC.png.a9c131cc60514db91951294931b41986.png

You be the judge. 
And, yes I tried all the other methods: Lan Non, Lan Sep etc. I even tried the mysterious SIXTH method.... the internal rasterization.
BiC was the best in this downsize situation. Surprisingly Nearest Neighbor came in a close second.

If you want to do further processing (sharpening or whatever) go right ahead. But by all means let's not create the very hole we need to climb out of.
Let's start in the shallowest hole possible 😆.

edit:
...... and with just a touch (1.5 px) of Unsharp.

149769062_womenmusicorigvsbiCsharp1.5.png.9f79280529ec83681ca58ccaa562ad80.png

Link to comment
Share on other sites

18 hours ago, JimmyJack said:

It's a little interesting that the photog would give you something in a lossy format (jpg) but whatever,

This may just be a preview for approval before sending a master format.

What you say makes perfect sense, however when I tried it sampling down to 1200px, the differences between bilinear and bicubic were there, but nowhere near as different as yours.

18 hours ago, JimmyJack said:

Here is a comparison between your second image above (bilinear I think) and Bicubic (I used jpg 80, because that's what you used).

That looks great, way better than mine when I try bicubic. But is the jpg 80 via Affinity or something else?

header-2022-1200-bilinear.jpg.a4980134532ee22c14a23d2146c19aba.jpg

header-2022-1200-bicubic.jpg.3ef6f69ebd5ad0dbf3db6f15aa14b5c0.jpg

 

BTW when you say "1.5px of unsharp", what is the factor set to? . I found that radius 1.4px and factor 0.48 seemed reasonable.

 

 

Link to comment
Share on other sites

@Mr Lucky, resampling, up or down, can be a bit of a fickle creature. Results can bounce around with not much of a change. My advise is to try the list.
This time, going even smaller down to 1200 (...even more demanding. That' basically an 80% reduction IN DIMENSION, which means you're left with less than 5% of the original information) the clear, pun intended, winner was Lanczos Non Sep. This is more of the result I originally expected. The bicubic result before was a bit of a surprise. But I guess that's why ya gotta try.

My results from the big original:
1831750567_womenmusic1200biLvsBiCvsNonSepplus.png.0f4d9c549f259944bad4e93c0740b1a2.png

Oh, and....

10 hours ago, Mr Lucky said:

But is the jpg 80 via Affinity or something else?

Affinity. I got that from you....

On 4/11/2022 at 4:14 AM, Mr Lucky said:

2 My first cropped and resized export as on site (80% jpeg)

So the reality is we're dealing with two things here simultaneously. The resampling AND the jpg compression.

And the 1.5 px Unsharp was with the default .5 Factor and 0 Threshold.
(maybe even that's too much like you said.... up to you)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.