Permlink Replies: 351 - Pages: 24 [ Previous | 1 ... 12 13 14 15 16 17 18 | Next ] - Last Post: 18-Nov-2017 00:17 Last Post By: jGromit Threads: [ Previous | Next ]
terokinnunen

Posts: 15
Registered: 21-Sep-2007
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 17:51   in response to: ctwist in response to: ctwist
  Click to reply to this thread Reply
ctwist wrote:
terokinnunen wrote:
If needed, I can inspect further which files actually differ within the jre64 directory.
I recommend Agent Ransack. This can compare two folders and all their subfolders. It will take a few seconds to show the differences.

Thanks, looks interesting. Stuck with familiar Beyond Compare for now but might check out Agent Ransack later.
davidekholm

Posts: 21,440
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:03   in response to: terokinnunen in response to: terokinnunen
  Click to reply to this thread Reply
Thanks for investigating Tero. I can (sadly) not reproduce that problem on my machine. Microsoft Windows Installer is a magical thing.
AndreWolff

Posts: 2,126
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:06   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
Thanks for investigating Tero. I can (sadly) not reproduce that problem on my machine. Microsoft Windows Installer is a magical thing.
I have no other Java environment on my PC, but I guess you have also the standard Oracle Java environment installed as well.
That could perhaps explain the difference.

Edited by: AndreWolff on 08-Nov-2017 19:08
terokinnunen

Posts: 15
Registered: 21-Sep-2007
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:06   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
jGromit wrote:
davidekholm wrote:
Thanks. I'd appreciate knowing what files are affected and if you can reproduce that problem consistently.

I've never seen this problem on either Win10 or macOS. I suspect that those who are seeing it have some deeply-rooted permission problems in their Windows setup.


Sounds strange, are you sure you refer to right issue? David's response was to update problem on Windows 10, 14.2 not starting when installed over 14.1.

I don't expect it to be an issue in macOS at all, probably Windows only. I don't see any permission problems involved at least in my setup.
jGromit

Posts: 33,151
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:09   in response to: terokinnunen in response to: terokinnunen
  Click to reply to this thread Reply
terokinnunen wrote:
Sounds strange, are you sure you refer to right issue?

I am very sure. I have never had these kinds of problems when updating or installing fresh, and I'm usually one of the first to grab a new installer when David makes it available.
davidekholm

Posts: 21,440
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:25   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Guys,

I feel we shouldn't hold v15 back much longer. It delivers long awaited fixes and functionality. Still, the internal implementation of theme image generation isn't fully set yet. Instead of rushing with implementing an ill designed solution, I opt to deliver some flexible APIs for skin developers to facilitate theme image generation. (Tiger and Turtle already has their own implementation by the way). This way skins may even create multiple theme images if they wish :-)

The new APIs facilitate identifying and cropping the theme image and determining whether it needs reprocessing or not. This identification is important as one doesn't want unnecessary reprocessing of already processed images. I also recommend using the AlbumImage API for image reading, filtering, cropping and saving. With these APIs, clever theme image generation can be reduced to a handful of lines of code. 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");
    EmbeddedProperties existing = new EmbeddedProperties(themeFile);
    EmbeddedProperties current = new EmbeddedProperties();
    current.put("themeSrc", theme.getPathFrom(currentFolder));
    current.put("themeDim", themeDim.width + "x" + themeDim.height);
    if (!engine.isAppendImages() || JAlbumUtilities.isDirty(themeFile, theme) || !existing.equals(current)) {
        JAlbum.logger.log(Level.FINE, "Regenerating theme image for {0}", currentFolder);
        AlbumImage ai = new AlbumImage(theme);
        CropFilter cf = new CropFilter();
        cf.setBounds(themeDim);
        ai = ai.applyFilter(cf, (Map) theme.getVars());
        ai = ai.scaleToFit(themeDim);
        ai.saveImage(themeFile);
        current.write(themeFile);
    }
}
davidekholm

Posts: 21,440
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:42   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
The new APIs are JAlbumUtilities.getThemeObject() and EmbeddedProperties . EmbeddedProperties (a name,value Map of Strings) is used to embed information on the theme image source and bounds in the generated theme image in order to detect whether it needs to be regenerated or not.
terokinnunen

Posts: 15
Registered: 21-Sep-2007
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:43   in response to: jGromit in response to: jGromit
  Click to reply to this thread Reply
