Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version Search this Thread
01-08-2016, 05:29 PM   #16
Pentaxian
mcgregni's Avatar

Join Date: Sep 2012
Location: Surrey, England
Posts: 1,800
I don't think so. 'Quality' settings are arbitrary maximum numbers (eg 10, or 12) with a scale specific to each software. 'Maximum' quality (eg 'Max', '10', '12') dos not mean no quality loss as far I understand ..... it means that the software is applying its lowest compression amount. But there will be some compression and therefore quality loss at each new 'save' command. You can minimise this process of degradation by not over-writing an 'original' camera JPEG, but choosing 'save as' to create a new copy of your adjusted image, but this new copy will have compression applied depending on the quality setting chosen, I don't believe that can be avoided with the JPEG format.

Where there is sometimes confusion is with the file management process of 'copying' a jpeg file (eg right-clicking it in windows explorer, Ctrl C, then pasting the copy somewhere. This copy would be a binary duplicate of the original and therefore no quality loss or compression has occurred.

01-08-2016, 06:27 PM   #17
Moderator
Loyal Site Supporter
BigMackCam's Avatar

Join Date: Mar 2010
Location: North East of England
Posts: 6,567
QuoteOriginally posted by mcgregni Quote
I don't think so. 'Quality' settings are arbitrary maximum numbers (eg 10, or 12) with a scale specific to each software. 'Maximum' quality (eg 'Max', '10', '12') dos not mean no quality loss as far I understand ..... it means that the software is applying its lowest compression amount. But there will be some compression and therefore quality loss at each new 'save' command. You can minimise this process of degradation by not over-writing an 'original' camera JPEG, but choosing 'save as' to create a new copy of your adjusted image, but this new copy will have compression applied depending on the quality setting chosen, I don't believe that can be avoided with the JPEG format.

Where there is sometimes confusion is with the file management process of 'copying' a jpeg file (eg right-clicking it in windows explorer, Ctrl C, then pasting the copy somewhere. This copy would be a binary duplicate of the original and therefore no quality loss or compression has occurred.
Thanks, that's exactly what I thought was the case - but not what I read earlier in the thread... Anyone else care to confirm (or otherwise) with a definitive position on this?
01-08-2016, 07:04 PM   #18
Pentaxian
CarlJF's Avatar

Join Date: Sep 2014
Location: Quebec City
Posts: 730
QuoteOriginally posted by Adam Quote
Sounds to me like you may have been shooting in RAW+ or something, since in-camera development also only applies to raw files.
This^^^

In RAW+, the camera only shows you the jpg but will apply any processing from the raw file and not reprocess the jpg. Can't tell for sure for the Z, but it's how it has been on my Pentax cameras.
01-08-2016, 07:08 PM   #19
Site Supporter
dakight's Avatar

Join Date: Sep 2014
Location: Phoenix, AZ
Photos: Albums
Posts: 1,176
QuoteOriginally posted by Dipsoid Quote
You actually will not get something much much worse. It will certainly be worse than a jpeg from a raw file, but not any worse than shooting jpeg from the camera. The way jpeg compression works, you can save a jpeg a thousand times and it won't reduce the quality of the jpeg so as long as you keep the same quality setting.
Not so, unless you are simply rewriting an unchanged file. If you change anything in the file then the image degrades when it's recompressed into jpeg. You can see the degradation in the form of artifacts and muddied details after only a few edits. Using the highest quality setting mitigates it by reducing the amount of compression and increasing file size but it's still there. Any file that will be re-edited should be saved in a lossless format such as TIFF or retained in the original raw format.

01-08-2016, 07:35 PM   #20
Veteran Member




Join Date: Dec 2006
Location: Sweden
Photos: Gallery
Posts: 316
Itīs Friday and i have drink some vine....
A raw file contains all information. A Jpeg file (highest saving) contains all you need if every settings is right and you are satisfied. The good thing with a Jpeg file is that itīs small. Itīs compressed and reduced to make a really small file so it can be perhaps 1/5 of a raw file or less, (in some edit program you can save a Jpeg lossless). So if you have a Jpeg file with colour = sunshine in the camera settings and want something really different, you donīt have the data saved for that.

I think MP3 and Jpeg was developed in the 80s to make it possible to send a picture or sound file by internet, but today itīs useful as RAW+Jpeg or take a photo of a document or so.
01-08-2016, 08:59 PM - 1 Like   #21
Site Supporter




Join Date: Jan 2010
Location: Michigan
Photos: Gallery
Posts: 2,168
I did a check of the effect of saving multiple generations of jpg

A script was made to loop , do a change, revert the change, then save the file,
repeating 100 times ( so that file 2 was made from file 1... file 100 was made from file 99 etc

Here is the master jpg , from a tiff of 35mm film scan. The jpg is of 1.7MB
https://app.box.com/s/fxllcztour5c0693uix6qu7zwge2aegx

Here is a scale change, 2:1 downsample then 1:2 upsample and save, 100 times
https://app.box.com/s/y70duna69ditgv32tknyq9lb8j5suxqw

Here is a brightness (level) change, to 50% then revert by 200% and save, 100 times
https://app.box.com/s/21ewzbkv0emq34hx8tu0g4v77nvv117d

Here is a save at 66% quality, 100 times.
(What happens is the quality/file-size is reduced on the first save then unchanged thereafter.)
https://app.box.com/s/w5pukc8w4c9mw5sy5531jf0xefq6cq4h

Here is a save only at 100% quality, 100 times with no changes
(The 100th is same as original)
https://app.box.com/s/21ewzbkv0emq34hx8tu0g4v77nvv117d
01-09-2016, 04:35 PM   #22
Forum Member




Join Date: Jan 2011
Posts: 90
Original Poster
QuoteOriginally posted by wombat2go Quote
I did a check of the effect of saving multiple generations of jpg

A script was made to loop , do a change, revert the change, then save the file,
repeating 100 times ( so that file 2 was made from file 1... file 100 was made from file 99 etc

Here is the master jpg , from a tiff of 35mm film scan. The jpg is of 1.7MB
https://app.box.com/s/fxllcztour5c0693uix6qu7zwge2aegx

Here is a scale change, 2:1 downsample then 1:2 upsample and save, 100 times
https://app.box.com/s/y70duna69ditgv32tknyq9lb8j5suxqw

Here is a brightness (level) change, to 50% then revert by 200% and save, 100 times
https://app.box.com/s/21ewzbkv0emq34hx8tu0g4v77nvv117d

Here is a save at 66% quality, 100 times.
(What happens is the quality/file-size is reduced on the first save then unchanged thereafter.)
https://app.box.com/s/w5pukc8w4c9mw5sy5531jf0xefq6cq4h

Here is a save only at 100% quality, 100 times with no changes
(The 100th is same as original)
https://app.box.com/s/21ewzbkv0emq34hx8tu0g4v77nvv117d
hey wombat2go i don't have time to look at what you did but what conclusion did you come up with?
01-09-2016, 04:40 PM   #23
Moderator
Loyal Site Supporter
BigMackCam's Avatar

Join Date: Mar 2010
Location: North East of England
Posts: 6,567
QuoteOriginally posted by wombat2go Quote
I did a check of the effect of saving multiple generations of jpg

A script was made to loop , do a change, revert the change, then save the file,
repeating 100 times ( so that file 2 was made from file 1... file 100 was made from file 99 etc

Here is the master jpg , from a tiff of 35mm film scan. The jpg is of 1.7MB
https://app.box.com/s/fxllcztour5c0693uix6qu7zwge2aegx

Here is a scale change, 2:1 downsample then 1:2 upsample and save, 100 times
https://app.box.com/s/y70duna69ditgv32tknyq9lb8j5suxqw

Here is a brightness (level) change, to 50% then revert by 200% and save, 100 times
https://app.box.com/s/21ewzbkv0emq34hx8tu0g4v77nvv117d

Here is a save at 66% quality, 100 times.
(What happens is the quality/file-size is reduced on the first save then unchanged thereafter.)
https://app.box.com/s/w5pukc8w4c9mw5sy5531jf0xefq6cq4h

Here is a save only at 100% quality, 100 times with no changes
(The 100th is same as original)
https://app.box.com/s/21ewzbkv0emq34hx8tu0g4v77nvv117d
Interesting, thanks for posting. So, for the last option - just loading, saving 100 times at 100% quality, it looks to me (based on casual viewing) like there is no degradation in quality. This is *really* useful - thank you!

Just to be clear, your process was:

1. Load original
2. Save as JPEG, 100% quality
3. Load the JPEG produced by step 2
4. Save as JPEG, 100% quality
5. Load the JPEG produced by step 4
6. .... and so on...

Is that correct?

01-09-2016, 11:11 PM   #24
Site Supporter
lenticular's Avatar

Join Date: Jun 2013
Location: Canberra
Photos: Gallery | Albums
Posts: 178
Pity the OP couldn't take a few minutes to see your efforts wombat2go. The degradation in quality is striking, certainly in the scale change/upsampled/repeat test.
01-10-2016, 10:02 AM   #25
Site Supporter




Join Date: Jan 2010
Location: Michigan
Photos: Gallery
Posts: 2,168
QuoteOriginally posted by acarlay Quote
but what conclusion did you come up with?
Well, my humble conclusions are:
Image degradation occurs when we do repeated edits from copies ( ie resampling in spatial or brightness domains), then saving the edited file, and editing the saved file again etc.

So we should always make one edit from the original master to get the final product.
I think this is the standard way and it has been mentioned many times on the PF by the experts.

When editing, we have to be careful not to commit an edit, then re do. By this I mean, for example, do not edit the color, press "OK" then go back and change the color again.
The correct way, would be >edit >undo, then redo, or , reload the original file and redo.
This applies to both spatial changes ( eg, resample to scale, crop, sharpness etc) and to brightness ( eg gamma, pull colors etc)

As far as the file type goes, I just re-ran the script using a lossless tiff
Here is the original file. It is a scan of a medium format C41 neg from the RB67 camera.
This is a 3 by 16 bit tiff with no compression, file size is 48MB
I reduced the numebr of generations to 50, and ran it on my filesystem ram to save hammering the ssd media

https://app.box.com/s/3stvy4kbm4w8ck93id524w99a7w5vrnk

Here is the 51st copied generation.
There is no degradation
https://app.box.com/s/9ldnummxohlmy8zbiy5d2foqs3u9wuz6

But here is the 51st generation after the file content has been rescaled down , the rescaled up.
The tif is butchered, even though the 51st generation is still shown as a 3 by 16 bit uncompressed tiff, by exiftool
https://app.box.com/s/ncj7zocboeq4ea5ifmkevcbi8thhn9dl
So the degradation is not due to the file type, it is due to successive changes being made to the image content itself.


Here is my script, in case anybody wants to see the method used.

#!/bin/bash
#Script for showing degradation of repeated photo edits jpg & tif. 160109
#
PR_wkdir=/dev/shm
#master file
PR_File=MultiSaveTest.tif

cd $PR_wkdir
yes|rm *$PR_File
cp RB67F400Sloan4FordT_2.tif 0$PR_File

PR_Num=0
while [ $PR_Num -le 50 ]; do

PR_Previous=$((PR_Num))
PR_Num=$((PR_Num+1))
#Uncomment to select:
# Change scale then revert
convert $PR_Previous$PR_File -resize 50% -quality 100% $PR_Num$PR_File
convert $PR_Num$PR_File -resize 200% -quality 100% $PR_Num$PR_File

#Change level then revert
#convert $PR_Previous$PR_File -level 50% -quality 100% $PR_Num$PR_File
#convert $PR_Num$PR_File -level 200% -quality 100% $PR_Num$PR_File

# No change, just save
#convert $PR_Previous$PR_File -quality 100% $PR_Num$PR_File
echo "**Scaled:"$file"_to_:"$PR_Num$PR_File


done
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
645d, 645z, camera, files, medium format
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify Pentax 645z .dng RAW files for Capture One 9 Apotessar Pentax Medium Format 24 12-23-2016 09:05 PM
Different exposure between RAW and JPEG in RAW + JPEG - possible? BigMackCam Pentax DSLR Discussion 15 10-08-2016 01:50 AM
How RAW are the raw files Vitalii General Photography 14 03-16-2015 04:32 PM
Are high ISO considerations based on jpeg or raw? justtakingpics Pentax DSLR Discussion 16 06-04-2010 08:32 AM
How can i convert Raw files (DNG) into jpeg in LR2? rustynail925 Digital Processing, Software, and Printing 48 11-17-2009 06:13 PM



All times are GMT -7. The time now is 11:56 AM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top