Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
Main Photography Discussion
Yes - you can save a JPG without degrading.
Page 1 of 8 next> last>>
Feb 21, 2018 07:11:44   #
Delderby Loc: Derby UK
 
There has been discussion here in the last two days, with the consensus of opinion being as follows:
If you save a JPG after opening and editing, it will be degraded because it is a lossy format.
That it will deteriorate rapidly the more times you repeat the above step.
That you cannot save without changing something, as the "save" tab will be greyed out.
Some said merely opening and closing will degrade the JPG.

My favourite viewer is XnView. It is a viewing and file management program that has some basic editing facilities and is free to a good home.
In XnView it is possible to open and then save a JPG without any editing or changing of the file. The prog first asks "The file already exists - do you want to overwrite it"?
Using Xnview, I opened a JPG file, saved and closed, then repeated the process 20 times. the pixel size was 3056x4584. After the opening, saving and closing session, the file size had not altered, remaining at 3056x4584. I examined the file at 100% and found no evidence of degradation.
I am aware that you cannot do this with any prog, but you can with XnView.

Reply
Feb 21, 2018 07:43:09   #
bmike101 Loc: Gainesville, Florida
 
don't look at the size of the picture (3056x4584) but rather the size of the file. (byte/bit size)

Reply
Feb 21, 2018 08:09:44   #
CHG_CANON Loc: the Windy City
 
Let's make sure you're running the experiment as intended. You should be opening the newly saved file and then saving that file as still another new file and repeating. Say you started with File-01 and then saved as File-02. It's the new File-02 that you'll open and save to File-03 and so forth until you get to File-21.

As BMike101 correctly pointed out, it's not the pixel size that changes. Rather, the file size with gets smaller each time the JPEG compression is executed.

If you use a file viewer, the File-01 to File-21 process with have the same file size at the end as the beginning. Someone with Win10 can use Photos to run the same experiment. If you open a JPG with Photos as a viewer, you can do a "File Save As" for the test above. At the end File-21 will be the same size / same file as File-01.

But, if you use command "Edit in Photos", you invoke the JPEG compression when saving and creating the new File-02. You'll have a different file size for every File-02 thru File-21. Then, open File-01 and File-21 and see if you can visually see a difference.

Reply
 
 
Feb 21, 2018 08:09:45   #
rook2c4 Loc: Philadelphia, PA USA
 
Although related to each other, pixel size and file size are not really interchangeable. Simply viewing a JPEG file without saving should not effect the file, but saving it may do so - especially if it is saved to a less than 100% compression rate.

Reply
Feb 21, 2018 08:28:08   #
Country Boy Loc: Beckley, WV
 
I have to admit I don't know the math but if a photo is made up of a certain number of pixels and you reduce the file size, did you not reduce the pixel count. I have a program I use to reduce file size when needed and it will reduce the actual size by almost 50% however I can see no physical change in the photo. If something is compressed, it can normally be uncompressed to restore it but if it is reduced, it just has a portioned removed or deleted. Smoke and mirrors?

Reply
Feb 21, 2018 08:34:11   #
CHG_CANON Loc: the Windy City
 
Country Boy wrote:
I have to admit I don't know the math but if a photo is made up of a certain number of pixels and you reduce the file size, did you not reduce the pixel count. I have a program I use to reduce file size when needed and it will reduce the actual size by almost 50% however I can see no physical change in the photo. If something is compressed, it can normally be uncompressed to restore it but if it is reduced, it just has a portioned removed or deleted. Smoke and mirrors?

See the comment directly above yours, specifically: pixel size and file size are not really interchangeable.

If interested in more of the details, begin with this wiki entry: http://en.wikipedia.org/wiki/JPEG . Scroll down to topic "downsampling" to begin to understand the concept of JPEG compression, a 1-way operation.

Reply
Feb 21, 2018 08:53:46   #
Rongnongno Loc: FL
 
Delderby wrote:
.../...

http://www.uglyhedgehog.com/t-499172-1.html

Reply
 
 
Feb 21, 2018 08:55:47   #
Country Boy Loc: Beckley, WV
 
Thanks, I will check it out, I find it interesting and would like to understand how you can affect one without the other. I have not heard of 1-way compression or understand it but it is an interesting concept.

Reply
Feb 21, 2018 09:31:26   #
chaman
 
Delderby wrote:
There has been discussion here in the last two days, with the consensus of opinion being as follows:
If you save a JPG after opening and editing, it will be degraded because it is a lossy format.
That it will deteriorate rapidly the more times you repeat the above step.
That you cannot save without changing something, as the "save" tab will be greyed out.
Some said merely opening and closing will degrade the JPG.

My favourite viewer is XnView. It is a viewing and file management program that has some basic editing facilities and is free to a good home.
In XnView it is possible to open and then save a JPG without any editing or changing of the file. The prog first asks "The file already exists - do you want to overwrite it"?
Using Xnview, I opened a JPG file, saved and closed, then repeated the process 20 times. the pixel size was 3056x4584. After the opening, saving and closing session, the file size had not altered, remaining at 3056x4584. I examined the file at 100% and found no evidence of degradation.
I am aware that you cannot do this with any prog, but you can with XnView.
There has been discussion here in the last two day... (show quote)