jGromit wrote:
terokinnunen wrote:
Sounds strange, are you sure you refer to right issue?

I am very sure. I have never had these kinds of problems when updating or installing fresh, and I'm usually one of the first to grab a new installer when David makes it available.


Ok good. I have neither seen it before. Now I am able to consistently reproduce the problem in two Windows computers (Windows 10 ver 1709 both).
AndreWolff

Posts: 2,126
Registered: 14-Dec-2007
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:48   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
Still, the internal implementation of theme image generation isn't fully set yet. Instead of rushing with implementing an ill designed solution, I opt to deliver some flexible APIs for skin developers to facilitate theme image generation.
A missed opportunity to streamline theme image generation, to avoid code duplication and to make a user interface independent of skins!

I doubt whether your code will be applied, because you don’t document the per-conditions:
Which code should be added in the skin so that both statements:
Dimension themeDim = engine.getThemeImageDim();
AlbumObject theme = JAlbumUtilities.getThemeObject(currentFolder);
terokinnunen

Posts: 15
Registered: 21-Sep-2007
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:49   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Attachment fresh_install.txt (738,2 KB)
Attachment update.txt (1,4 MB)
davidekholm wrote:
Thanks for investigating Tero. I can (sadly) not reproduce that problem on my machine. Microsoft Windows Installer is a magical thing.

I was able to reproduce the same problematic sequence also in my Windows 10 laptop. Desktop and laptop both are Windows 10 ver 1709. I attach install log files from "jalbum-install.exe /log <logfile>", from both update (update.txt) and fresh install (fresh_install.txt). From the log it can be seen that for some reason, jvm.dll line is missing in update log compared to fresh install log.
InstallFiles: Tiedosto: jvm.dll,  hakemisto: C:\Program Files\jAlbum\jre64\bin\server\,  koko: 10313792

Above is missing in update.txt.
davidekholm

Posts: 21,440
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 18:56   in response to: AndreWolff in response to: AndreWolff
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
Still, the internal implementation of theme image generation isn't fully set yet. Instead of rushing with implementing an ill designed solution, I opt to deliver some flexible APIs for skin developers to facilitate theme image generation.
A missed opportunity to streamline theme image generation, to avoid code duplication and to make a user interface independent of skins!

I doubt whether your code will be applied, because you don’t document the per-conditions:
Which code should be added in the skin so that both statements:

Dimension themeDim = engine.getThemeImageDim();
AlbumObject theme = JAlbumUtilities.getThemeObject(currentFolder);

The getThemeObject will deliver an album object as long as there are images in the folder you pass to it. If you've designated a certain theme image, then that one will be delivered.

The engine.getThemeImageDim() call will deliver a Dimension if you've called setThemeDim() earlier or passed a UI component matching the SkinProperty "themeImageSizeName". jAlbum's folder property UI panel monitors this property of the engine in order to calculate the cropping area of its crop focus control.

We can streamline this more in the near future. This approach unburdens the skin developer from over half of the code needed to implement theme images and is flexible enough to allow various placements of theme images and various numbers and sizes of theme images.
RobM

Posts: 4,372
Registered: 4-Aug-2006
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 19:53   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
davidekholm wrote:
Guys,

I feel we shouldn't hold v15 back much longer. It delivers long awaited fixes and functionality. Still, the internal implementation of theme image generation isn't fully set yet. Instead of rushing with implementing an ill designed solution, I opt to deliver some flexible APIs for skin developers to facilitate theme image generation. (Tiger and Turtle already has their own implementation by the way). This way skins may even create multiple theme images if they wish :-)

I have been holding off changing my skins that already support theme images per folder, now we have a peg in the ground I will try the new methods. It certainly looks a lot less complicated than what I currently have, so thanks for this new feature.
davidekholm

Posts: 21,440
Registered: 18-Oct-2002
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 19:57   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
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.
RobM

Posts: 4,372
Registered: 4-Aug-2006
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 22:18   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
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'".
jGromit

Posts: 33,151
Registered: 31-Jan-2006
Re: jAlbum 14.2 beta for testing
Posted: 08-Nov-2017 22:33   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Attachment ss003352.png (22,4 KB)
If you're getting ready to release, have you fixed this? See screenshot.

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.

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?
Legend
Forum admins
Helpful Answer
Correct Answer

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