This question is answered.


Permlink Replies: 30 - Pages: 3 [ 1 2 3 | Next ] - Last Post: 9 Mar 19, 09:26 Last Post By: AndreWolff
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
How to prevent the generation of thumbnails / slides?
Posted: 9 May 18, 14:12
 
  Click to reply to this thread Reply
Normally my albums do have an index page with thumbnails and slide pages with the large images.

But I offer in both the PhotoSwipe skin and the Slide Show 4 skin a possibility to skip the index page to create a carousel album.

In that case it is not required to store thumbnails on the server, so I wonder is there a setting / variable to prevent that thumbnails are generated if I make an album?

I could also make the thumbnails very big and prevent that a slide page is displayed, so I similar question is: is there a setting / variable to prevent that slides are generated if I make an album?
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 12 May 18, 13:26   in response to: AndreWolff in response to: AndreWolff
Helpful
  Click to reply to this thread Reply
You can call engine.setMakeThumbs(false); in init.bsh to prevent thumbnail generation.
To prevent slide pages from being generated, simply leave out the "slide.htt" file.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to prevent the generation of thumbnails / slides?
Posted: 12 May 18, 14:35   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
To prevent slide pages from being generated, simply leave out the "slide.htt" file.

That prevents slide pages from being generated, but there's no direct way to prevent slide images from being generated. In my NoPages skin, I resorted to:
engine.setImageLinking("Link originals");
engine.setCopyOriginals(false);

I was surprised that there was no setMakeSlides() method. If you ever decide to provide one, a parallel setMakeVideos() would be handy, as well - in NoPages, there's no way to shut off video generation without disabling video support entirely (and I don't think the skin can do that - the user would have to do it manually).

Not the sort of thing most users would ever need, but for odd skin requirements....

Edited by: jGromit on 12-May-2018 08:49
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 12 May 18, 15:04   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
It wouldn't be hard to add these two setter methods.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 13 May 18, 14:22   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
You can call engine.setMakeThumbs(false); in init.bsh to prevent thumbnail generation.
Yes, that works good as you can see here.
However existing thumbnails are not removed!
To prevent slide pages from being generated, simply leave out the "slide.htt" file.
Neither the PhotoSwipe skin nor the Slide Show 4 skin uses a slide.htt file.
I meant that the generation of slide images should dynamically be suppressed.
So to make jAlbum more consistent, I think a function engine.setMakeSlides(false); should be added
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 14 May 18, 16:01   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Thanks for your feedback.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 14 May 18, 16:19   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Please give the code to delete the thumbs folder in postdir.bsh to remove existing thumbnails.

I tried this, but is crashes:

import se.datadosen.util.*;
import se.datadosen.jalbum.JAlbumUtilities.*;
import se.datadosen.component.*;
 
IO.deleteDir(outputDirectory + "/thumbs");


Edited by: AndreWolff on 14-May-2018 16:55

But this works:
File x = new File(outputDirectory, "thumbs");	
IO.deleteDir(x);


Edited by: AndreWolff on 14-May-2018 17:10
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 09:07   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Unexpected things happen with function setMakeThumbs, if I use next code:

In onload.bsh:
JCheckBox skipIndexPage = new JCheckBox("Open first slide automatically",false);
in headless-settings.jap:
skin.skipIndexPage=false
and in init,bsh:
if (skipIndexPage) { 
  engine.setMakeThumbs(false);
}
If I set checkbox skipIndexPage, save the project settings and next click “Make”, no thumbnails are generated as expected, but if I close jAlbum I see always a pop-up “Save changes to the project”. If I answer with No and reopen the project, skipIndexPage is still set.

If I clear checkbox skipIndexPage, save the project settings and next click “Make”, thumbnails are generated as expected, but if I close jAlbum now I see no a pop-up “Save changes to the project”!
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 10:03   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I guess the error is that jAlbum produces a "Save project settings?" in the 1:st example. It shouldn't produce that as you've saved the project settings in both examples. I think you can work around this bug by using the later approach which is to put a SkinModel.java file in the "plugins" folder of your skin. Let it look like this:
public class SkinModel {
  public boolean skipIndexPage = false;
}
Now you can delete that headless-settings.jap file too.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 10:12   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I guess the error is that jAlbum produces a "Save project settings?" in the 1:st example. It shouldn't produce that as you've saved the project settings in both examples. I think you can work around this bug by using the later approach which is to put a SkinModel.java file in the "plugins" folder of your skin.
The skinmodel file is not working correctly with un-compiled code, see here, so please solve this bug!

And what about this request?

Edited by: AndreWolff on 15-May-2018 10:16
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 13:37   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:

The skinmodel file is not working correctly with un-compiled code, see here, so please solve this bug!

Instead of referring to a pretty long thread, can you please describe that bug in one sentence?
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 13:41   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Instead of referring to a pretty long thread, can you please describe that bug in one sentence?

I'll take care of that. Choose your Zigzag skin in macOS/Java 8 and look at the checkbox settings. They're obeying the defaults in SkinModel.java. Now choose Zigzag in Win10/Java 9 and take a look. Different result. In Win10/Java 9, the defaults set in SkinModel.java are being ignored with a non-compiled UI.

Edit: I believe the link above is wrong. I think the bug in question is this one: https://jalbum.net/forum/thread.jspa?threadID=54000

Edited by: jGromit on 15-May-2018 07:43
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 13:58   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Instead of referring to a pretty long thread, can you please describe that bug in one sentence?
http://jalbum.net/forum/message.jspa?messageID=310489#310489
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 14:31   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
It seems that it takes two skin loads for a non-compiled skin UI to pick up changes to SkinModel.java. I don't see this as a high prio thing. End users won't be affected and skin developers can simply load the skin twice after changes to SkinModel until we've been able to fix this bug.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 15 May 18, 14:44   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I don't see this as a high prio thing. End users won't be affected
??? They see a question "Save ..." while they did not change anything!
and skin developers can simply load the skin twice after changes to SkinModel until we've been able to fix this bug.
?? I have no idea what you mean with this!

Is the problem solved if you implement this?
Legend
Forum admins
Helpful Answer
Correct Answer

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