Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
Main Photography Discussion
PNG Files
Page 1 of 5 next> last>>
Apr 28, 2016 15:30:50   #
Linckinn Loc: Okatie, SC and Edgartown, MA
 
Suppose one converted RAW files from a manufacturer, say NEF's from Nikon, into PNG files, and then imported the PNG files into software for post processing. Can one then edit/process with the same results as if processing a RAW file? My understanding is "yes", since the PNG is lossless, but I would like to know if I that is not correct.

Thanks, as always.

Reply
Apr 28, 2016 15:47:22   #
Peterff Loc: O'er The Hills and Far Away, in Themyscira.
 
Linckinn wrote:
Suppose one converted RAW files from a manufacturer, say NEF's from Nikon, into PNG files, and then imported the PNG files into software for post processing. Can one then edit/process with the same results as if processing a RAW file? My understanding is "yes", since the PNG is lossless, but I would like to know if I that is not correct.

Thanks, as always.


It is not correct. Lossless generally refers to compression, so PNG has advantages over the widely adopted JPEG standard, although a lossless JPEG standard is available but not widely used.

PNG is more flexible than JPEG and can support 16bit images as opposed to JPEG 8 bit limitations, but the lossless description refers to compression, not to the amount of information in the standard. Raw files contain information that may not be included in a PNG file and would thus be discarded and therefore lost in translation.

A good example might be white balance information. That can be modified easily with raw files, but I expect it is baked into a PNG file, and thus the ability to simply apply a different color temperature has been lost in the conversion.

I'm not sure that is 100% accurate, but I think it explains the principle and hope it is helpful.

If you want a camera vendor independent format that preserves most raw information then DNG may be the best option, but it is not yet a formal standard. It is open, but still proprietary to Adobe. It has been proposed as a standard, but not yet formally adopted.

Reply
Apr 28, 2016 15:55:54   #
Linckinn Loc: Okatie, SC and Edgartown, MA
 
Thank you.

I think I was confusing PNG with DNG.

Reply
 
 
Apr 28, 2016 16:20:33   #
Apaflo Loc: Anchorage, Alaska
 
Linckinn wrote:
Suppose one converted RAW files from a manufacturer, say NEF's from Nikon, into PNG files, and then imported the PNG files into software for post processing. Can one then edit/process with the same results as if processing a RAW file? My understanding is "yes", since the PNG is lossless, but I would like to know if I that is not correct.

Thanks, as always.

The short answer is a simple No!

The reason isn't that simple though. RAW files do not contain image data, but rather have the raw sensor data from which an image can be made. There are no RGB channels, there is no such thing as color balance or a color profile. The raw data cannot be sharpened, and neither brightness nor contrast can be changed. It cannot even be viewed as an image.

When we speak of "converting" a RAW file, it means conversion of the data from one kind of data to another kind of data. Very different information. Instead of sensor data it becomes pixel data.

It's like having a lumber yard instead of a house. Or a full pantry instead of a bowl of soup. One is used to make the other, but they aren't defining the same things. The raw sensor data can be converted, quite correctly, to a nearly infinite number of different images. It does not define just one image.

But after the RAW file is converted to an image, the new data is fixed as one single image. If it is displayed correctly (on a perfect monitor) it will show just one image and it won't make any difference if that was saved to a file encoded as a GIF, a TIFF, a JPEG or a PNG. All of those are just ways to store the same image data. When the computer reads the image file it converts that data format to the format it needs to display the image. Regardless of which one it was to start with, ideally the displayed data is exactly the same. And there is only one image defined at the output of the RAW conversion.

Reply
Apr 28, 2016 16:32:04   #
TriX Loc: Raleigh, NC
 
PNG image files can have transparent backgrounds, so they're one option for adding signature/copywrite information to photos if you're not doing that via layers in PS or PSE.

Reply
Apr 28, 2016 16:49:01   #
Peterff Loc: O'er The Hills and Far Away, in Themyscira.
 
Apaflo wrote:
The reason isn't that simple though. RAW files do not contain image data, but rather have the raw sensor data from which an image can be made.


That is a philosophical definition that many disagree with. Sensor data from a camera is still image data - it isn't audio data or weather data - it is just in a less processed state than pixel level image data.

