This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: 21 Mar 25, 12:41 Last Post By: JeffTucker Threads: [ Previous | Next ]
hmesman

Posts: 8
Registered: 5-Feb-2009
Some images are blurred
Posted: 15 Mar 25, 18:25
 
  Click to reply to this thread Reply
Hello,
What explanation could underlie why images are slightly blurred when the horizontal and/or vertical resolution has an odd value.
The original images are uploaded and therefore not scaled (this is also the case when scaling, by the way).
This happens only if the images are under direction of the index file.
If the same image is displayed by the same browser, but decoupled from the index file, the sharpness is good.
(jAlbum version 37.1 and Tiger version 6.4.4).

Example slightly blurred image and under direction of the index file:
https://www.hans-mesman.nl/fotografie/jalbum_fotoalbums/Hobbyfotografie_Tiger/Fotoalbums/Diversen/Vuurwerk/2025/index.html#img=Vuurwerk%20collage-ps2_resultaat.png

The same image, but decoupled from the index file:
https://www.hans-mesman.nl/fotografie/jalbum_fotoalbums/Hobbyfotografie_Tiger/Fotoalbums/Diversen/Vuurwerk/2025/Vuurwerk%20collage-ps2_resultaat.png
JeffTucker

Posts: 8,098
Registered: 31-Jan-2006
Re: Some images are blurred
Posted: 15 Mar 25, 19:11   in response to: hmesman in response to: hmesman
 
  Click to reply to this thread Reply
Very strange. I see the same effect with Tiger, but not with the lightbox display of the image in one of my own skins, like Neptune. And since the lightbox is displaying the untouched original, and not a scaled image or a variant, it's particularly odd.

And it's not just with this particular image - I'm seeing the same loss of clarity with other high-resolution images, straight from the camera.
JeffTucker

Posts: 8,098
Registered: 31-Jan-2006
Re: Some images are blurred
Posted: 17 Mar 25, 22:38   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Anyone who wants to see the effect can compare these two albums. In each case, the lightbox is showing the original image, not a scaled version, which means that loading might be a bit pokey - it's a fairly large file (almost 5MB).

Compare the jagged rocks in the foreground.

(Demo albums removed.)
Laza

Posts: 1,629
Registered: 6-Sep-2005
Re: Some images are blurred
Posted: 18 Mar 25, 08:06   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Turning off the drop shadow on the Tiger album results in the same sharpness as in Neptune. Perhaps this effect triggers hardware rendering. I wasn't aware of this side-effect.

I will add a separate option for the lightbox image and turn it off by default.
JeffTucker

Posts: 8,098
Registered: 31-Jan-2006
Re: Some images are blurred
Posted: 18 Mar 25, 12:28   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
I'll take your word for it, but I have never known the application of a drop-shadow to alter the image to which it's applied. That would be a very un-CSS-like thing to do!

ETA: Just did a little poking around in the developer's tools, and indeed, turning off the box-shadow attribute sharpens the image instantly, without changing its size. Truly bizarre!

Another ETA: You know what else fixes it? Removing the will-change CSS attribute from the image. That may be the real culprit.
Laza

Posts: 1,629
Registered: 6-Sep-2005
Re: Some images are blurred
Posted: 18 Mar 25, 12:54   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Yes, it's worth trying. The purpose of the will-change attribute is probably to minimize the visual glitches when the browser switches between the CPU and hardware rendering. The transition might not be as smooth as with it, but at the end of the day, the static image is the most important part of it.
JeffTucker

Posts: 8,098
Registered: 31-Jan-2006
Re: Some images are blurred
Posted: 18 Mar 25, 13:27   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
According to various sources, will-change is a minefield, best avoided:

https://developer.mozilla.org/en-US/docs/Web/CSS/will-change
JeffTucker

Posts: 8,098
Registered: 31-Jan-2006
Re: Some images are blurred
Posted: 21 Mar 25, 12:41   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Latest Tiger update has restored the jagged Death Valley rocks to all their glory. :)

(Demo albums removed.)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums