gobbledegook / creevey

Phoenix Slides
174 stars 25 forks source link

Picture display quality is not as good as on Preview or Xee on JPEG #33

Closed therealmarv closed 5 months ago

therealmarv commented 5 months ago

I'm currently evaluating a replacement for Xee3 (very unhappy they stopped development long time ago).

It seems Phoenix Slides checks the most important check boxes for me (like e.g. color accuracy and nice native zoom behaviour).

However I'm really picky with my image viewer of choice and have done a 1:1 comparison of Phoenix Slides, Preview and Xee with mostly JPEGs.

The problem

I noticed that Phoenix Slides pictures are a more blurry / less sharp than from Preview and Xee. I've created a 200% Nearest neighbour Zoom for comparison reasons. Note: The quality difference is also visible on smaller than screen images (so the issue is not the downsampling). I'm guessing a faster decompression algorithm of JPEGs is used to make Phoenix snappier.

Is it possible to get a high quality decrompression of JPEGs (even optional in settings would be good) with Phoenix to make it equal to display quality of Preview?

The original image from this issue is available for free here: https://negativespace.co/woman-model-street/

Look especially at the eyes, eyelashes, eyebrows, skin pores in the comparison

Phoenix Sildes (more blurry)

phoenix

Preview (sharper)

preview

1:1 comparison on the eye region

1to1_comparison

gobbledegook commented 5 months ago

OK I think I know what's going on here, but let me ask a couple questions. First, what are the steps you're taking for the Phoenix Slides comparison image? Is it (1) open the image in a slideshow, then (2) take a screenshot?

Now try this: (1) open the slideshow, (2) hit the '=' key to show the image at actual size, (3) hit the '*' key to go back to the default zoom level. When you do the comparison now, how does it look?

I think what's going on is that in regular slideshow usage, Phoenix Slides scales down images that are larger than the screen (using Image I/O's "thumbnail" API's, which I'm guessing you are correct that it does some sort of fast decompression). You can force Phoenix Slides to override this by zooming the image to a non-default scale factor. Once this happens, the app will continue to use this full size image at all scale factors.

If my guess is correct and zooming in and back out fixes the issue, it would be easy enough to add an option to always load the full size image for slideshows. It would be a tradeoff of speed and memory usage for better quality images. (I may even consider making this the default.)

therealmarv commented 5 months ago

Thanks for your comment. I think the issue is more complicated because there are two cases now 😅

FYI: I'm not doing the slide show function. I'm just opening the file directly in viewer mode.

Technical information about my setup beforehand

I use a 4K monitor (native resolution 3840x2160) in 2560x1440 HiDPI mode (this is the default setting for a 4K monitor in macOS). When I do fullscreen screenshots (using Skitch) they are 5120x2880 pixels in dimension.

Case 1: image much larger than screen resolution

If you download (button) the original image it's 8256x5504 pixels.

I've followed your instructions:

Now try this: (1) open the slideshow, (2) hit the '=' key to show the image at actual size, (3) hit the '*' key to go back to the default zoom level. When you do the comparison now, how does it look?

The result: It fixes the problem! 🥳 The image looks practically the same now in Phoenix, Preview and Xee3 (extremely minor difference but not visible to the human eye) and with perfect sharpness.

So it would be very appreciated to an additional option for this case (to always load the full image and downscale it).

Case 2: image smaller than my screen resolution

I've created a new cropped image with resolution 1800x1012. I will upload it here on github (should not be resized and original):

original

I've opened the image directly in Phoenix, Preview and Xee3 with actual size settings (no zoom in) and this is the result zoomed in into the eye region:

small_1to1_comparison

As you can see the problem with sharpness is still there but maybe not as pronounced as before. To double check it: It's also visible in real life by placing the windows side by side and not just on the HiDPI 5K screenshot.

My comments/thoughts

I don't know if this valuable (ignore it if not helpful):

Either something is wrong with the resolution handling or maybe the upscaling to the HiDPI screen (I should maybe do another test without HiDPI screen resolution?!)

OR

I've worked with JPEG software decompressors myself, they can be adjusted to various decompression quality levels. The dequantization can be stopped beforehand (which makes the decompressor faster) and then you get a less sharp decompressed JPEG back. Maybe it's not set to highest decompression level in your software (have not checked the code). Downside is a more blurry image (unfortunately a dealbreaker for me). Even commercial products using this trick like ACDsee for Mac (I would never use that program for that reason) ;)

gobbledegook commented 5 months ago

So the second case may be related to the fact that Phoenix Slides was not taking advantage off all the pixels on your HiDPI screen. I think I've fixed both problems, if you want to try this version:

~blyt.net/phxslides/phoenix-slides-155d1.dmg~

Zooming in on the image (using '+' or '=' or a pinch gesture on the trackpad) will always load the full image, but for now in normal (non-zoomed) usage it will still scale down images that have significantly more pixels than your screen (but the quality of the downsampling should be much better). Please try this and let me know if it gives acceptable results!

therealmarv commented 5 months ago

Wow & thanks 👏👏👏 This new version is remarkable. I gave it a deeper test run and I think it's the ideal balance of quality and speed! It solved both test cases with a pleasing high quality image now!

Some more details

Case 1, larger than screen image

Large comparison

Quality wise I think all 3 look the same to my eye on the 4K monitor. The little bit more quality on the Preview App is a big nit picky and not worth the super long loading time.

Case 2, smaller than screen image

To make it short: I think they look the same to me with my eyes on the 4K monitor. However when I take screenshots it's 5K resolution and then there is a slight difference between the 3 programs. But this difference practically disappears on my screen native resolution with my eyes looking at it. On the screenshot: Xee3 looks the most smoothened out and Preview the most sharpest. But Phoenix Slides has the perfect middle spot. Well done

Small comparison

I think you should release a new version with this fix! A big leap in JPEG display quality on HiDPI screens! And on a personal note: With this improvements I can finally replace my old friend Xee3 with Phoenix Slides after all those years! 🥹

gobbledegook commented 5 months ago

released with v1.5.6