When a company such as Canon describes a file as a 'raw image file' then that highlights the discrepancy in philosophical definitions.

If the desired outcome is a hot meal it can come from a package and placed in a microwave, come out of a can and be heated up on a stove, or be prepared from fresh raw ingredients. They are all variants of food.

Some are faster and more convenient and some yield substantially better and more varied results. They are all still food.

A computer file is just a computer file, and image related information is image data regardless of how little or how much it is processed.

A JPEG, TIFF, or PNG is no more or less an image file than a raw NEF, .CR2 or DNG file, they are just at different stages of processing.

Reply
Apr 28, 2016 16:49:05   #
Rongnongno Loc: FL
 
Linckinn wrote:
Suppose one converted RAW files from a manufacturer, say NEF's from Nikon, into PNG files, and then imported the PNG files into software for post processing. Can one then edit/process with the same results as if processing a RAW file? My understanding is "yes", since the PNG is lossless, but I would like to know if I that is not correct.

Thanks, as always.

Yes and no as the PNG standard depends more on the software used than its limitations. This is not for nothing that PNG is used in scientific labs using detailed imagery that we can only dream of.

Now as we see and use in photography, the 16 bit option is available but this means the file will be really large. The WB is easily correctable*. If you need compliance with other software you should look at TIFF more than anything else, in my opinion.

-----
* WB is basically a useless search for 'perfection' in my opinion.

Reply
 
 
Apr 28, 2016 17:14:17   #
Apaflo Loc: Anchorage, Alaska
 
Peterff wrote:
That is a philosophical definition that many disagree with. Sensor data from a camera is still image data - it isn't audio data or weather data - it is just in a less processed state than pixel level image data.

It has nothing to do with philosophy. It's a technical issue, and actually pretty cut and dried.

Is a lumber yard the same as a house? No, but everything needed to build any of many houses is there. But it could be houses of different styles and different functionality and different colors, and until you cut the lumber to size and nail it into place it is a lumber yard and not even one house. And once it is a house, it is virtually impossible to recut the lumber and make it into a different house.

Peterff wrote:
When a company such as Canon describes a file as a 'raw image file' then that highlights the discrepancy in philosophical definitions.

Ever see marketing people talk to engineers?

Peterff wrote:
If the desired outcome is a hot meal it can come from a package and placed in a microwave, come out of a can and be heated up on a stove, or be prepared from fresh raw ingredients. They are all variants of food.

Some are faster and more convenient and some yield substantially better and more varied results. They are all still food.

Those are examples much the same as image file formats. But the significance is that if you open a can, or a microwave package, or a frozen pack... if it says chicken soup you get chicken soup. Just one kind.

If you open the pantry, you can have beef soup or mushroom soup, etc. etc. The pantry is the same as a RAW file.

Peterff wrote:
A computer file is just a computer file, and image related information is image data regardless of how little or how much it is processed.

But raw sensor data is not image data.

Peterff wrote:
A JPEG, TIFF, or PNG is no more or less an image file than a raw NEF, .CR2 or DNG file, they are just at different stages of processing.

Not at all true. A JPEG defines exactly one image. Not an infinite variation of images that are close. Just one. The NEF file has data that can correctly generate any one of a nearly infinite number of different images.

Reply
Apr 28, 2016 17:43:45   #
Peterff Loc: O'er The Hills and Far Away, in Themyscira.
 
Apaflo wrote:
Not at all true....


Let us just say that I respectfully disagree with you, but also whether we call a raw file an image file or whether we do not doesn't really matter. There are at least fifty shades of grey here, and more than a few colors.

As for talking to engineers, yes, I do. Sometimes they are right, and sometimes they are wrong. I'm not going to debate this with you, we can simply agree to disagree. It is essentially a disagreement on semantics.

I take your point about lumber, which is a raw material that can be used to make many different things, although once processed cannot be easily restored to true lumber. Whatever floats your boat for example!

On the other hand camera sensor data can only be used to create visual images, either still or moving. It can't be used to monitor pipeline safety nor to provide ocean temperature or other data.

The simple fact is that camera sensor data is raw data designed exclusively for the purpose of image creation. It is not pixel level data and requires transformation to make it so, at which time it takes a much more restricted form, but it is still visual image related information. To myself and many others that qualifies as image data since it can be used to generate images and only images in normal usage.

