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


Permlink Replies: 14 - Pages: 1 - Last Post: 10 Jan 25, 15:12 Last Post By: JeffTucker Threads: [ Previous | Next ]
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Tiger hero image problem
Posted: 9 Jan 25, 19:30
 
  Click to reply to this thread Reply
Attachment themecrop.jpg (15.5 KB)
See the screenshot of the theme image crop mask. Compare to the resulting album:

(Demo album removed.)

This is all with default settings. The original image is 4032x3024.

(I'm not even sure how to invoke the new high-DPI theme image option.)
Laza

Posts: 1,910
Registered: 6-Sep-2005
Re: Tiger hero image problem
Posted: 10 Jan 25, 08:08   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
The HiDpi theme image option is on the Advanced tab in the Images group. It's ON by default.

Tiger is not the only skin affected; it happens with any skin in the latest jAlbum. The cropping is not respected; always crops the top part.
Laza

Posts: 1,910
Registered: 6-Sep-2005
Re: Tiger hero image problem
Posted: 10 Jan 25, 08:15   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Here's what a Neptune album looks like: https://laza.jalbum.net/Sample%20Portfolio%20Neptune/index.html
(I chose the middle or bottom part for each theme image.)
Laza

Posts: 1,910
Registered: 6-Sep-2005
Re: Tiger hero image problem
Posted: 10 Jan 25, 08:32   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Even worse, all cropping is affected, see attachment! The cropped size is fine, but it always crops the top part. Perhaps it's because of the new image IO library?
Laza

Posts: 1,910
Registered: 6-Sep-2005
Re: Tiger hero image problem
Posted: 10 Jan 25, 08:36   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Yep, it's the turbojpeg library. After removing that, everything is fine.
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Re: Tiger hero image problem
Posted: 10 Jan 25, 09:31   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
I have no problem with theme image cropping using Neptune, which makes no effort to use this misguided HiDPI Theme Image option. Crop masks are applied correctly, and the theme image is the size the skin specifies (in Neptune, generally 1920 x something). But turning it off in Tiger makes no difference whatsoever - it's still a hot mess.

Why wasn't this introduced as a jAlbum core function, coordinated with the skin developers? It's not a simple image substitution - the skin's CSS has to deal with background-size length attributes. Not so simple, since those can't be combined with contain or cover. And I can't even begin to imagine how to deal with it using a repeated texture image as the theme image.

This is the kind of ad hoc, slapdash development that will eventually cause me to retire completely from jAlbum development. I've almost had enough.
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Re: Tiger hero image problem
Posted: 10 Jan 25, 09:34   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I took that tigerhero album, copied it, deleted the output, then switched to Neptune:

(Demo album removed.)
Laza

Posts: 1,910
Registered: 6-Sep-2005
Re: Tiger hero image problem
Posted: 10 Jan 25, 11:29   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
The images are also cropped improperly in Neptune. For proof, see the screenshot attached to my previous post. David is already working on this issue.

this misguided HiDPI Theme Image option
What is your problem with this? It's the same as HiDpi Images or the HiDpi thumbs option. It provides 2dpp devices with twice the resolution made for normal screens.

The theme image support in my skins dates back 10 years before jAlbum started to support theme image generation at all. Hence, it's different. And when it became available, it couldn't generate the variety of folder images already used in my skins. Now Tiger skin generates 2 folder images - one for mobiles and one for desktops - optionally, two double-resolution variants, plus one folder thumbnail, and one "share image".

Jeff, I do appreciate your help, but I'm getting tired of your continuous contempt and emotional blackmail. I never was hostile towards you, not once.
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Re: Tiger hero image problem
Posted: 10 Jan 25, 13:38   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
The images are also cropped improperly in Neptune. For proof, see the screenshot attached to my previous post. David is already working on this issue.

Took me a while to replicate the error. It doesn't occur if I make a Neptune album, change the theme cropping, delete the existing output, and make the album again. It happens only if I fail to delete the old theme image before generating a new one.

It also doesn't happen if I don't change the size of the theme image, but just change the crop mask. That works normally. Where things get ugly is when I switch, for example, between a 1920x300 theme image and a 1920x1080 theme image (for a parallax theme).

This would suggest that maybe the turbojpeg issue is just a red herring - instead, it appears to have something to do with how the core decides whether to regenerate the theme image.

ETA: It's even less predictable than that. I simply can't figure out what it's doing, or when. :(
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Re: Tiger hero image problem
Posted: 10 Jan 25, 13:48   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza, it's not hostility. It's frustration.

A HiDPI Theme Image isn't necessarily a bad idea. It's the implementation that makes me a little crazy.

Why isn't it now a checkbox under Settings > Images > Advanced, like the two other HiDPI choices?

Why isn't there an API that skin developers can access? It seems to be using some sort of secret method, and one that hasn't been properly tested.

Why hasn't there been any discussion of how this new method should handle awkward situations? What will it do if the source image isn't large enough to crank out, e.g., a 3820x600 theme image instead of one that's 1920x300?

This seems like what's known as an "unforced error." ;)
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Re: Tiger hero image problem
Posted: 10 Jan 25, 14:06   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
ETA: It's even less predictable than that. I simply can't figure out what it's doing, or when. :(

I'm closing on it, but it's very difficult to reproduce consistently. What seems to be happening is that if I switch from a full-page theme image, with its large crop mask, then go back to a fixed-height theme image, with its much shorter crop mask, the mask appears to be forgetting its former positioning, and is defaulting to the top of the image. In the case of this test album, with the beach scene, that means just blue sky. ;)
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Re: Tiger hero image problem
Posted: 10 Jan 25, 14:11   in response to: Laza in response to: Laza
 
  Click to reply to this thread Reply
