Jump to content
UltravioletPhotography

TESTING image sizes again. TIF upload for you to play with in Post #12.


Andrea B.

Recommended Posts

So looking some more at the Diff between the Upload and the Download, I began to think that it looks like what you would get if you sharpened one channel but not the other two. Or maybe sharpened two channels but not third. I can't test every combo on that. But I did find this interesting difference. I'm reposting the upload/download diff for comparison. There are some similarities between these two diffs. Maybe it is that detail enhancement is applied to only one channel or to only two channels, rather than sharpening.

CaterDif_diffred_diffblue.pngCaterDiffUpload_Download.png

 

 

I auto-sharpened, successively, the red, green and blue channels in the master TIFF. Then recombined a sharpened red, unsharpened green and sharpened blue to get a new TIFF. Then diff-ed the master TIFF with the new TIFF.

I think that's what I did? I'd better make sure I can reproduce that!!

 

The point being that I remain somewhat unconvinced that our JPG uploads are undergoing a quality change. I'm not trying to be stubborn here. But the quality diffs I've posted above do not seem to represent what we are seeing in the upload/download diff.

 

This is not of earthshaking importance for me to have spent so much time on it. It's more like I get curious about this stuff and try to figure it out.

Link to comment

I should also try some resampling differences. Not quite sure how to resample without resizing.

Link to comment
Andy Perrin

Andrea, it helps to understand how JPEG compression works. The color space is transformed first (separating the luminance info from the colors) and the colors are downsampled in the transformed space. Then the luminance and colors are compressed separately. 
 

When the luminance channel is compressed at low quality, many of the high frequencies (edges) are discarded. By taking the difference between the original image and the image that’s keeping mainly low frequencies, what remains are high frequencies — and these are what you see when you do the auto-contrast: you see what was thrown AWAY by the compression. So the compression is not sharpening the image, it’s actually blurring it. 
 

The fact that you can make something that looks similar by sharpening is true but mostly unconnected to what you are seeing in the jpeg cases. 

Link to comment

What led me astray is that the DIffs between high quality and low quality (see two examples above) do not look like the Diff between upload and download (also shown above).

 

When the luminance channel is compressed at low quality, many of the high frequencies (edges) are discarded.

Now it all makes more sense. I had not been thinking of JPG compression as being applied separately on the two different channels, color & luminance. But still, what I just said about the quality Diff not looking like the upload/download Diff - that is still a bit puzzling. Shouldn't some of the quality Diffs I made look at least a little bit like the upload/download Diff?

 

Earlier this evening I found some of the forum source code involving images. And have been looking at some of the PHP image functions. 

 

I think that the forum software should not alter an uploaded image unless I set it to do so. (Keeping in mind that it will always take 3 clicks to bring up a large uploaded image whether it is altered or not during the upload.)

 

It was both fun and instructive to look at the various Diffs and get some insight about how USM sharpening and Detail enhancement works. And to see the differences between hi quality JPGs and lower quality JPGs.

But I'm DIff-ed Out for this evening! Will try again tomorrow.

Link to comment

**** I GOT IT !!! *****

LOOK at THIS DIFF.

DiffOriginalColor_DownloadColor.png

 

 

That Diff was made between the original image's color layer and the download image's color layer. It looks just like the Diff made between the entire original image and the entire download image. 

 

Here's the two of them side-by-side. (Expand your browser.)

Left: diff between original color channel and downloaded image color channel.

Right: diff made between entire original and entire downloaded image.

My somewhat crude method of extracting the color channel is not identical to the actual color channel of the image. But I think you can see how closely matching these two are. 

CaterDiffUpload_Download.pngDiffOriginalColor_DownloadColor.png

 

 

 

Link to comment

I enlarged the color layers and selected a region which shows some obvious changes.

Left:  original image color channel

Right:  downloaded image color channel

 

leftOriginal_rightDownload.jpg

Link to comment

TEST:  Sizes of various high quality saves.

 

Beginning with a 374 x 800 Caterpillar TIFF of 1.0 MB which was created as a resized crop from the original raw NEF, I made the following 4 files.

 

The TIFF was saved as an Uncompressed PNG with size 898 KB.

The TIFF was saved as a Compressed PNG with size 500 KB.

