This question is answered.


Permlink Replies: 14 - Pages: 1 - Last Post: 10-Feb-2020 15:00 Last Post By: JeffTucker Threads: [ Previous | Next ]
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
HiDPI with originals
Posted: 08-Feb-2020 13:42
 
  Click to reply to this thread Reply
When choosing Link to scaled-down images and also HiDPI images, jAlbum doubles the bounds, and then "lies" to the skin by reporting 50% figures for imageWidth and imageHeight. But when choosing Link to originals and HiDPI images, jAlbum tells the skin the truth, reporting the actual dimensions of the JPG.

It should tell the same "lie" to the skin. In short, by choosing those settings, the user is telling jAlbum, "I want you to use my originals, untouched, but I want skins to display them at half their actual size, so they look good on high-density displays."

A simple skin like Minimal would then do exactly what the user wants. Other skins, that don't rely on the reported imageWidth and imageHeight, would still have to "do their own thing" (and that's exceedingly messy, alas).
RobM

Posts: 3,238
Registered: 4-Aug-2006
Re: HiDPI with originals
Posted: 08-Feb-2020 14:38   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Videos?
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 08-Feb-2020 15:31   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
That's a different can of worms, since Link to originals has no meaning with regard to videos, nor does HiDPI images.

ETA: Besides that, even if you have a 1080p video, and preserve that resolution when making the album, you probably don't want it to be shown in only 540px, even on a high-density device. And if you cut it down to a 720p, that's even more true.
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 08-Feb-2020 23:35   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
This raises an odd, related issue. I'm open to suggestions on this one.

Say you've chosen Link to scaled-down images only, image bounds of 1200x600, and HiDPI images. Now you feed it two originals, one that's 4000x3000 and one that's only 600x450.

jAlbum scales the first image to 1793x1200, but reports its imageWidth and imageHeight as 896 and 600. So far, so good.

But because the second image is less than the bounds already, it doesn't get scaled. And jAlbum reports its imageWidth and imageHeight as, wait for it..., 600 and 450. It doesn't "lie" about the dimensions. So, the image gets shown in a 600x450 box. But to provide better viewing on a high-density display, shouldn't it be shown in a box half that size?

I'm honestly not sure which behavior I'd want WRT the small image.
RobM

Posts: 3,238
Registered: 4-Aug-2006
Re: HiDPI with originals
Posted: 09-Feb-2020 00:49   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
This raises an odd, related issue. I'm open to suggestions on this one.

Say you've chosen Link to scaled-down images only, image bounds of 1200x600, and HiDPI images. Now you feed it two originals, one that's 4000x3000 and one that's only 600x450.

jAlbum scales the first image to 1793x1200, but reports its imageWidth and imageHeight as 896 and 600. So far, so good.

But because the second image is less than the bounds already, it doesn't get scaled. And jAlbum reports its imageWidth and imageHeight as, wait for it..., 600 and 450. It doesn't "lie" about the dimensions. So, the image gets shown in a 600x450 box. But to provide better viewing on a high-density display, shouldn't it be shown in a box half that size?

I'm honestly not sure which behavior I'd want WRT the small image.

You do get a warning triangle on the thumbnail, but you might not see it if the image doesn’t happen to be visible in jAlbum’s Explore pane. I think given there is a warning though, that the image isn’t big enough, I prefer how it is now. You could of course end up with slide images no, or not much, bigger than the thumbnail is, if it is shown half size.
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 09-Feb-2020 01:01   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I'm inclined to agree. If you feed absurdly small images into the project, showing those images at their actual size is probably preferable.

Where it gets interesting, of course, is with my original problem - Link to originals coupled with HiDPI images. Since there are no image bounds involved, if David takes my suggestion WRT to imageWidth and imageHeight, those small images are going to get shrunk. I don't think there's any logical way to address that situation.
RobM

Posts: 3,238
Registered: 4-Aug-2006
Re: HiDPI with originals
Posted: 09-Feb-2020 10:48   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
I'm inclined to agree. If you feed absurdly small images into the project, showing those images at their actual size is probably preferable.

Where it gets interesting, of course, is with my original problem - Link to originals coupled with HiDPI images. Since there are no image bounds involved, if David takes my suggestion WRT to imageWidth and imageHeight, those small images are going to get shrunk. I don't think there's any logical way to address that situation.

Instead of a warning triangle for small images maybe a setting, possibly with a per image override, so small images can retain their original size. Or maybe a new variable that indicates if images are big enough for HiDPI or not, then the skin could use originalWidth/originalHeight to retain the size as needed. The new variable could default to true/false unless HiDPI is selected and the image is too small.
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 09-Feb-2020 14:27   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
What I find myself wondering is whether any of this crops up in the wild. I suspect that most users are feeding jAlbum nice, big, digital images, in which case things all work very nicely, or at least they would, if my original suggestion were implemented (i.e., "lie" about the dimensions if Link to originals or Use original is coupled with *HiDPI images*).

Someone who's feeding small images into the project is probably not concerned with how they appear on high-density displays, and is sticking with default settings where, again, everything behaves properly.