Other than the semantics, we don't really seem to be disagreeing about this, and it doesn't really matter in the big picture view of things.

Shall we let it rest?

Reply
Apr 28, 2016 18:53:59   #
f8lee Loc: New Mexico
 
Peterff wrote:
Let us just say that I respectfully disagree with you, but also whether we call a raw file an image file or whether we do not doesn't really matter. There are at least fifty shades of grey here, and more than a few colors.

As for talking to engineers, yes, I do. Sometimes they are right, and sometimes they are wrong. I'm not going to debate this with you, we can simply agree to disagree. It is essentially a disagreement on semantics.

I take your point about lumber, which is a raw material that can be used to make many different things, although once processed cannot be easily restored to true lumber. Whatever floats your boat for example!

On the other hand camera sensor data can only be used to create visual images, either still or moving. It can't be used to monitor pipeline safety nor to provide ocean temperature or other data.

The simple fact is that camera sensor data is raw data designed exclusively for the purpose of image creation. It is not pixel level data and requires transformation to make it so, at which time it takes a much more restricted form, but it is still visual image related information. To myself and many others that qualifies as image data since it can be used to generate images and only images in normal usage.

Other than the semantics, we don't really seem to be disagreeing about this, and it doesn't really matter in the big picture view of things.

Shall we let it rest?
Let us just say that I respectfully disagree with ... (show quote)


Against my better judgement, I shall wade in here. Peter, Apaflo is right in that a raw data stream from an imaging chip is not an image until it is interpreted - his analogies are pretty good, actually.

Image files like JPG, TIF, PNG et al are merely different digital representations of specific RGB color values at each pixel, so a "perfect monitor" would translate that specific RGB value into one particular visible color. No disputes, no "thinking" - it's just a direct 1:1 relationship between RGB value and color displayed.

Raw files contain the data stream that come off the imaging chip, which, as you likely know, consists of millions of photo-sites, each with either a Red, Green or Blue filter above it (usually in the so-called "Bayer pattern" except for the Fuji XTrans and Foveon chips). So each pixel (i.e. - photo site) in the raw image consists of a reading representative of the number of photons that got through the particular colored filter above it. This, in turn, means that in order to render an image, software must determine what the final color would be at a given pixel location based on the readings from a number of adjacent photo site readings. There is no 1:1 correspondence here; this is why different raw processing programs can render a somewhat different colored image from the same original raw file. Of course, Capture1 won't turn a red fire hydrant blue, but the rendered tonalities will like be different than those made by Adobe, Apple or other software.

So it turns out the raw file is really much more like the stack of wood than it is a pre-fab house.

Reply
Apr 28, 2016 19:31:49   #
Peterff Loc: O'er The Hills and Far Away, in Themyscira.
 
f8lee wrote:
Against my better judgement, I shall wade in here. Peter, Apaflo is right in that a raw data stream from an imaging chip is not an image until it is interpreted - his analogies are pretty good, actually.

Image files like JPG, TIF, PNG et al are merely different digital representations of specific RGB color values at each pixel, so a "perfect monitor" would translate that specific RGB value into one particular visible color. No disputes, no "thinking" - it's just a direct 1:1 relationship between RGB value and color displayed.

Raw files contain the data stream that come off the imaging chip, which, as you likely know, consists of millions of photo-sites, each with either a Red, Green or Blue filter above it (usually in the so-called "Bayer pattern" except for the Fuji XTrans and Foveon chips). So each pixel (i.e. - photo site) in the raw image consists of a reading representative of the number of photons that got through the particular colored filter above it. This, in turn, means that in order to render an image, software must determine what the final color would be at a given pixel location based on the readings from a number of adjacent photo site readings. There is no 1:1 correspondence here; this is why different raw processing programs can render a somewhat different colored image from the same original raw file. Of course, Capture1 won't turn a red fire hydrant blue, but the rendered tonalities will like be different than those made by Adobe, Apple or other software.

So it turns out the raw file is really much more like the stack of wood than it is a pre-fab house.
Against my better judgement, I shall wade in here.... (show quote)


