3
\$\begingroup\$

I made some small edits on a JPG in IrfanView (cropping and color corrections), and want to save it without losing any quality, but would rather not save as a PNG as it doubles the size. If I save it as a JPG with quality set at 100%, is that the best way to do it?

I will be printing the files as large as possible so it's important that the image quality stays as high as possible, but at the same time I cannot have PNG files, they take too much space.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Could you explain why PNG files take too much space? Are you dealing with some storage/bandwidth/data limits? \$\endgroup\$
    – osullic
    May 18, 2018 at 19:30
  • 1
    \$\begingroup\$ @osullic I have a limited web connection and I'm working with a lot of image files that need to be edited and sent back and forth via email \$\endgroup\$
    – larry909
    Nov 27, 2019 at 6:40

3 Answers 3

3
\$\begingroup\$

If I save it as a JPG with the quality set at 100%, is that the best way to do it?

No...Yes, well... It depends.

(An edition added to the end)

Let's get a bit technical, but not much.

IrfanView uses a specific subtype of JPG compression called 4:2:2 that has lower quality over PhotoShop or PhotoPaint one that has a 4:4:4 one.

So if you started with a really high-quality JPG image you will lose information even at 100% quality settings.

The analysis is here.

Take an uncompressed image and put it over the already compressed one with a blend mode difference.

enter image description here

Then use levels to increase the contrast on the image.

Here is a comparison between Irfanview at max quality vs a generic one (Gimp, PhotoPaint, Photoshop gives similar results)

enter image description here


Yes.

If your image had already some 4:2:2 compression, some compression blocks are already formed, so setting it to 100% will probably re-use those blocks.

No.

A problem here is that a crop on the top or left side of the image can force the JPG algorithm to prepare some new compression blocks over the previously existing ones.

Yes.

If you do not mind, and you can not see the diference, its ok.

No.

If your target is to have a better ratio of compression, you can compress it more. Try 90%. I would not consider an IrfanView edit a "professional Edit, just a casual one so it does not matter.

No.

One more thing... If it is for print... why do you care about a heavier file? You need to try to maintain overall quality. So if it is for digital print, use PNG. If the file was CMYK use TIF.


IrfanView has a good quality compression. If you do not mind, the little loss of information, it is ok. Especially for batch crops.


Edited sometime later:

The dialog box of Irfanview has a small checkbox to disable the chroma subsampling, using then a better quality algorithm. Similar to the ones I mentioned for Ps and PhotoPaint.

enter image description here

\$\endgroup\$
1
  • 1
    \$\begingroup\$ "why do you care about a heavier file?" Because I have hundreds of files that need to be uploaded and transfered individually to a selling website and they originally were created in jpeg format but need to be cropped and re-saved. \$\endgroup\$
    – larry909
    May 24, 2018 at 0:17
2
\$\begingroup\$

If you want to save it without losing any quality, then the only way to do it is to save using a lossless image file format.

Realistically though, if you edit a JPEG file just once, and re-save as JPEG with 100% quality, then to your eyes, you will almost surely never perceive any quality loss.

I would like to also point you to some advice on impulseadventure.com about resaving images, the summary of which is that results "can be adequate if the compression algorithm is the same (ie. same quantization tables & quality settings)":
https://www.impulseadventure.com/photo/jpeg-compression.html#resaving

\$\endgroup\$
3
  • \$\begingroup\$ Thanks. I forgot to mentions that I will be printing the files as large as possible so it's important that the image quality stays as high as possible, but at the same time I cannot have PNG files, they take too much space. \$\endgroup\$
    – larry909
    May 18, 2018 at 14:14
  • \$\begingroup\$ @osulic So would your answer change? \$\endgroup\$
    – larry909
    May 18, 2018 at 19:15
  • \$\begingroup\$ @larry909 No, my answer doesn't change, regardless if your aim is to print. The aim is to minimise loss via (re-)compression, and with that in mind, the info at the link I posted is my best suggestion. \$\endgroup\$
    – osullic
    Nov 27, 2019 at 11:04
1
\$\begingroup\$

Strongly depending on your editing workflow there are lossless options! And integrated into IrfanView for years!

With SHIFT+J you can access the menu for lossless rotation and flipping/mirroring the image.

With CTRL+SHIFT+J and a preselected area, you can losslessly crop to that selection without ANY recompression done on the jpeg. That is possible, because of how jpeg functions: it is split into square blocks (most often 8x8pxl²) that are independent of each other (at least what concerns the cropping process). The area will be slightly shifted to fit to those blocks, but what is 8pxl to a 24MP image?

On the discussion of space saving: there is something in between "omg we need to desperately save space" and "what do I care, storage space costs nothing". Not only the bandwidth consideration but also the fact that the quality gain with PNG is negligible for normal photos (even though jpg might trade in some structure for compression artifacts; but we are talking about 100% jpg quality here anyway). Preserving colors for printing on the other hand could be quite beneficial for printing lifelike photos (admittately the effect might also not be obvious to many people and in many photos, but at least it's a compromise.). Printing it large results in large pixels that might look better, if they are different colors in their 2x2 squares.

I'll give PNG that: in a professional environment the workflow should be as lossless as possible; many things could be solved by money (also not necessarily abundent). But deciding on JPG options is definitely grey, not black nor white.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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