WRONG. If you saved the file it WILL degrade. Your "experiment" is flawed by your lack of knowledge about how JPG files behave. You proved that at least.

Reply
Feb 21, 2018 09:35:37   #
CHG_CANON Loc: the Windy City
 
chaman wrote:
WRONG. If you saved the file it WILL degrade. Your "experiment" is flawed by your lack of knowledge about how JPG files behave. You proved that at least.

Oscar - you might want to consider the specific action being performed. You can make copies of an existing file with ZERO impact to the new copy file. This can be done at the operating system or via an image viewer. I think our OP used the viewer option and "saved" the new file from the viewer. That is a different "save" than using an editor that performs a compression of the internal contents of the JPEG image. I suggested earlier a more exact testing process as it's unclear what was being tested / demonstrated by our OP ...

Reply
Feb 21, 2018 09:39:09   #
Country Boy Loc: Beckley, WV
 
Chg Cannon & Rongnongno, Reviewed both links and thanks, that helps. I now know a little of what you guys know a lot about. In the communication world, every time I dealt with compressed data was on the transmit side with the expectation of decompression on the receiving side. This is both a new and an interesting topic for me. Thanks!

Reply
 
 
Feb 21, 2018 09:51:14   #
CHG_CANON Loc: the Windy City
 
Country Boy wrote:
Chg Cannon & Rongnongno, Reviewed both links and thanks, that helps. I now know a little of what you guys know a lot about. In the communication world, every time I dealt with compressed data was on the transmit side with the expectation of decompression on the receiving side. This is both a new and an interesting topic for me. Thanks!

Cool! It's been a topic of the day for the past few days with each day including clearly inaccurate statements and a few others that reach a conclusion without clearly explaining the testing method. Today's OP being another one of these unclear examples ...

Reply
Feb 21, 2018 10:09:16   #
chaman
 
CHG_CANON wrote:
Oscar - you might want to consider the specific action being performed. You can make copies of an existing file with ZERO impact to the new copy file. This can be done at the operating system or via an image viewer. I think our OP used the viewer option and "saved" the new file from the viewer. That is a different "save" than using an editor that performs a compression of the internal contents of the JPEG image. I suggested earlier a more exact testing process as it's unclear what was being tested / demonstrated by our OP ...
Oscar - you might want to consider the u specific... (show quote)


Making a copy is not the same as saving.....isnt?

Reply
Feb 21, 2018 10:10:45   #
Delderby Loc: Derby UK
 
CHG_CANON wrote:
Let's make sure you're running the experiment as intended. You should be opening the newly saved file and then saving that file as still another new file and repeating. Say you started with File-01 and then saved as File-02. It's the new File-02 that you'll open and save to File-03 and so forth until you get to File-21.

As BMike101 correctly pointed out, it's not the pixel size that changes. Rather, the file size with gets smaller each time the JPEG compression is executed.

If you use a file viewer, the File-01 to File-21 process with have the same file size at the end as the beginning. Someone with Win10 can use Photos to run the same experiment. If you open a JPG with Photos as a viewer, you can do a "File Save As" for the test above. At the end File-21 will be the same size / same file as File-01.

But, if you use command "Edit in Photos", you invoke the JPEG compression when saving and creating the new File-02. You'll have a different file size for every File-02 thru File-21. Then, open File-01 and File-21 and see if you can visually see a difference.
Let's make sure you're running the experiment as i... (show quote)


To all interested posters.
My topic was to demonstrate that it is possible to open and save a JPG, whether or not in a viewer or editor, wthout degrading.
However, I have here chosen a photo (JPG) and, using XnView, have opened and "saved as" ten times. The first "save as" (P1687a1) and the tenth "save as" (P1687a10) are attached herewith - both files are 1.62 mb. I have compared them side-by side at 100% using PhotoFiltre. I see no degradation. BTW - the pic was chosen, not for it's quality, but because it is good for the demo.


(Download)


(Download)

Reply
Feb 21, 2018 10:19:56   #
CHG_CANON Loc: the Windy City
 
Delderby wrote:
To all interested posters.
My topic was to demonstrate that it is possible to open and save a JPG, whether or not in a viewer or editor, wthout degrading.
However, I have here chosen a photo (JPG) and, using XnView, have opened and "saved as" ten times. The first "save as" (P1687a1) and the tenth "save as" (P1687a10) are attached herewith - both files are 1.62 mb. I have compared them side-by side at 100% using PhotoFiltre. I see no degradation. BTW - the pic was chosen, not for it's quality, but because it is good for the demo.
To all interested posters. br My topic was to demo... (show quote)


My topic was to demonstrate that it is possible to open and save a JPG, whether or not in a viewer or editor, wthout degrading.

Unfortunately, you've leapt to the wrong conclusion ... Your viewer is not re-compressing the new files in your Save-As action. Looking at the Xnview website, I suggest repeating your demonstration using their XnConvert tool. Report the results then for file P1687a10-A. Then, your conclusion about a viewer is accurate, but an editor is inaccurate.

Reply
Page 1 of 8 next> last>>
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
Main Photography Discussion
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.