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



Permlink Replies: 356 - Pages: 24 [ Previous | 1 ... 13 14 15 16 17 18 19 | Next ] - Last Post: 18-Nov-2017 16:56 Last Post By: davidekholm Threads: [ Previous | Next ]
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 08:55   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
AndreWolff wrote:
David, I think something is missing in your new folder panel:
I can create a theme image by dragging an image to the Theme image box.
But suppose I next decide that I don't want a theme image: how can I remove the image again from the Theme image box?
I don't see a Remove pop-up menu item.

The way I'm thinking about it, if you have a skin that supports theme images, and theme image generation is active (a valid folderImageSize variable or equivalent present), then theme images are generated for all folders. A skin can naturally chose to ignore theme images for a certain folder. This behavior is analogous to folder thumbnails. If the user hasn't picked one explicitly, jAlbum picks the 1:st one found.

If you don't want a custom theme image, how about dropping the selected representing folder thumbnail onto the theme image selector?

Now this said (about the indented behavior), I can add a context menu to the selectors with a "Remove" item in it.

Will this context menu be implemented in version 15?
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 09:06   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
Here's a sample "postdir.bsh" that generates theme images for a skin:
import java.awt.Dimension;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.logging.Level;
import net.jalbum.filters.CropFilter;
import se.datadosen.jalbum.AlbumImage;
import se.datadosen.jalbum.AlbumObject;
import se.datadosen.jalbum.EmbeddedProperties;
import se.datadosen.jalbum.JAlbum;
import se.datadosen.jalbum.JAlbumUtilities;
 
