Thread Locked This thread is locked - replies are not allowed.



Permlink Replies: 356 - Pages: 24 [ Previous | 1 ... 7 8 9 10 11 12 13 | Next ] - Last Post: 18-Nov-2017 16:56 Last Post By: davidekholm Threads: [ Previous | Next ]
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 13:44   in response to: AndreWolff in response to: AndreWolff
AndreWolff wrote:

I did put in index.htt:

That was minimal pseudo code. Wrap the statement in an if (path != null) clause. The variable only exists if there is a separate dedicated theme image set.
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 13:47   in response to: jGromit in response to: jGromit
jGromit wrote:
davidekholm wrote:
Let the user set the representing folder thumbnail....

I was a little puzzled not to see any crop mask on that (and for a few moments, I thought that's what folderImageSize was referring to, since this is, after all, the image that's used to represent the folder). The "Set crop focus" tool is available, of course, but that also includes the aspect ratio of the theme image, which is a bit confusing, given that the folder properties panel also has a place to set the crop focus of the theme image. Who's in charge?


Either works. They both do the same job of setting a "weight" for the crop focus, but the embedded selector also writes that "themeImagePath" setting to the current folder if separate theme images are used.
jGromit

Posts: 7,548
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 13:50   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
Either works. They both do the same job of setting a "weight" for the crop focus...

Ah, yes, I see that they track together, though if you use the tool, you have to hit an F5 to refresh the display, and see the same focus in the folder properties panel.
AndreWolff

Posts: 1,694
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 14:16   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
AndreWolff wrote:

I did put in index.htt:

That was minimal pseudo code. Wrap the statement in an if (path != null) clause. The variable only exists if there is a separate dedicated theme image set.

I have it working now with this code:
<%
path = currentFolder.getProperties().get("themeImagePath");
if (!isEmpty(path)) imgTheme = "slides/" + path;
%>
See this Slide Show 4 test album where all theme images have been made by dragging an image to the Theme image box of the new folder panel.

Thanks for your help and the new Folder panel!

Edited by: AndreWolff on 02-Nov-2017 14:17
AndreWolff

Posts: 1,694
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 15:07   in response to: davidekholm in response to: davidekholm
Attachment VagueThemeImage.PNG (231.7 KB)
Another question:
I dragged an image to the Theme Image box.

Why is the dragged image in the Image box so vague, dimmed (see enclosed screenshot)?
How do I get the same type of image as I see in the Thumbnail box?
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 16:56   in response to: jGromit in response to: jGromit
jGromit wrote:
davidekholm wrote:
Either works. They both do the same job of setting a "weight" for the crop focus...

Ah, yes, I see that they track together, though if you use the tool, you have to hit an F5 to refresh the display, and see the same focus in the folder properties panel.


New beta core file out that fixes this. Now the selector responds to both skin changes and changes to the theme image size. There are now two new methods in the AlbumBean (engine) called setThemeImageDim and getThemeImageDim. They can either be set directly by a skin or via a skin variable.
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:09   in response to: AndreWolff in response to: AndreWolff
AndreWolff wrote:
Another question:
I dragged an image to the Theme Image box.

Why is the dragged image in the Image box so vague, dimmed (see enclosed screenshot)?


Hover the mouse over the control. It should then tell you that the currently selected skin doesn’t support theme images. (Lacks a “folderImageSize” variable)
AndreWolff

Posts: 1,694
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:13   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
Hover the mouse over the control. It should then tell you that the currently selected skin doesn’t support theme images. (Lacks a “folderImageSize” variable)
??? The currently selected skin support theme image, see this album made with theme images generated with the new folder panel!
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:14   in response to: AndreWolff in response to: AndreWolff
You’re welcome André. Remember though that the path variable is a path, it may contain folder names and slashes too if you dropped a folder onto the theme image selector.
jGromit

Posts: 7,548
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:18   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
New beta core file out that fixes this. Now the selector responds to both skin changes and changes to the theme image size.

Yes, that's good - visual, and immediate.

There are now two new methods in the AlbumBean (engine) called setThemeImageDim and getThemeImageDim. They can either be set directly by a skin or via a skin variable.

I'm still a little vague on how the theme image gets processed, and where it lands. If it's purely under skin control, why use setThemeImageDim()? If the skin is doing the scaling, I imagine it would be calling something like ai.scaleToFit(new Dimension(2500, 2500)), where the skin has to provide the bounds anyway. When would the bounds specified in setThemeImageDim() be used?
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:35   in response to: jGromit in response to: jGromit
Tomorrow when I have JAlbum processing theme images for you then you can ignore that setter method. I added it for internal synchronization purposes. As a skin developer you will soon only need to pick up and use the themeImagePath variable. I assume you will appeciate a themeImageWidth and themeImageHeight variable too, right?
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:37   in response to: AndreWolff in response to: AndreWolff
André, what value have you set your folderImageSize variable to?
AndreWolff

Posts: 1,694
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:41   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
André, what value have you set your folderImageSize variable to?
To un-dim the theme image I added in the onload.bsh file:
	// Dummy to un-dim the theme image:
public JTextField folderImageSize = new JTextField("1000 x 300");

But I don't use these dimensions, they are already defined in the skin settings tab: Index page / Theme image:

as explained here.

The new method is an addition to the methods used in the current version.

I hope that you will make a well documented example of the theme image in the Minimal skin, so that I and other skin developpers can copy your code.

Currently I have no idea whether jAlbum makes a theme image in the output directory and if so, how to fetch that image.

Edited by: AndreWolff on 02-Nov-2017 18:09

Edited by: AndreWolff on 02-Nov-2017 18:11

jGromit

Posts: 7,548
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 17:47   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
As a skin developer you will soon only need to pick up and use the themeImagePath variable.

Where are you planning to stash the theme image in the output?

I assume you will appeciate a themeImageWidth and themeImageHeight variable too, right?

Yes, though those dimensions are less important than they are for most images. The theme image most often gets used as a background image, so the HTML isn't expecting to be fed values for height and width. In fact, there's no way to feed them into the page layout. But they might come in handy for deciding whether the theme image can be used at its actual size (maybe to adjust the height of the container, for example).
davidekholm

Posts: 3,611
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 02-Nov-2017 20:31   in response to: jGromit in response to: jGromit
I plan to put the generated theme image under slides and simply call it “themeImage.jpg”
Legend
Forum admins
Helpful Answer
Correct Answer

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