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


Permlink Replies: 25 - Pages: 2 [ Previous | 1 2 ] - Last Post: 06-Jan-2020 18:01 Last Post By: jGromit
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: FixedShapeFilter bug
Posted: 15-Nov-2017 09:56   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Drop "closeups" from the filter parameters in the user variables section and only keep "prescale" there. Now it will work. This also means that it's not possible to apply the FixedShapeFilter to closeups only. Changing this would be possible, but complicates the already complicated image processing pipeline further (it has a number of performance tricks)

To summarize, the FixedShape filter should either be used for both thumbnails and closeups before scaling takes place or on thumbnails only, before scaling takes place.
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: FixedShapeFilter bug
Posted: 15-Nov-2017 13:45   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I've always known that generation of slide and thumb images were intertwined in some sort of unholy way.

For the moment, forget about using a fixed shape filter on the slides - that's just a confounding factor.

Try this, instead: this wouldn't occur very often, but add a few images to Minimal, choose fixed-shape thumbs, set the slide bounds to 500x500 and the thumb bounds to 400x400. No matter what images you use, you can't get 400x400 thumbnails out of it. Increase the slide bounds to 640x640, and it works - you get nice 400x400 thumbnails.

Add HiDPI thumbs into the mix, and you're not out of the woods until the slide bounds hit something like 1200x1200. Anything less than that for slide bounds, and the thumbnails are not 800x800 (400x400 plus HiDPI).

Perhaps when some of the "new release" stuff settles down, it might be worth taking a run at untangling this web. The size of the output thumbnails really shouldn't depend on the slide bounds, ever.

Edited by: jGromit on 15-Nov-2017 08:05 - typo
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: FixedShapeFilter bug
Posted: 15-Nov-2017 14:04   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
I agree
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: FixedShapeFilter bug
Posted: 20-Dec-2018 15:16   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
This problem is now manifesting itself in display errors in the real world. It's not a theoretical problem any longer. Newer skins often use larger thumbnail image bounds, and often default to using HiDPI thumbnails. This makes the filter error much worse.

An example: https://jalbum.net/forum/thread.jspa?threadID=54802

The bottom line is that if I feed a project images that are 6000x4000px, and ask for 400x400px fixed-shape, HiDPI thumbnails, I should always get thumbnail images that are, in fact, 800x800px. But whether I get that or not depends upon the slide image bounds, which should never have any effect on the thumbnails.
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: FixedShapeFilter bug
Posted: 29-Dec-2018 17:21   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
True. The reason jAlbum uses the slide images (if they exist) is for scaling performance, but it should detect if the slide images are too small to use as input material and then revert to using the original image again, right?
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: FixedShapeFilter bug
Posted: 29-Dec-2018 17:45   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
True. The reason jAlbum uses the slide images (if they exist) is for scaling performance, but it should detect if the slide images are too small to use as input material and then revert to using the original image again, right?

I suppose. But it seems to me that it's doing things backwards every time, which is why it's also impossible to get consistent dimensions for fixed-shape slides. In each case, it's scaling, then cropping. It should be cropping, then scaling.

Consider the following cases:

  • Not fixed shape anything. It has to scale to get the slide, then it has to scale again to get the thumb. So, two scaling operations.
  • Fixed-shape thumbs. It has to scale to get the slide, then it has to crop and scale to get the thumb. Two scaling operations and one cropping operation.
  • Fixed-shape slides. It has to crop and scale to get the slide, then it has to scale to get the thumb. Again, two scaling operations and one cropping operation.
  • Fixed-shape thumbs and slides. It has to crop and scale to get the thumb, then it has to crop and scale to get the slide. Two scaling operations and two cropping operations.

In each case, I'm not sure there would be a measurable saving by doing the scaling before the cropping. True, it might be a bit more efficient to scale/crop a slide image to get the thumb, rather than using the original, but would the difference even be noticeable on a relatively recent computer?

And wouldn't it be much, much simpler just to use the original to produce the slides, and to produce the thumb, rather than go through some tortured logic to decide if the thumb can safely be created from the slide?

I haven't thought it through, but I think the interaction with other filters, like watermark, would still be straightforward - crop, scale, apply the watermark.
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: FixedShapeFilter bug
Posted: 04-Jan-2020 17:04   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
This problem is now manifesting itself in display errors in the real world. It's not a theoretical problem any longer. Newer skins often use larger thumbnail image bounds, and often default to using HiDPI thumbnails. This makes the filter error much worse.

An example: https://jalbum.net/forum/thread.jspa?threadID=54802

The bottom line is that if I feed a project images that are 6000x4000px, and ask for 400x400px fixed-shape, HiDPI thumbnails, I should always get thumbnail images that are, in fact, 800x800px. But whether I get that or not depends upon the slide image bounds, which should never have any effect on the thumbnails.


A year later, and it's still wrong. Here's a nice, clean, real-world test case. See the Notes tab in the project file:

(removed)

jAlbum is scaling, then cropping. It should be cropping, then scaling.

Edited by: jGromit on 06-Jan-2020 12:01 - removed zipped example
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: FixedShapeFilter bug
Posted: 06-Jan-2020 16:19   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:

A year later, and it's still wrong. Here's a nice, clean, real-world test case. See the Notes tab in the project file:

(removed)

jAlbum is scaling, then cropping. It should be cropping, then scaling.


To crop before scaling, add the "prescale" attribute

Edited by: jGromit on 06-Jan-2020 12:01 - removed zipped example
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: FixedShapeFilter bug
Posted: 06-Jan-2020 16:23   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Sorry, but that doesn't work.

Please start with the zipped-up example I've provided, and show me how you can produce 800x800 thumbnails with it.

ETA: For now, forget about the situation with fixed-shape slide images, which doesn't really have a real world use-case. Let's just stick to fixed-shape thumbnails, where this problem is showing up in real user albums.
davidekholm

Posts: 3,473
Registered: 18-Oct-2002
Re: FixedShapeFilter bug
Posted: 06-Jan-2020 17:31   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Ok, your assumption in the notes is correct. We don't produce thumbnails out of the originals images, but fro the scaled images. This is done for performance and memory preservation reasons. However such optimizations should naturally only take place if the effective thumbnail size is lower than the effective image size. I've now made a v19.2.2 update that should fix this special case. Just do a core update to get it.
jGromit

Posts: 7,791
Registered: 31-Jan-2006
Re: FixedShapeFilter bug
Posted: 06-Jan-2020 17:56   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
That's better! This should take care of the "in the wild" example we saw last year (link to thread above), where it was producing some truly weird results.

davidekholm wrote:
This is done for performance and memory preservation reasons.

Reminds me of the old joke about the lost motorist: "Yeah, I know we're on the wrong road, but we're making great time!"
Legend
Forum admins
Helpful Answer
Correct Answer

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