I don't disagree with any of that, except that sensor data records light and thus visual data that eventually is transformed into an image in one form or another that can be viewed by a human. A JPEG, TIFF, PNG or whatever can't be viewed without interpretation either.

You can take lumber and transform it into many things, not just housing or some other building. A boat, furniture, a tool, a musical instrument, a weapon, a fire, a vehicle, so many other things.

You cannot do that with raw sensor data and transform it into a perfume or paper or an aircraft. A raw file may not be close to a final image, but it is still visual data that cannot be easily be re-purposed as audio, financial, fluid dynamics or other kinds of data as in the limber analogy. In my opinion you are both wrong.

The situation is very similar to the dilemma of the abortion debate. Does a life begin at conception, at birth, or somewhere in between? It is a semantic and ethical consideration, not a technical one. Once conceived a life is on the path to becoming some kind of being, and in the human case, hopefully sentient to some degree or other. When does sentience happen? When does a collection of cells qualify as a human being?

So no, you may think I am wrong, and that Apaflo is correct. I think that you are both wrong, but does it actually matter?

We're only talking about data files here and how to categorize them, it is still a philosophical and not a technical question. The philosophical question is when does visual data become an image, at what stage of processing? I don't think that we have an agreed answer on that, and frankly I don't really think we need one to discuss the relative merits of raw versus other things.

Bring forth the zealots and heretics, and tie them to their stakes. I'll happily throw fuel upon the fires!

Reply
 
 
Apr 28, 2016 19:52:16   #
f8lee Loc: New Mexico
 
Peterff wrote:
I don't disagree with any of that, except that sensor data records light and thus visual data that eventually is transformed into an image in one form or another that can be viewed by a human. A JPEG, TIFF, PNG or whatever can't be viewed without interpretation either.


Well, really, the photo sites record photons, most of which fall in the visible spectrum but others which are due to heat coming off the electronics (a major source of noise at high ISO in fact).

And I daresay the data stream could be interpreted as any other digital file, such as music or a word document (though the former may be horrendous - or maybe rap? - and the latter most likely gobbledygook). But your nomenclature choice could hold in a loose sense, I guess.

Reply
Apr 28, 2016 20:04:38   #
Rongnongno Loc: FL
 
Let's just give a straight answer to the op, Shall we?
Linckinn wrote:
Suppose one converted RAW files from a manufacturer, say NEF's from Nikon, into PNG files, and then imported the PNG files into software for post processing. Can one then edit/process with the same results as if processing a RAW file? My understanding is "yes", since the PNG is lossless, but I would like to know if I that is not correct.

Thanks, as always.

I say YES if editing in the 16 bit. No if edited in 8 bit.

Reply
Apr 28, 2016 20:26:00   #
Peterff Loc: O'er The Hills and Far Away, in Themyscira.
 
f8lee wrote:
Well, really, the photo sites record photons, most of which fall in the visible spectrum but others which are due to heat coming off the electronics (a major source of noise at high ISO in fact).

And I daresay the data stream could be interpreted as any other digital file, such as music or a word document (though the former may be horrendous - or maybe rap? - and the latter most likely gobbledygook). But your nomenclature choice could hold in a loose sense, I guess.


We may disagree on the interpretation of loose. Of course any digital or analog file can be interpreted in any way if chosen, but other than generating visual image data what other purpose is a camera sensor designed to serve?

If its design purpose is to generate data for imaging purposes is it not then image data in some form or other? The distinctions that you and Apaflo are making are academic at best and fallacious at worst. Just remember that a JPEG file is not an image, it is simply a standardized computer file that can be interpreted to produce an image.

The same is true of a raw (camera sensor data) file except that it is not standardized, not pixel based, and requires more processing to generate an image. It is still image information that is encoded with the intent of being used as image, it is thus an image file no matter how many steps are required to transform it into a human accessible state.

Think about either film or magnetic tape. They can both be used to capture and encode either image or audio information or both. Or indeed other types of data. They then need to be processed to produce a signal - information - that can be interpreted and translated into a human accessible form. They can be either analog or digital depending upon the interpretation. However the recorded information is either intended to be audio or image based or a combination of both, or something else.

It is the intended purpose that defines the data file type, not the level of processing.

You may not agree, but what does it really matter?

Reply
Apr 28, 2016 20:37:51   #
Apaflo Loc: Anchorage, Alaska
 