Dimension themeDim = engine.getThemeImageDim();
AlbumObject theme = JAlbumUtilities.getThemeObject(currentFolder);
if (themeDim != null && theme != null) {
    File themeFile = new File(outputDirectory, "folderimage.jpg");
I thought you had the intention to generate an image ja_theme.jpg in the slides directory, but the last code line above generates a file folderimage.jpg in the root output directory I guess.

How should this line be changed so that it corresponds with your future implementation?
davidekholm

Posts: 21,489
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:01   in response to: RobM in response to: RobM
RobM wrote:
davidekholm wrote:
if (themeDim != null && theme != null) {
    File themeFile = new File(outputDirectory, "folderimage.jpg");
}
Just checking if the above code is indeed what you meant, as before you said:
"I plan to put the generated theme image under slides and simply call it 'themeImage.jpg'".

It's hard to decide on that. Your votes please? In this example I simply used the same name and placement as Turtle and Tiger. Theme images aren't slides after all so I see a point in putting them one level above.
davidekholm

Posts: 21,489
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:07   in response to: AndreWolff in response to: AndreWolff
AndreWolff wrote:

Will this context menu be implemented in version 15?
The theme image selector / crop focus selector has a "remove" context menu that removes any explicit theme image and reverts to using the same theme image as the folder thumbnail. I currently don't have an option to not have theme images for certain folders.
davidekholm

Posts: 21,489
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:09   in response to: AndreWolff in response to: AndreWolff
AndreWolff wrote:

I thought you had the intention to generate an image ja_theme.jpg in the slides directory, but the last code line above generates a file folderimage.jpg in the root output directory I guess.

How should this line be changed so that it corresponds with your future implementation?


I have difficulties deciding on the placement. Your votes please!
To put in inside "slides" instead, you can write:
File slidesDir = new File(outputDirectory, engine.getSlideDirectory());
File themeFile = new File(slidesDir, "ja_theme.jpg");
jGromit

Posts: 33,206
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:14   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
It's hard to decide on that. Your votes please? In this example I simply used the same name and placement as Turtle and Tiger. Theme images aren't slides after all so I see a point in putting them one level above.

However, they're not originals, either, and those are usually the only image files one finds in the root. I vote for slides simply because they have been processed by jAlbum.

In fact, I could argue that they should retain their original file names, and be planted in a theme folder - parallel to slide and thumbs. Probably overkill, but certainly more rational, and less prone to future breakage. I don't think there's any skin whose (javascript) page code actually traverses the slides directory, but....
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:20   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
AndreWolff wrote:

I thought you had the intention to generate an image ja_theme.jpg in the slides directory, but the last code line above generates a file folderimage.jpg in the root output directory I guess.

How should this line be changed so that it corresponds with your future implementation?

I have difficulties deciding on the placement. Your votes please!
To put in inside "slides" instead, you can write:

File slidesDir = new File(outputDirectory, engine.getSlideDirectory());
File themeFile = new File(slidesDir, "ja_theme.jpg");
Thanks, but your original code is not working at my place, with version 14.2b10 I get error:
Typed variable declaration : Error in method invocation: Method getThemeImageDim() not found in class'se.datadosen.jalbum.AlbumBean' 
But I can't find a description of function setThemeDim() or SkinProperty "themeImageSizeName".

Edit:
Placement in slides and the name ja_theme.jpg is OK for me.

Edited by: AndreWolff on 09-Nov-2017 13:24
davidekholm

Posts: 21,489
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:44   in response to: jGromit in response to: jGromit
jGromit wrote:
If you're getting ready to release, have you fixed this? See screenshot.

I see. Well, now fixed if you do another core update from the beta core file .

davidekholm wrote:
I can comment that I got stuck on implementing the "One Size Fits All" theme image size selector under Settings->Images. Such a size selector doesn't suit Turtle and Tiger well. They only ask the user for a theme image height and gets the width from another skin setting. It's therefore not easy to introduce a new UI control for all skins to use.

I do get it. In fact, if a skin is using a full-width theme image, it can't even know the correct aspect ratio at album build time. The aspect ratio of the needed image can't be known until the album is actually viewed.

I think I know the answer to this, but a quick question - if the user makes some choices in the skin's UI, like choosing a different height for the theme image, and that changes the aspect ratio, if the skin then updates the themeDim variable, does the cropping mask in the jAlbum UI also change? I'm assuming the skin needs to pass it to the engine for that to happen.


As soon as anyone calls engine.setThemeImageDim(new dimension here), the UI's crop selector will be updated. engine.setThemeImageDim() is also indirectly called whenever the UI is synced with the engine if the skin feeds the engine a variable matching the "themeImageSizeName" skin property.

And if the user doesn't return to the folder property panel, will the vertical center of that cropping mask remain where it was? In other words, if it was a 5:1 crop and the user centered it on Dor's face, but skin settings then change it to a 10:1 crop, will Dor's face still be centered vertically?

Yes, the vertical centering is untouched by changing the ratio.
davidekholm

Posts: 21,489
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:46   in response to: jGromit in response to: jGromit
jGromit wrote:
davidekholm wrote:
It's hard to decide on that. Your votes please? In this example I simply used the same name and placement as Turtle and Tiger. Theme images aren't slides after all so I see a point in putting them one level above.

However, they're not originals, either, and those are usually the only image files one finds in the root. I vote for slides simply because they have been processed by jAlbum.

In fact, I could argue that they should retain their original file names, and be planted in a theme folder - parallel to slide and thumbs. Probably overkill, but certainly more rational, and less prone to future breakage. I don't think there's any skin whose (javascript) page code actually traverses the slides directory, but....


I'm inclined to soon move originals to an "originals" folder, but keep these kind of special files one level above. Creating a "theme" folder to only store one file seems overkill.
davidekholm

Posts: 21,489
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 13:49   in response to: AndreWolff in response to: AndreWolff
AndreWolff wrote:
Thanks, but your original code is not working at my place, with version 14.2b10 I get error:
Typed variable declaration : Error in method invocation: Method getThemeImageDim() not found in class'se.datadosen.jalbum.AlbumBean' 
But I can't find a description of function setThemeDim() or SkinProperty "themeImageSizeName".

See http://jalbum.net/api
The current jalbum-core.jar HAS that getThemeImageDim() method. Ensure you're compiling against a current version of that jar file and not against an older copy.

Edit:
Placement in slides and the name ja_theme.jpg is OK for me.

Thanks for your 2 cents too.
jGromit

Posts: 33,206
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 14:03   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
I'm inclined to soon move originals to an "originals" folder, but keep these kind of special files one level above.

In my skins, I stash those kinds of "special" files in res - I've got things like logo images and background images, and they have to go somewhere. Ditto for music track files. I don't want to clutter up the root with that stuff. In fact in Matrix, I create a res at each folder level.

Creating a "theme" folder to only store one file seems overkill.

One file for now. But as you've pointed out, this scheme allows the skin to create multiple theme images, in different sizes.

The more I think about it, the more convinced I am that originals should be kept in one place, slides in one place, thumbs in one place, and themes in one place.

And jAlbum probably shouldn't be assigning arbitrary names to files. It doesn't do so with any other files that are part of the album project - we don't have slide001.jpg, slide002.jpg, and so on, and for good reason.

These are the kinds of small decisions that trap us later. We want to expand the use of theme images, but can't create a more rational scheme because "it will break existing skins." I'd rather break some things now, rather than having to return to this five versions from now, and facing a more tangled web.
AndreWolff

Posts: 2,147
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 14:42   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
The current jalbum-core.jar HAS that getThemeImageDim() method. Ensure you're compiling against a current version of that jar file and not against an older copy.
You are correct, I was using version 14.2b10 no error with 14.2b13
But there are several problems:
  • The generated theme image does not correspond with what I see in the Theme image display of the folder panel, see attached folderimage.jpg and BeforeAlbumGeneration.PNG. I don't think that the crop function works correctly.
  • After I used the new Remove popup menu item, the old theme image is not removed, but replaced by the image used for the thumbnail, see enclosed AfterApplyRemovePopupFunction.PNG screenshot. As a result after a Make again a theme image is generated, which I did not wanted.
Thanks for your 2 cents too.
I can't remember that I send you money!

Edited by: AndreWolff on 09-Nov-2017 14:43
MarkusD

Posts: 494
Registered: 13-Apr-2006
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 14:46   in response to: AndreWolff in response to: AndreWolff
AndreWolff wrote:
I can't remember that I send you money!
Please, André, relax. ;-) Haven't you ever heard of that: https://en.wikipedia.org/wiki/My_two_cents
jGromit

