Jump to content

Recommended Posts

Posted

I know about lossless formats, and and lossy formats.. but here is something i experienced and no one really can help me understand. 

 

I had to do some cropping and converting to PNG format for some photos i wanted to have printed by Mpix

 

I had a jpeg file scan of a 35mm negative. The file size was 17.8 MB and the image size in pixels was roughly 5000x3200.  I did a crop of 2000x2500 and the file when converted to PNG was an interesting 53.8 MB.

I had nikon NEF  RAW images that when cropped to 2750x3500 pixels, the resulting PNG files were 98-101 MB. 

 

Can anyone explain how this actually works, because im only running a 1 TB drive.

Posted

PNG is a lossless compression. Saving photos as PNG will inevitably result in huge files, comparable to TIFF with LZW compression. The PNG format was primarily designed for online graphics, logos, symbols, pictograms etc., where it can make more efficient use of the lossless compression algorithm.

MacBookAir 15": MacOS Sonoma > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 18 > Affinity v2

Posted
38 minutes ago, loukash said:

PNG is a lossless compression. Saving photos as PNG will inevitably result in huge files, comparable to TIFF with LZW compression.

LZW is also lossless compression, so I'm not quite sure what you mean there.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5

Posted
51 minutes ago, loukash said:

Saving photos as PNG will inevitably result in huge files, comparable to TIFF with LZW compression.

I just tried exporting a picture as PNG and TIFF (with LZW compression) and the PNG fie was smaller than the TIF, so I'm not sure why you say that PNG with "invariably" be "huge" compared with TIFF!

Acer XC-895 Core i5-10400 Hexa-core 2.90 GHz : 32GB RAM : Intel UHD Graphics 630 – Windows 11 Home - Affinity Publisher, Photo & Designer, v2
(As I am a Windows user, any answers/comments I contribute may not apply to Mac or iPad.)

Posted
9 hours ago, walt.farrell said:

I'm not quite sure what you mean there.

That saving an edited JPEG as PNG will result in files being magnitudes larger than the original, because PNG is lossless compression, and thus less efficient than the lossy JPEG compression.

9 hours ago, PaulEC said:

I just tried exporting a picture as PNG and TIFF (with LZW compression) and the PNG fie was smaller than the TIF, so I'm not sure why you say that PNG with "invariably" be "huge" compared with TIFF!

Depending on the source material, the PNG compression can be more efficient than the somewhat "antique" LZW compression in TIFF.
TIFF with LZW compression has several benefits though, like support for layers, CMYK color space, better IPTC/XMP integration, as well as the backwards compability compared to TIFF with ZIP compression.

As for the differences in size, I just picked up a random photo from an iPhone, saved as JPEG, 3.3 MB
Exported to PNG: 14 MB
Exported to TIFF+LZW: 16.5 MB

14 and 16.5 MB, that's what I mean by "huge" compared to 3.3 MB JPEG.
Then, in relation to the above comparison, 14 and 16.5 are still comparable in size.

So much for the semantics. ;) 
Hope that helps.

~~~

Anyway.

@thomB, if file size matters (and it surely does), then export as JPEG "Best Quality" = "Quality: 100"
Taking my above example photo of originally 3.3 MB, a "Best Quality" JPEG will be about 6.3 MB, i.e. less than a half of what a PNG or compressed TIFF export would be.
At this setting and amount of pixels, a mere mortal won't be able to see any difference to PNG or TIFF.
Personally, I can barely see any difference even at the "JPEG High Quality" preset.

But as noted, it always depends on the source subject. There is no universal "fits-all" settings, one has to train the feeling for the subject so that eventually you'll be able to predict which compression or even format suits the final image the best.

MacBookAir 15": MacOS Sonoma > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 18 > Affinity v2

Posted

The amount of noise heavily impacts the size of the png (maybe also other file formats, i don't know. I usually use png).

The resolution isn't always the biggest factor of the file size. A 10000x10000 picture of just one color is only a little over 310kb when exported as PNG. Add 5% of monogramatic gausian noise and it's almost 67MB. Non monogramatic makes it 127MB. All same resolution. just different pixels in it.

Windows Desktop user

Posted
1 hour ago, loukash said:

That saving an edited JPEG as PNG will result in files being magnitudes larger than the original, because PNG is lossless compression, and thus less efficient than the lossy JPEG compression.

I can agree with that, but was confused because you seemed to be comparing PNG compression and TIFF compression, which are both lossless. Thanks.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5

Posted
1 hour ago, loukash said:

if file size matters (and it surely does), then export as JPEG "Best Quality" = "Quality: 100"

I just opened a stock landscape photo (using Pexels inside of Affinity Photo) which measured 5,279 x 3,519 pixels. No edits were made at all. I exported the photo to various file formats.

TIFF (16 bit) with LZW Compression - 69.6 MB
PNG - 41.6 MB
JPG (100% Quality) - 21.9 MB
JPG (98% Quality) - 14.7 MB

The TIFF and PNG images are 16 bit files, and the JPG's are of necessity 8 bit files. Obviously the TIFF and PNG files are substantially larger, but also contain more information. Personally, I use TIFF's only as "interchange" files, such as when using a non-Affinity Raw developer and subsequently doing further editing in Affinity Photo. I use PNG files when I need to maintain transparency. I'll also use larger files (TIFF, PNG, PDF, or native .afphoto) when printing.

Otherwise, I rely primarily on JPG's. I've always found it interesting, though, that a huge amount of file size saving can be obtained by exporting JPG at 98% or so, instead of at 100%. The difference in perceptible quality (to me, at least) is nil; the difference in file size is considerable.

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023); 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 18

Posted
30 minutes ago, smadell said:

The TIFF and PNG images are 16 bit files

At 16 bpc, PNG compression is obviously more efficent than the good ole LZW. That's not necessarily surprising. As noted, a benefit of LZW compared to the more efficient ZIP compression is its backward compatibility.

37 minutes ago, smadell said:

the TIFF and PNG files are substantially larger, but also contain more information

If you were previously only "upsampling" from 8 bpc to 16 bpc without making any edits, then the extra 8 bpc will be just "padding", without an immediate benefit, and thus waste of storage space.

MacBookAir 15": MacOS Sonoma > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 18 > Affinity v2

Posted
1 hour ago, smadell said:

TIFF (16 bit) with LZW Compression - 69.6 MB

Previous discussions have pointed out that LZW (at least as used for TIFF) and 16-bit color depth don't work well together. 8-bit would probably give much different results.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.5

Posted
1 hour ago, smadell said:

TIFF and PNG files are substantially larger, but also contain more information.

I guess I misspoke in this instance. The TIFF and PNG files, having been upscaled from 8 bit files, may not contain more information although they do contain more data.

The real reason for my post was to compare the file sizes in JPG at 100% and 98%, since the suggestion had been made to export at 100% JPG quality. The OP was concerned about large file sizes, given his limited storage capability. I suggested a way to attain smaller file size without (much) loss of perceptible quality.

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023); 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 18

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...
×
×
  • Create New...

Important Information

Terms of Use | 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.