Peterff wrote:
I don't disagree with any of that, except that sensor data records light and thus visual data that eventually is transformed into an image in one form or another that can be viewed by a human. A JPEG, TIFF, PNG or whatever can't be viewed without interpretation either.

That just simply is not true.

Each pixel in an image is precisely defined in any of the image formats. The color and luminance at each location are precise, and are the same for any of those formats. The byte values in the file may be different, but when read into the computer the "interpretation" is a predefined process and to the degree that it is accurate it produces exactly the same data fed to the monitor, regardless of which image format it came from.

Raw sensor data is not interpreted, it is interpolated (aka demosaiced). Before that is done there is no "predefined process" that is always done the same way. The results of correct interpolation can be an almost infinite number of different data sets. The user chooses which one to make. Today that might be image 1001, and tomorrow a different user might decide on image 8008. Both are right, neither are the same. The raw data cannot be called image data because it cannot define which of image 1001 or 8008 is correct. Once the user decides which image to make, it is saved as exactly that image. Image 8008 is not image 1001, and the data in the image file is specific to one or the other.

That is just like the pile of wood at the lumber yard. We can make a two story house or a ten story house, it can have many bathrooms or none. It's up to the user to decide, and all are correct. The lumber yard is a pile of lumber, not a house. If you build a house, design 1001 has 2 bathrooms and one story. Or house 8008 has 8 bathrooms on four floors. One house or the other. The piles of lumber were neither, and were not houses.

Peterff wrote:
You can take lumber and transform it into many things, not just housing or some other building. A boat, furniture, a tool, a musical instrument, a weapon, a fire, a vehicle, so many other things.

You cannot do that with raw sensor data and transform it into a perfume or paper or an aircraft. A raw file may not be close to a final image, but it is still visual data that cannot be easily be re-purposed as audio, financial, fluid dynamics or other kinds of data as in the limber analogy. In my opinion you are both wrong.
You can take lumber and transform it into many thi... (show quote)

In fact there are many things that raw sensor data can be used for, and that is not the point. The point is that it does not define one single specific image. There is no image. Just like those piles of wood are not houses laying around at the lumber yard.

Peterff wrote:
The situation is very similar to the dilemma of the abortion debate. ...

Lets not obfuscate the topic with totally worthless, yet emotionally charge, concepts of no value here.

Peterff wrote:
... So no, you may think I am wrong, and that Apaflo is correct. I think that you are both wrong, but does it actually matter?

We're only talking about data files here and how to categorize them, it is still a philosophical and not a technical question.

There is no philosophical question. It is purely technical. And yes it does actually matter if, and only if, a person actually wants to work with sensors, raw sensor data, and the software that processes raw sensor data. Obviously most photographers have little to no interest, and for them it makes no difference. To the engineers designing sensors or various devices that use sensors, whether it be cameras or something else, and to the software engineers that develop programs to work with the data, it is absolutely a requirement to fully grasp the differences.

Peterff wrote:
The philosophical question is when does visual data become an image, at what stage of processing? I don't think that we have an agreed answer on that, and frankly I don't really think we need one to discuss the relative merits of raw versus other things.

That is not philosophical, but a pretty simple technical question. And one that I've answered more than once in this thread already.

Sensor data does not define characteristics of an image, such as color, brightness, and location. Image data does that. For example, if a sensor has 2000x3000 sensor sites, the one that is at 1400x2000 has what relationship to the pixel in an image produced from that data located at 1400x2000? It does not define any of color, brightness nor location. If the value for that byte of data is changed in the sensor data it affects, to at least some degree, probably several dozens of pixels in any image produced from that data. And in reverse, for the pixel at 1400x2000 in any image produced there are perhaps anywhere from 9 to 64 data locations on the sensor that affect the color and intensity of that pixel. The effect however is not preset, it need not be the same each time the process is done for the process to be called correct. That differs from pixel data that is either processed correctly or there is a measurable error.

Peterff wrote:
Bring forth the zealots and heretics, and tie them to their stakes. I'll happily throw fuel upon the fires!

Let's skip fueling fires and put some light on the subject instead. Which is to say that if you are not willing to learn, I'm not willing to discuss it further.

Reply
Page 1 of 5 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.