Jump to content
UltravioletPhotography

Temporary Test Topic: PNG and JPG


Andrea B.

Recommended Posts

I'm looking into support of PNGs. So this is a sandbox topic for that. B)

 

 

Random test PNG. 300x300 px. 61KB.

Test.png

 

PNG to JPG conversion in PSE at max quality. 74KB.

Test.jpg

 

 

Both look the same?

Link to comment
On my Retina monitor I'm not really seeing any difference at all between the two. I will be getting a larger PNG later this evening to investigate.
Link to comment

Both are the same except for JPG compression artifacts.

Well that is the point, though. I was having problems with artifacts.
Link to comment
Andrea, I used photoshop to compare the two picture using the "difference" layer. As expected the result showed just black (meaning no difference between the two image). I had to boost the exposition setting to reveal the JPG artifacts.
Link to comment
I used the highest quality JPG setting (12) when converting the PNG to a JPG in PSE. In this particular example, JPG artifacts were thus quite minimal and not detectable in the posted versions.
Link to comment

Here's my "real world test".

 

Original was TIFF, which I don't think I can upload? I saved the 5.9MB TIFF as a PNG (386KB):

Edit: ignore the strange black patches; I did that by accident when I was colorizing the monochrome pic.

post-94-0-56397200-1516653167.png

 

Then I converted the 386KB PNG to JPG quality 12 (874KB), which looks fine but is a huge file.

post-94-0-68921100-1516653243.jpg

 

Then I tried converting the 386KB PNG to JPG quality 6 (174KB), which is unforgivably degraded. Look what happens to the trees in the distance! Everything is all blurry. :(

post-94-0-15723000-1516653347.jpg

 

You can see why I consider the PNG to be the "best compromise" situation.

 

ETA: also I'm noticing some weirdness in the PNG, but I think that's my fault, I have one of the indexed colors that should be white set to black.

Link to comment

Funny test. Was just wondering, whether I can post these PNGs

 

(PL-UV is with Prima Luce UV-Filter, S8612, BD-U=Baader-U)

 

-edit: sorry, these do appear in the file names posted, not in the file names in the pictures

pictures were taken with a flash, so the exposure times shown are not relevant, lens was the UV-Nikkor)

post-21-0-30762700-1516656894.png

post-21-0-68626300-1516656918.png

post-21-0-69413000-1516656943.png

post-21-0-55364700-1516656974.png

Link to comment

Andy, if your original was a TIF, then try a conversion to JPG from that.

 

Also quality 6 is way too low for a JPG. Try something higher.

 

Here is JPG quality 8, size 184 KB on disk.

pngTest_q8.jpg

 

 

Here is JPG quality 10, size 262 KB on disk.

pngTest_q10.jpg

Link to comment

My eyes are dancing. You guys will have to tell me whether there was much degradation at quality 8 and 10.

 

Here is some detail slider added to the q10 version because.I.could.not.resist.

pngTest_q10pn.jpg

Link to comment

Andrea, the original MONOCHROME image was a TIF. Then I colorized and made a PNG from the TIF directly. There isn’t any color TIF in existence. But PNG is using lossless compression so it shouldn’t matter aside from the conversion to 8bit.

 

Quality 10 is not bad, but the site guidelines explicitly say quality 6?

Link to comment

http://www.ultraviol...xel-dimensions/

 

Andy, can't find that?? This linked guideline says between 50-80%.

But I'm not going to toss out the occasional file which is somewhat "oversized". :D

 

Also, I'll let the PNG permission stand for now and we will see how it goes, OK? I'll trust that everyone attempts to keep PNG file sizes reasonable. Yes, I know someone is going to ask what is "reasonable". :rolleyes:

 

Let me go look through the Admin settings to see if we have a strong upper bound on file size and I'll report later.

 

The PNG to JPG conversion is still a bit troubling as to why it degrades so badly? Strange, isn't it?? In my linked guideline I showed an unresized JPG crop at which was saved at 25/50/75/100% quality and there was little degradation at lower quality.

 


 

Why is the edge of the curb (sidewalk edge) hotter I wonder? So interesting. I see also that the white zebra stripes (pedestrian street crossing at corner) are lighter purple? Perhaps absorb less heat during the day than the darker street??

Link to comment

We don't have a hard upper limit on file size. What happens, however, is that the hard upper limit on pixel dimensions forces a file resize if a jpg of large dimensions is uploaded. For example I'm uploading here a monster photo with dimensions 8288 x 5520 pixels and filesize 71.6 MB. But the actual posted image is 1200 x 800 pixels with filesize 166.94 KB.

What is misleading (and way weird) is that when the cursor hovers over this posted version, there is still a readout of 68.31 MB. But if you drag the posted photo off the page, you get the smaller dimensioned, smaller filesize version.

 

The Nikon D850 has the best colour I've ever seen in a digital camera. I like the D810 better though because it has the best highlights I've ever seen in a digital camera. :lol:

 

Three Graces

Santa Fe, New Mexico :: 22 Sep 2017

pix_20170922santaFeNM_01pn.jpg

Link to comment
The PNG to JPG conversion is still a bit troubling as to why it degrades so badly? Strange, isn't it?? In my linked guideline I showed an unresized JPG crop at which was saved at 25/50/75/100% quality and there was little degradation at lower quality.