But yes, I think a per-image setting mightbe useful: No HiDPI. In that case, jAlbum would provide the real imageWidth and imageHeight. No need to automate the image selection, which would be fraught with "doing me a favor" issues.
RobM

Posts: 3,238
Registered: 4-Aug-2006
Re: HiDPI with originals
Posted: 09-Feb-2020 15:10   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
What I find myself wondering is whether any of this crops up in the wild. I suspect that most users are feeding jAlbum nice, big, digital images, in which case things all work very nicely, or at least they would, if my original suggestion were implemented (i.e., "lie" about the dimensions if Link to originals or Use original is coupled with *HiDPI images*).

Someone who's feeding small images into the project is probably not concerned with how they appear on high-density displays, and is sticking with default settings where, again, everything behaves properly.

Who has a phone or camera with such low resolution, or even reduces the resolution to 1000px or less? Even scanned images should be big enough.

The only time it might be a problem is people trying out the Sample Portfolio, that has images that are too small for HiDPI.
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 09-Feb-2020 15:24   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
A lot of my family pics are too small for HiDPI use. The older ones are from scanned prints, and a lot of the newer ones are saved from Facebook.

And then there are the pre-processors who use something like Lightroom to alter their images, then, without thinking about the consequences, resize them for web use, and tell jAlbum to link to originals. Then they think that HiDPI would be a good idea, without realizing that they've removed that as a viable option because of their clumsy resizing.

In short, there are a lot of ways that a user can end up with a bunch of images that are too small for HiDPI.
davidekholm

Posts: 3,241
Registered: 18-Oct-2002
Re: HiDPI with originals
Posted: 10-Feb-2020 14:02   in response to: JeffTucker in response to: JeffTucker
Correct
  Click to reply to this thread Reply
Do a core update now to try the updated behavior:
  • When image linking is "Link to originals" and "HiDPI images" is checked, then jAlbum now reports imageWidth and imageHeight with 50% of the true size.

(I personally don't detect any visual difference with the skins I've tried as the browser seem to scale the images to fit anyway)
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 10-Feb-2020 14:29   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Yes, that's doing what I would expect. It's a tough thing to test visually - you usually need to look at the page coding to see what's happening. I've got some "in between" images that fill the monitor at regular dpi, but appear at a more modest size when displayed at HiDPI, in half the space

That does leave one anomaly, and I'm not sure how it should be addressed. What does one do with smaller images? When scaling the images, jAlbum ignores the HiDPI setting for these "warning exclamation" images, i.e., ones that are too small.

So what should it do with these images when Link to originals is chosen? In theory, the image bounds should not have any effect, but maybe they should be used to decide whether to "lie" about the dimensions or not. In other words, with image bounds of 1600x750, a 3000x2000 image might report its dimensions as 1500x1000, but an 800x600 image might report its dimensions as 800x600.

ETA: Or maybe instead of getting clever, we just tell users, "if you choose originals and HiDPI, everything will be half the size - if you feed tiny images into the project, that's your problem."
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 10-Feb-2020 14:43   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Attachment Ceres Crater.jpg (276,5 KB)
Attachment bears1.jpg (73,2 KB)
Here are a couple of images that illustrate why this is a tough nut to crack. Try both of these in Minimal, Link to originals, without HiDPI. Now try them both with HiDPI.

Both are technically too small for HiDPI - with scaled images, jAlbum would report their actual scaled dimensions. But with original image linking, bears1 is comically small when the core lies about its dimensions, but Ceres Crater is better behaved when the HiDPI setting is observed, and the dimensions are halved.

It could probably be addressed with some image flags ("treat as HiDPI"), but I think we run the risk of having too many of those kinds of options. It ends up being an excessive collection of confusing options. Probably 98% of users link to scaled-down images, and just never run into this.
davidekholm

Posts: 3,241
Registered: 18-Oct-2002
Re: HiDPI with originals
Posted: 10-Feb-2020 14:52   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:

ETA: Or maybe instead of getting clever, we just tell users, "if you choose originals and HiDPI, everything will be half the size - if you feed tiny images into the project, that's your problem."

I'd just go with that for now
JeffTucker

Posts: 6,917
Registered: 31-Jan-2006
Re: HiDPI with originals
Posted: 10-Feb-2020 15:00   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Yes, that's my reaction, as well. Anything else starts getting byzantine.

A skin could address this on its own, with perhaps a little more cleverness. It could say that if you've chosen Link to originals and HiDPI images, it will limit the lightbox size to the dimensions of the image, as reported by jAlbum (i.e., half the actual dimensions). But if the image is smaller than, say, 150% of the image bounds (rather than the jAlbum core's standard of 200% for scaled images), it will let the lightbox expand to double the imageWidth and imageHeight. In other words, split the difference between small and really small.

But I need to get the basic case straightened out, first. My skins were doing something very unfriendly in this situation, to wit, always limiting the lightbox to the image bounds, even when linking to originals. I'm surprised no one has ever beaten me about the head and shoulders over it. ;)
Legend
Forum admins
Helpful Answer
Correct Answer

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