Posts: 33,206
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 15:21   in response to: davidekholm in response to: davidekholm
Attachment Darcula.png (23,7 KB)
Attachment Mac default.png (19,8 KB)
Attachment Win default.png (4,8 KB)
Attachment AdvGen.png (2,4 KB)
davidekholm wrote:
jGromit wrote:
If you're getting ready to release, have you fixed this? See screenshot.

I see. Well, now fixed....


Not really. Hate to be a pest about something so minor, but these two comboboxes look different from every other one in the application. They're OK in Darcula, but not in the default L&F for Windows or Mac.

Well, almost every one - found another one that looks different, under Advanced > General (screenshot from Windows default L&F).
ctwist

Posts: 1,413
Registered: 27-Sep-2003
Re: jAlbum 14.2 beta for testing
Posted: 09-Nov-2017 15:30   in response to: davidekholm in response to: davidekholm
davidekholm wrote:
RobM wrote:
"I plan to put the generated theme image under slides and simply call it 'themeImage.jpg'".
It's hard to decide on that. Your votes please? In this example I simply used the same name and placement as Turtle and Tiger. Theme images aren't slides after all so I see a point in putting them one level above.
"slides" is the wrong place for a theme image. It is not structurally correct, since the theme image is not related to a slide. The theme image should be in the parent folder. Also, if an album does not have slide pages, it seems pointless to create a slide folder just to contain a theme image. I don't see a disadvantage to putting this in the parent folder.
BTW I don't have time to test this beta right now; I am just observing.
Legend
Forum admins
Helpful Answer
Correct Answer

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