There is no difference between an Uncompressed PNG and a Compressed PNG other than file size.

 

The TIFF was saved as a JPG in Photo Mechanic at quality 100/100 with size 387 KB.

The TIFF was saved as JPG in Photoshop Elements at quality 12/12 with size 290 KB.

There is a difference between the two JPGs even tho both were saved at the highest quality in each app. I determined this by diff-ing them in Photoshop. Differences were minor. And I don't know which one is the highest quality altho we would probably guess that the larger sized JPG was slightly better quality.

 

Here are the 4 photos. Of course at this size, the forum software does not resize them to display within the post. I think it would be difficult to see any differences within this post.

 

There was no sharpening or any other edits applied to the original file before creating the master TIFF and these 4 versions.

 

TIFF saved as Uncompressed PNG 898 KB

CaterPngUNcompressed.png

 

TIFF saved as Compressed PNG 500 KB

CaterPngCompressed.png

 

TIFF saved as JPG in Photo Mechanic at quality 100/100 387 KB

CaterJpgQ100PhotoMech.jpg

 

TIFF saved as JPG in Photoshop Elements at quality 12/12 290 KB

CaterJpg12PSE.jpg

Link to comment

Well looks like you are on track.

I really like the caterpillar difference image. Looks kind of like UV induced fluorescence. 

 

Link to comment

Dave, I'm not quite sure what I'm on track for !! 😁😁😁 This has been a long and winding topic. 

 

One thing I did learn is that resized, losslessly compressed PNGs might be a good way to go to ensure a high quality presentation within a post. That does assume one has some resizing skills. (Not entirely sure that I do the best I could with resizing. I typically depend on Photo Mechanic which has no choices. It just resizes to the size you tell it.)

 

I also liked seeing what Detail Enhancement and USM Sharpening does to a photo. 

 

As for the best photo dimensions for posting here on UVP -- I'm still not sure. Most viewers are not viewing photographs in a fully expanded browser with no sidebars on a high resolution (or Retina) monitor. I'm going to look at this topic on other computers this week. And my iPad. Maybe then I can make some updated recommendations about sizes.

Link to comment
lukaszgryglicki

I still think that AVIF/HEIC could be a good alternative (they both offer lossless and lossy compression and compress way better than PNG and what is more important - 8, 10, or 12 bits of color per channel R, G, B). Even some newest cameras (not mine) offer HEIC file format.

Link to comment

I'm going to look at ImageMagick to see if it currently has HEIC functionality.

 

I found that there is a flag for this:   Enable support for ISO/IEC 23008-12:2017 HEIF/HEIC image format.

But you mentioned AVIF/HEIC.

 

(Currently we are using GD and not ImageMagick.)

Link to comment

Thanks. I wasn't sure about the HEIF/HEIC versus AVIF/HEIC designations.

 

I would also have to request that HEIC be added to the forum software. Currently I think it will display only JPG, PNG, BMP, WEBP and GIF. 

Link to comment

Master TIFF file, from which the following were converted, is 566 KB.

 

JPG

57 KB

garden_20221002laSecuela_20709.jpg

 

GIF

95 KB

garden_20221002laSecuela_20709.gif

 

PNG

286 KB

garden_20221002laSecuela_20709.png

 

BMP:  Does not display. Can be downloaded.

308 KB

garden_20221002laSecuela_20709.bmp

 

WebP:  I don't have an app to use for this.

So I used Convertio online to convert a TIF to WebP.

220 KB

garden_20221002laSecuela_20709.webp

 

HEIC:  Again, I used Convertio to convert TIFF to HEIC.

Does not display. Can be downloaded.

36 KB

garden_20221002laSecuela_20709.heic

Link to comment
  • 3 weeks later...

I should probably summarize this rather long test post.

It isn't easy to summarize though.

 

There are 3 ways to view a photo on UVP. 

  • as seen within a post
  • after clicking the post photo, as seen within the "light box" (which in our case is a rectangle with a black background)
  • after clicking the light box photo, as seen within a blank browser page

In all 3 versions the photo may appear larger or smaller depending on your browser settings. For maximum viewing space in any of the 3 cases, fully expand your browser with no active sidebars. If you change browser size, a post photo or a light box photo will be dynamically resized.

 