Laza wrote:
Yep, it's the turbojpeg library. After removing that, everything is fine.

We seem to be talking about two different things, here. I never use image cropping in jAlbum, so I hadn't seen the error you're talking about. And I agree, it's making a mess of the cropping of the slide images, and that seems to be coming from turbojpeg.

(ETA: Intriguingly, the thumbnail cropping is OK. I would not have predicted that!)

The errors I'm seeing relate to the generation of the theme image, not the cropping of the slide images.
davidekholm

Posts: 3,577
Registered: 18-Oct-2002
Re: Tiger hero image problem
Posted: 10 Jan 25, 14:15   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I've identified and fixed this problem. I was using a too high level API calls towards libjpeg within my implementation of imageio-turbojpeg.jar that didn't respect cropping regions.

The original code was using an older version of that API and was doing much more pixel fiddling and was also relying on the outdated JAI library (Java Advanced Imaging), so I simply switched to a higher level call. It unfortunately turned out that that call didn't respect the bounds set by cropped images.

I've now reimplemented imageio-turojpeg using lower level calls that respects the cropping regions. Just get it at https://jalbum.net/download/imageio-turbojpeg.jar

(FYI: When cropping an image, the same larger image data is kept and the new cropped image points inside a rectangle of it. I.e. a super fast operation. It's obviously up to the writing code to respect this cropping rectangle)
Laza

Posts: 1,910
Registered: 6-Sep-2005
Re: Tiger hero image problem
Posted: 10 Jan 25, 14:20   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Thanks, David, it behaves fine now.

Regarding the ThemeImage generator API, jAlbum could reuse the HiDpi images option to decide if double-resolution theme images are needed.

Edited by: Laza on 10 Jan 2025, 14:26
JeffTucker

Posts: 8,386
Registered: 31-Jan-2006
Re: Tiger hero image problem
Posted: 10 Jan 25, 14:29   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I've identified and fixed this problem.

Yes, that seems to have fixed the problem with slide image cropping.

But this thread was never about that, in the first place. The problem I was posting about was with the HiDPI theme image option, an option that seems to exist only in Tiger.

They do seem to be related - after deleting the output and remaking my Tiger test album, it seems to be resolved.
Legend
Forum admins
Helpful Answer
Correct Answer

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