Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
Main Photography Discussion
Setting Some Things About JPG Format Straight
Page <<first <prev 7 of 8 next>
Feb 20, 2018 22:02:09   #
shelty Loc: Medford, OR
 
selmslie wrote:
To be fair, I repeated the test by:

1. opening the first image, saving it to image 2, closing it
2. opening image 2, saving it to image 3, closing it
3. opening image 3, saving it to image 4

The result was interesting.

The total bytes grew from 620k to 695k to 721k and finally 743k. The difference in file size was all in the file header but the actual image portion of the file did not change.

So there was no actual or visible image degradation. Only a drop in efficiency in the compression process as more information was added to the file header.
To be fair, I repeated the test by: br br 1. open... (show quote)


Sorry, but I've had at least one image where the blue in the sky became graduated after spending a lot of time on it which made me pissed.

Reply
Feb 20, 2018 22:09:22   #
selmslie Loc: Fernandina Beach, FL, USA
 
shelty wrote:
Sorry, but I've had at least one image where the blue in the sky became graduated after spending a lot of time on it which made me pissed.

Posterization is not the result of opening and saving the JPEG. It happens during editing of an 8-bit file when you change the tones and colors slightly such as by applying a gradient or changing the tone mapping.

It can be avoided if you load an 8-bit file and convert it immediately to a 16-bit TIFF before you start to edit it. Then you can do all the changes you need without getting any posterization.

When you are done with the editing you can then save it as a JPEG and it will be fine.

Reply
Feb 20, 2018 23:17:52   #
stan0301 Loc: Colorado
 
I’ve taken over two million images—and to my own eyes have never seen detectable JPEG degradation—what I will say is JPEG is a printing format—RAW is a capture format—if the first thing you want to see is a processed image then shoot in JPEG—if you hope to better process than the algorithm built into your camera then shoot RAW
Stan

Reply
 
 
Feb 21, 2018 08:31:18   #
rmalarz Loc: Tempe, Arizona
 
Todd, back in 1978, using only an HP-67 calculator, I wrote a program for it that mapped 3 dimensional space to a 2 dimensional plane. Simply, a mathematical model of a camera. Data input was tedious. So, I stuck to "photographing" cubes, cylinders, etc. nothing really complicated. However, it worked quite well. It was also lots of fun doing that program. That was well before I learned anything about graphic file formats. My graphics were done on a drafting table.

A few years ago, actually 2001-02, a friend of mine and I wrote a pano stitching program that did use a lot of the graphic file format information. That was equally fun to do, as well. I still use it and it works quite well.
--Bob
Notorious T.O.D. wrote:
Bob,

I wrote CAD software for GM for about 6 years after I got out of college. I worked in the days of limited memory and even limited precision to some extent in calculations. Memory registers were so limited that I remember writing programs that what data resided in a specific register could be 5 or 6 different specific pieces of data depending upon where you were in the program code. Then there was the inter program communication where you might have 50 different programs talking with each other too. The files could get large and the instability in the hardware or operator error could lead to crashes and corrupted data files. While it was not generally my role we had several people who were very talented at reading octal dumps of the CAD data files and finding the corruption and often being able to link around the corruption and restore most of the work. Most of the data was simply linked elements that had a unique data definition. Line, arc, text, etc. and each element include a pointer to the previous element and the following element. A linked list of elements more or less to simplify. I moved on to solids modeling and 3D printing in the late 80s. Eventually after playing with AI for a while and working on the EV1 Electric car I migrated toward imaging and document management. That is where I really got into different graphic file formats and encountered the book. There are many interesting problems to solve especially in taking old paper documents and converting them to digital documents and trying to get everything to live with computer created documents in peace and harmony. Of course there is the whole base of mathematics to define and manipulate 3D objects in space and how they interact with one another. I tried to steer clear of the complex math as much as I could but you always knew it was lurking there just under the surface.

Best,
Todd
Bob, br br I wrote CAD software for GM for abou... (show quote)

Reply
Feb 21, 2018 08:44:26   #
rmalarz Loc: Tempe, Arizona
 
"It's easy to prove to yourself that this is not the case". Scotty, you must be the only person in the known universe to harbor this belief. The information regarding this open / save process on jpgs and the degradation of the file as a result is well documented.

https://petapixel.com/2010/02/04/saving-jpeg-photos-hundreds-of-times/
https://en.wikipedia.org/wiki/JPEG

As I stated in an earlier post in this thread, by using diff if you are running UNIX based systems, or downloading Windiff on Windows machines will show you the changes even one save will produce.

As I also stated, the change may not be visible, right off, but there is a change none the less. This isn't an opinionated topic. It's a matter of fact. End of story.
--Bob


selmslie wrote:
It's easy to prove to yourself that this is not the case. All you need to do is open a JPEG, save it with 100% quality and then do a series of SaveAs steps, renaming the file each time.

I did that with the attached image and each one of them ended up with exactly the same number of bytes. If there had been any degradation, the total number of bytes might have changed. I compared the actual bytes of these two files and they were all identical throughout, even after four saves.

I only tested this with 100% JPEG quality.
It's easy to prove to yourself that this is not th... (show quote)