If you convert your photo to a Compressed (lossless) PNG prior to uploading it to UVP, the file will not be altered by the forum software in either dimensions or quality. If you convert your photo to a JPG prior to uploading it to UVP, the dimensions of the file will not be altered, but the quality seems to be slightly changed. (I have asked Invision about this, but nobody knew the answer.)

 

For a given photo, a compressed PNG version is going to "weigh" more than a JPG version. We do not pay for file space, so the only drawback of a larger file size would be a slower loading time. A compressed PNG of maximum 1800 pixels probably won't cause much of a hit on loading time as compared to a medium-high quality JPG of 1800 pixels.

 

I've never been able to detect much of a difference between posted JPGs which have been resized & saved at medium quality versus those resized & saved at medium-high to high quality. But that is for my usage of Macbook Retina + Safari. You must figure out what JPG quality differences you are able to detect for your choice of monitor + browser. If those differences are objectionable, then try converting to a resized, compressed PNG. BTW, I do not recommend using any "Save for Web" tool. They seem to produce too many artifacts. Use the good tools for resizing and quality.

 

Are there any hard limits to photo dimensions within a post or in the light box? I really am not sure. I can only tell you that for the specific usage of my Macbook Retina and fully expanded Safari browser, the maximum width dimension within a post seems to be the rather odd size of 1096 pixels. The maximum width for the light box is probably 1800 pixels.

 

I think that an uploaded 1800 pixel wide photo looks better within a topic post after being dynamically resized than does an uploaded 1096 pixel width photo. (Assuming in both cases that the browser is fully expanded with no side bars.)

 

Remember that UVP viewers usually look at photos as posted. I don't think that very many viewers click up to see photos within the light box. Although that is a nice way to see them because the light box has navigation arrows.

 

The primary benefit of using a 2-click approach to view the photos on a blank browser page is that there is no dynamic resizing. So, for example, if you posted an unresized photo and clicked it up to the blank browser page, you could then scroll around within the page view to see all the fine details. Those same fine details can be seen for any particular area of the phot by creating what is called a 100% crop of smaller dimensions viewable within a post. Please restrict your uploads of unresized photos to only an occasional event. Unresized (dimensions, that is) photos definitely do cause a loading time hit.

 


 

Feel free to test some of your own uploads in this topic. Please provide a brief explanation of what your test uploads represent.

Link to comment
  • 5 months later...
Andrea B.

I'm going to run an experiment on image resizing.

 

This is an unprocessed image of a Longhorn Bee on an Aster. It was saved as an 1800 px wide JPG.

I'm going to post it 3 times here.

The first version will be left untouched.

The second will be resized to 800 px using the double-click which brings up an image resizer.

The third will be resized by locating the uploaded file in the data and resizing it there.

 

#1

longhornBeeOnAster_20230916laSecuela_11565.jpg

 

 

#2

longhornBeeOnAster_20230916laSecuela_11565.jpg

 

 

#3

longhornBeeOnAster_20230916laSecuela_11565.jpg

Link to comment
Andrea B.

That did not work out well. 

Link to comment
Andrea B.

Summary:  Maximum lightbox view size seems to be 1800 pixels width. If a file that size is uploaded, it will be viewed within the topic page as a dynamically resized version which is probably not much larger than 1100 pixels width ***IF*** you are viewing in a fully expanded browser with no side bars.

 

Any file larger than 1800 pixels width is simply not going to be seen at that larger size. And files of larger dimension (and weight) are also slow to load.

 

Due to the current difficulties with slow loading UVP pages, it seems as if I will have to institute a limit on image upload size. I will probably start with 1800 pixels width and see how that plays out.

Link to comment
Andrea B.

I have set the restriction.

Testing it now.

I'm going to upload an (unprocessed) unresized 7360 x 4812 image.

checkeredWhite_20230720laSecuela_21206.jpg

Link to comment
Andrea B.

????? That didn't work yet? Does it take some time for the restriction to percolate? 

Link to comment
Andrea B.

NOTHING IS WORKING!!! Arrrrrgggggghhhhhh..........😜😬

Time to take a break for dinner.

cleanKitchen.jpeg

Link to comment

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...