Because of the way the two formats work. JPG compresses things by doing a Fourier transform on the data, which (assuming you don't remember Fourier transforms, forgive me if you do!) essentially separates out the image by spatial frequency — low frequencies are flat areas of unchanging color, and high frequencies are edges and any other abrupt change in the image. Since human eyes don't perceive the high frequency components well, the jpeg algorithm rounds them off, and many of them turn out to be zero. Since the zeros don't need to be stored, that's the primary mechanism for how JPEG achieves its compression.

 

Now in THIS image, we have lots of low frequency stuff, and not much high frequency, so the high frequencies are really getting brutalized. Since high frequencies = edges, that's why you see it mainly in the fine details like tree branches.

 

PNG, on the other hand, is using totally lossless compression, and it works by detecting unchanging areas of the image — the LOW frequencies, in other words — and basically doing the equivalent of seeing a sequence of 000000000 and replacing it with "repeat 0 9 times". So PNG's forte is images with lots of low frequencies and not too many details, whereas JPG does best with photographs, which are full of medium and high frequencies, of which the highest get the axe. These LWIR pics are kinda medium-frequency images, but PNG seems to do a better job overall from what I've seen, especially near the sky.

 

Why is the edge of the curb (sidewalk edge) hotter I wonder? So interesting. I see also that the white zebra stripes (pedestrian street crossing at corner) are lighter purple? Perhaps absorb less heat during the day than the darker street??

The curb edge is not really (much) hotter; you are seeing the top of the curb at an angle where it reflects the very cold night sky. Roofs often look cold too, but it's usually just the sky's reflection. (This is an important point, actually: LWIR photos are only "thermal" photos under a long list of assumptions, which include the reflectivity of the thing you are measuring being near zero.) You are mostly[*] correct about the zebra stripes. If you wait long enough, eventually they will be the same temperature as the rest of the street and they will (mostly) fade out! This actually happens with billboards also. If you take a LWIR photo of a billboard in the daytime, you can read the letters, but a few hours after dark, the board will go blank!

 

[*] Caveat: the zebra stripes are a different material, so they may have a different reflectivity.

Link to comment

Makes sense about the spatial frequencies and all. And explains nicely why my posted Jpg example in Guidelines worked so well. Thanks!

Funny, about the time you were writing the preceding post, I had just turned to dear old Wikip to read about PNG structure with which I was not at all familiar.

 

 

The "cold edge of the curb" -- there's a useful metaphor lurking there no doubt. "-)

 

 

 

 

Edit: Repaired missing part of sentence.

Link to comment
Bill De Jager
The curb edge is not really (much) hotter; you are seeing the top of the curb at an angle where it reflects the very cold night sky. Roofs often look cold too, but it's usually just the sky's reflection. (This is an important point, actually: LWIR photos are only "thermal" photos under a long list of assumptions, which include the reflectivity of the thing you are measuring being near zero.)

 

While nearly all the "thermal" infrared photos I've seen look like simple renditions of surface temperature, I was fortunate enough years ago to get a look at what appeared to be reflected longwave infrared. This was in a training class in wildlife survey methods. First we covered the near-infrared band which is pretty straightforward.

 

Then the instructor took a mug partly filled with hot water, placed it on a ladder, and took video of it in longwave IR (monochrome rendition). From our angle we couldn't see the hot water but we could see part of the inside wall of the mug. It looked like there was something really bright at the bottom of the mug with the brightness reflecting off the inside wall. Imagine glowing water in the bottom of a mug and how that light would reflect off the inside wall. Since this was reflected light, we could even see the texture of the inside of the mug as it was lit up by the longwave IR. The heat also affected the mug and its lower half was glowing much brighter than the upper half. So, we were actually seeing a mixture of emitted and reflected LW IR.

 

This was a most illuminating experience (pun not originally intended).

Link to comment
So, we were actually seeing a mixture of emitted and reflected LW IR.

Bill, that's what you almost always see. All metals are highly reflective, just like in visible light. Glass both emits and reflects, so it's like looking at a piece of glass facing outdoors at night: you see mostly your own reflection but with a little added light from the glass (it is not transparent though). Most materials, when seen at a steep enough angle, will show some glossiness, just like in ordinary light. I think people get so enchanted with the idea of "seeing temperature" that they forget it's still just a regular photo, albeit in a regime where nearly everything is hot enough to glow at little.

 

My hand holding a glass over a sheet of aluminum foil. Multiple reflections!

post-94-0-85722400-1516867609.png

Link to comment

Last night we watched Secrets of the Dead about the search for more rooms in the Pyramids using muon technology. One of the other search tools used was a big FLIR camera. Some cool thermal photos were shown!

 

Linkie: Scanning the Pyramids

(Not sure how long this episode can be viewed or whether it is accessible outside the US.)

Link to comment
I heard about that! Did they ever find anything? I know they had some candidates but I thought they were having trouble getting permission to check if there was anything there.
Link to comment
They sure did find something! Found the location of two small and one large area(s), all locations which were previously unknown. Not sure if it has been decided whether they are actual rooms or chambers or what. Maybe you can stream the episode on your PC. It is quite interesting.
Link to comment
That's what I mean about "candidates" -- unless they go in, they don't know if there's anything there. I don't really have time to watch at the moment.
Link to comment

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...