Save times

Here everybody can post his problems with PhotoLine
bruce1951
Mitglied
Beiträge: 413
Registriert: Sa 23 Apr 2016 17:03

Save times

Beitrag von bruce1951 »

Just curious.
Is there a reason why a 12meg jpeg takes much longer to save than a 130meg tiff?

I convert my NEFs into 16bit tiffs. 130meg. Most times I re-save as 16bit tiffs. However sometimes I just want/need a small 12meg jpeg. But saving as a jpeg takes about 3-4 times longer. ie 5-6 second rather than 1-2 seconds). I could understand the first time due to compression etc. But even saving a jpeg as a jpeg takes longer.

bruce
bkh
Betatester
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: Save times

Beitrag von bkh »

bruce1951 hat geschrieben: Mi 03 Jan 2018 11:44 I convert my NEFs into 16bit tiffs. 130meg. Most times I re-save as 16bit tiffs. However sometimes I just want/need a small 12meg jpeg. But saving as a jpeg takes about 3-4 times longer. ie 5-6 second rather than 1-2 seconds). I could understand the first time due to compression etc. But even saving a jpeg as a jpeg takes longer.
You mean re-saving an umodified jpeg (e.g., under a different name) takes longer? That sounds unusual.

Do you save to the same disk? What CPU do you use? The ratio between compression time and save time is very much disk and cpu dependant.I guess that you save uncompressed tiff (makes sense for 16 bit tiffs)? Then this only involves disk writes.

Btw., your JPEGs seem to be very large – usually it doesn't make much sense to increase the jpeg quality beyond 90. "High quality" (i.e., no colour subsampling) normally isn't very useful for photos, either.

Cheers

Burkhard.
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2161
Registriert: Sa 12 Mai 2012 21:38

Re: Save times

Beitrag von Herbert123 »

bruce1951 hat geschrieben: Mi 03 Jan 2018 11:44 Just curious.
Is there a reason why a 12meg jpeg takes much longer to save than a 130meg tiff?

I convert my NEFs into 16bit tiffs. 130meg. Most times I re-save as 16bit tiffs. However sometimes I just want/need a small 12meg jpeg. But saving as a jpeg takes about 3-4 times longer. ie 5-6 second rather than 1-2 seconds). I could understand the first time due to compression etc. But even saving a jpeg as a jpeg takes longer.

bruce
Simple. A jpeg uses lossy compression, and at a high quality the calculations take more time than a tiff. Resaving the same jpg doesn't mean those calculations are magically prevented - they are calculated again and again. That is why resaving the same jpg many times will result in some image degradation.

I compared jpeg loading and saving times in PhotoLine and Photoshop 2017, and PhotoLine is a bit faster. Tiff is always faster, with or without lossless compression. Without compression it will save as fast as your storage allows.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
bkh
Betatester
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: Save times

Beitrag von bkh »

Herbert123 hat geschrieben: Mi 03 Jan 2018 18:42 Resaving the same jpg doesn't mean those calculations are magically prevented - they are calculated again and again. That is why resaving the same jpg many times will result in some image degradation.
Not quite true. Firstly, PL is quite clever in keeping compressed JPEG data and reusing it, instead of re-compressing, when possible. In particular, if you open a jpeg file and re-save it without changes, it's not re-compressed, afaik.

In general, opening and re-saving with the same compression settings (and the same jpeg engine) may slightly degrade a JPEG file a tiny bit more, but the process quickly stabilises if you repeat the procedure. That's, of course, only true if you don't modify the file – repeated cropping, tone curve changes, sharpening, … will degrade the image quality, compared to lossless compression.

Cheers

Burkhard.
Benutzeravatar
Hoogo
Betatester
Beiträge: 4024
Registriert: So 03 Jul 2005 13:35
Wohnort: Mülheim/Ruhr

Re: Save times

Beitrag von Hoogo »

bruce1951 hat geschrieben: Mi 03 Jan 2018 11:44 Just curious.
Is there a reason why a 12meg jpeg takes much longer to save than a 130meg tiff?

I convert my NEFs into 16bit tiffs. 130meg. Most times I re-save as 16bit tiffs. However sometimes I just want/need a small 12meg jpeg. But saving as a jpeg takes about 3-4 times longer. ie 5-6 second rather than 1-2 seconds). I could understand the first time due to compression etc. But even saving a jpeg as a jpeg takes longer.

bruce
For a test I made a picture of 15 MPixels, and used Alt+J to compress it. Each tap on the quality slider took ~4 seconds on an I5. I'm not 100% sure, but that really seems to take to much time... In my memory it seems that compressing 6 MPixel 10 years ago was "instantly", but I could be wrong about that.

On the other hand: Faststone takes 6 seconds for the same task.
But baseline instead of progressive speeds up a lot!!!
Herbert123 hat geschrieben: Mi 03 Jan 2018 18:42Simple. A jpeg uses lossy compression, and at a high quality the calculations take more time than a tiff.
PL has the option "High quality" to disable color subsampling. With subsampling the packing times could roughly be halved.
But the "real" quality settings, the slider, won't affect the packing time very much.
To me it seems that "progressive" is currently the most expensive option, probably a matter of memory cache.
Herbert123 hat geschrieben: Mi 03 Jan 2018 18:42Resaving the same jpg doesn't mean those calculations are magically prevented - they are calculated again and again. That is why resaving the same jpg many times will result in some image degradation.
Not necessarily...
First (as Burkhard meanwhile mentioned) PL keeps a copy of all the jpg data. You can see it in the layer attributes. This copy is kept as long as the layer is unchanged, and it is used when you save in the same or better quality with same basic settings.
Jpeg data.png
Even if it was saved repeatedly without this trick: The degradation by repeated saves is more complicated.
No changes to the quality settings? No color subsampling ("High Quality")? Then the result is stable after 2 or even 1 save.
Subsampling? The it depends on the program... With most simple subsampling the process would be just as stable, but the prettier ones will degrade.
Baseline/progressive? Doesn't matter.
Changes to the quality settings? Quite likely, but who would do that after every save?
Different program? Also quite likely, unless they use the same lib.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
bruce1951
Mitglied
Beiträge: 413
Registriert: Sa 23 Apr 2016 17:03

Re: Save times

Beitrag von bruce1951 »

Thanks guys.
Some answers. I shoot 14bit NEF's. Convert them to 16bit tiffs. (30meg NEF to 130meg tiff using Nikons NX-D. 6000x4000 images).
I always work with 16 bit tiffs.

But over Christmas I shot a lot of family stuff. Rather than chewing up disc space with tiffs I decided to convert the NEF's to jpegs using NX-D. Those jpegs actually worked out at 20-22 meg each. I then opened the jpegs in PL. Run then all through a short action. (Curves, Camera quality, USM etc). Once done in PL the jpegs finished at around 30meg each!! Re-saving those jpegs took, on average, about 5-6 seconds each. If I had done the exact same thing with a tiff it would have taken one 1-2 seconds each.

End result is that I saved disc space but lost a lot of time.

My guess it that it is in the compression of the jpeg,
No big deal. It was just that I was surprised at how much longer it took to save a jpeg. (Computer should be irrelevant as both jpeg and tiffs were being saved on the same computer/system).

bruce