I am struggling with user-defined variables that a user has entered for a specific image.
I will illustrate with an example:
I have a panoramic image. In my skin, I want it to exceed the image width bound, and provide sideways scrolling. So in the Edit window, I added a variable for the image:
maxImageWidth=50000
This had no effect; the generated image was reduced to the album's image bounds.
I assumed that I was doing something wrong in the skin, so I generated the album in Minimal 8. This became more interesting. While processing the image with the variable override, it crashed at slide.htt line 81. After some digging, I discovered that, for this image, the class type of borderWidth (yes, that's not a typo; not "imageWidth") was "String", whereas for the other images, the class type was "Primitive".
The solution was to cast borderWidth to int. I.e. on line 81, change
borderWidth
to
(borderWidth.getClass().getSimpleName().equals("String") ? Integer.parseInt(borderWidth) : borderWidth)
i.e.
<footer class="autohide" id="caption" style="max-width: <%= imageWidth - (2 * (borderWidth.getClass().getSimpleName().equals("String") ? Integer.parseInt(borderWidth) : borderWidth)) - (4 * borderPadding) %>px">
This fixed the exception, but the generated image was still limited to the image bounds. As far as this example goes, I am not concerned about this; Minimal is probably not intended to support panoramas.
End of the example.
Looking beyond this example:
I'm not finished with other related problems, but let's sort these out first.
Edited by: ctwist on 29 Oct 2021, 08:53
Misinformation removed