Reply
Feb 21, 2018 09:06:58   #
selmslie Loc: Fernandina Beach, FL, USA
 
rmalarz wrote:
... As I also stated, the change may not be visible, right off, but there is a change none the less. This isn't an opinionated topic. It's a matter of fact. End of story.
--Bob

It's not the end of the story.

That's because you can't examine the result until it has been saved to your hard drive and you can't save it to your hard drive until after you load it. And you can't compare to files outside of your editor until after they have gone through both steps.

There is absolutely no way to differentiate between changes that might happen when you load a file from any that might happen as you save it.

If you load and save it 100 times, how would you know whether your editor made changes to the image during the load or during the save? You can't!

And if you can't see the "degradation" it does not exist.

One thing we know for sure is that different editors might do different things to a JPEG as you load it including some default version of sharpening or color balance. that happens as you load, not when you save.

I loaded and saved (at maximum quality) the first image above using four different programs: Capture One Pro, Picture Window Pro, Capture NX2 and PS Elements. Each new file has different size, partly because each one put different information in the EXIF. When viewing them in Windows Photo Viewer it is impossible to tell them apart. There as no visible degradation.

Nevertheless, we can cite several things that can degrade the image as a result of editing it while it is an 8-bit JPEG. Banding is the most notorious.

Reply
Feb 21, 2018 09:19:34   #
rmalarz Loc: Tempe, Arizona
 
Scotty, it is the end of the story. degradation happens when the Save is executed. Yes, one can see the difference. This is well documented. Again, end of story.

I would suggest you educate yourself on the jpg file format.

Oh, and as for editors making changes when opening a file, what good purpose would that serve? If it was known that an editor did that, who'd want to use an editor that made changes the person using that editor may or may not want?
--Bob
selmslie wrote:
It's not the end of the story.

That's because you can't examine the result until it has been saved to your hard drive and you can't save it to your hard drive until after you load it. And you can't compare to files outside of your editor until after they have gone through both steps.

There is absolutely no way to differentiate between changes that might happen when you load a file from any that might happen as you save it.

If you load and save it 100 times, how would you know whether your editor made changes to the image during the load or during the save? You can't!

And if you can't see the "degradation" it does not exist.

One thing we know for sure is that different editors might do different things to a JPEG as you load it including some default version of sharpening or color balance. that happens as you load, not when you save.

I loaded and saved (at maximum quality) the first image above using four different programs: Capture One Pro, Picture Window Pro, Capture NX2 and PS Elements. Each new file has different size, partly because each one put different information in the EXIF. When viewing them in Windows Photo Viewer it is impossible to tell them apart. There as no visible degradation.

Nevertheless, we can cite several things that can degrade the image as a result of editing it while it is an 8-bit JPEG. Banding is the most notorious.
It's not the end of the story. br br That's becau... (show quote)

Reply
 
 
Feb 21, 2018 09:34:59   #
selmslie Loc: Fernandina Beach, FL, USA
 
rmalarz wrote:
Scotty, it is the end of the story. degradation happens when the Save is executed. Yes, one can see the difference. This is well documented. Again, end of story.

I would suggest you educate yourself on the jpg file format.
--Bob

As I demponstrated earlier, loading a JPEG once and saving it four times produced four identical results. That's logical since, having loaded the file, the same loaded image was used to create all four copies.

It's also logical that loading it four times with four different editors might easily create a different source image because of differences in the four editors.

What is not logical is that anyone can state definitively that the degradation occurs only at the time the image is saved.

Attempting to prove it by loading and saving an image 500 or 600 times as was done in the first link you provided did not prove where the degradation originated. It did not demonstrate that the degradation occurred during saving alone.

It is impossible to prove that it did not happen as the image was loaded.

Reply
Feb 21, 2018 09:45:52   #
rmalarz Loc: Tempe, Arizona
 
Scotty, may I suggest that you prove this to yourself. If you are on a UNIX flavored machine use the diff command. If you are on a Windows system, download and us Windiff. You'll easily see that the file has been changed simply by using the Save command without doing any editing.

At this point, your continued argument against a known fact is drifting off to a level of absurdity.
--Bob
selmslie wrote:
As I demponstrated earlier, loading a JPEG once and saving it four times produced four identical results. That's logical since, having loaded the file, the same loaded image was used to create all four copies.

It's also logical that loading it four times with four different editors might easily create a different source image because of differences in the four editors.

What is not logical is that anyone can state definitively that the degradation occurs only at the time the image is saved.

Attempting to prove it by loading and saving an image 500 or 600 times as was done in the first link you provided did not prove where the degradation originated. It did not demonstrate that the degradation occurred during saving alone.

It is impossible to prove that it did not happen as the image was loaded.
As url=http://www.uglyhedgehog.com/t-514739-6.htm... (show quote)

Reply
Feb 21, 2018 09:58:55   #
selmslie Loc: Fernandina Beach, FL, USA
 
rmalarz wrote:
Scotty, may I suggest that you prove this to yourself. If you are on a UNIX flavored machine use the diff command. If you are on a Windows system, download and us Windiff. You'll easily see that the file has been changed simply by using the Save command without doing any editing.

At this point, your continued argument against a known fact is drifting off to a level of absurdity.
--Bob

You seem to be missing the point.

When you load an image file you are no longer looking at a JPEG or a TIFF or a PNG etc., just a bitmap on your display. What you see is the 8-bit or 10-bit representation of whatever is in memory which might be in memory as 8-bit or 16-bit depending on the mode of your editor. You can't possibly know what did or did not happen during the load process.

When you save the file, what your editor has stored in memory will get saved in an 8-bit or 16-bit file, with or without compression. Whether or not it's identical to the original is not as important as whether you feel it looks better or worse.

And if you did not make it better while it was in your editor, you and your editor are responsible for degrading it, not JPEG compression.

Reply
Feb 21, 2018 10:07:55   #
rmalarz Loc: Tempe, Arizona
 
Scotty, to put it mildly, you are attempting to push a chain up a hill.

Why are you so adamant about arguing a point that has been established since the inception of the jpg format?
--Bob
selmslie wrote:
You seem to be missing the point.

When you load an image file you are no longer looking at a JPEG or a TIFF or a PNG etc., just a bitmap on your display. What you see is the 8-bit or 10-bit representation of whatever is in memory which might be in memory as 8-bit or 16-bit depending on the mode of your editor. You can't possibly know what did or did not happen during the load process.

When you save the file, what your editor has stored in memory will get saved in an 8-bit or 16-bit file, with or without compression. Whether or not it's identical to the original is not as important as whether you feel it looks better or worse.

And if you did not make it better while it was in your editor, you and your editor are responsible for degrading it, not JPEG compression.
You seem to be missing the point. br br When you ... (show quote)

Reply
 
 
Feb 21, 2018 10:39:00   #
selmslie Loc: Fernandina Beach, FL, USA
 
rmalarz wrote:
Scotty, to put it mildly, you are attempting to push a chain up a hill.

Why are you so adamant about arguing a point that has been established since the inception of the jpg format?
--Bob

The point has been accepted as gospel without anyone giving it any critical thought.

But it has never been demonstrated that it makes any difference until you load and save a JPEG hundreds of times. Now ask yourself, who would do that just to prove a point?

JPEG compression no more significant than dropping an ice cube into a swimming pool. To make a real difference you would have to dump a truckload of ice cubes. And who would do that just to prove a point?

Some people accept that exposing to the right to record the brightest zone using 8000+ values makes the highlights better. Really? Give that some thought.

Reply
Feb 21, 2018 11:09:49   #
burkphoto Loc: High Point, NC
 
Outa here...

Reply
Feb 21, 2018 13:30:12   #
John_F Loc: Minneapolis, MN
 
Would the procedure 'manfacture' 8-bits for each original 8-bits. There must be sequence of software commands to determine which of the 8 are "1"s or are "0"s. In Photoshop the 3 bits to the left and the 3 bits to the right are combined into a formula to compute the 'new' bit. Sounds reasonable, but what if the point for the new bit sits exactly on the cutting edge of a point tack sharpness. Would the procedure massage image sharpness of focus. Just asking.


f
selmslie wrote:


It can be avoided if you load an 8-bit file and convert it immediately to a 16-bit TIFF before you start to edit it. Then you can do all the changes you need without getting any posterization.


Reply
Feb 21, 2018 13:38:21   #
bikertut Loc: Kingsville, MO
 
rmalarz wrote:
This is not going to be a "this format is better than...". It's simply going to clear up a few misconceptions bandied about on this forum regarding the jpg file format. In fact, it's only going to clear up one misconception about this file format. The jpg format is a lossy file format. This means it is going to lose data. An understanding of discrete cosine transforms would be helpful in understanding the process. However, suffice it to say, here's what this post is going to clear up.

If one opens a jpg file, looks at it, and closes it, nothing happens to the file.

If one opens a jpg file, looks at it, and saves it, it degrades.

This is just the nature of the jpg file format and the save algorithm. It's that simple. Open, Look, Close, nothing. Open, Look, Save, file changes.

Yes, one can edit a jpg. However, in addition to the edits one makes, the save process works just the same making additional changes to the file over which the photographer has no control. The only control the photographer has is how much more gets changed based on the amount of compression selected at the time of saving the file.

If you don't believe this, it's simple to prove. Using the diff function in UNIX, or the free Windows program windiff will show you the changes. Can you visually see them, perhaps yes, perhaps no. The changes are there none the less. Again, it requires nothing more than a Save to instigate a change to the file.
--Bob
This is not going to be a "this format is bet... (show quote)


My thanks to you and all who have posted here and on the other associated threads.

I am new to PP and had no idea that multiple saves might decrease the quality of the photo. Through reading here on UHH, I started shooting raw+jpeg to have better control over the final result, especially WB.

While shooting only JPEG, I shot some of my favorite photos, but the WB was not set correctly. Now I will be able to try to salvage some of those Jpeg pics, and will work strictly from a copy of my original, saving only once or twice.

Again, my Thanks to all for expanding my understanding of Raw, JPEG, and WB.

Steve

Reply
Page <<first <prev 7 of 8 next>
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.