This question is answered.


Permlink Replies: 12 - Pages: 1 - Last Post: 29 Aug 16, 08:39 Last Post By: AndreWolff Threads: [ Previous | Next ]
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
How to give all slide images the same height and width?
Posted: 28 Aug 16, 09:43
 
  Click to reply to this thread Reply
To give all the thumbnails the same size, I have in the init.bsh file next code:
// Fixed-shape thumbnails if selected in the user interface:
if(fixedShapeThumbs) engine.addFilter(new FixedShapeFilter(), JAFilter.THUMBNAILS_PRESCALE_STAGE);
Some slide presentation techniques require that all slides do have the same dimensions,
so I wonder is it in a similar way also possible to give all images in the slides output folder the same size as defined in the Images field on Images/General/Image bounds group?

If that is possible:

What code should I use?

Is the Set focus ... function also working for these slide images?
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 14:00   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
See the entry for values for se.datadosen.jalbum.JAFilter on this page: http://jalbum.net/api/constant-values.html.

But there's a reason why you've never seen this used in any skin. You're not going to like what it does. It crops all the images (what skin user wants to have his main images arbitrarily cropped?), and if the originals are smaller than the bounds, it enlarges images to the image bounds, which reduces their sharpness.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 14:13   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
And BTW, there are some unresolved bugs in the fixed shape filter: http://jalbum.net/forum/thread.jspa?threadID=49192
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 19:08   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
See the entry for values for se.datadosen.jalbum.JAFilter on this page: http://jalbum.net/api/constant-values.html.
This is documentation which is for me useless: no descriptions and in particular no example code
But there's a reason why you've never seen this used in any skin. You're not going to like what it does. It crops all the images (what skin user wants to have his main images arbitrarily cropped?), and if the originals are smaller than the bounds, it enlarges images to the image bounds, which reduces their sharpness.
Well it is in your own hand if you ask to crop to a dimension larger as the original image. In that case it should of course not enlarge the image, but I can live with that!

But I still have no idea how the code looks to apply this!
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 19:13   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
And BTW, there are some unresolved bugs in the fixed shape filter: http://jalbum.net/forum/thread.jspa?threadID=49192
I think this has to be repaired, but I am afraid it will not help if I enter this in the bugs or features requests thread!
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 19:25   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Attachment ss002024.png (12.7 KB)
This is documentation which is for me useless: no descriptions and in particular no example code

Seriously? You can't figure this out? OK, let's see, now.... There are five choices. It's not a thumbnail that you're trying to crop, so that lets out the last two of the choices. It's not all images that you're trying to crop, so that eliminates the first two. Hmmm.... There's only one left. What could this possibly mean?

Well it is in your own hand if you ask to crop to a dimension larger as the original image. In that case it should of course not enlarge the image, but I can live with that!

But this is going to crop all images whose aspect ratio doesn't exactly match the image bounds. What user would want a skin to crop all of his images? A tall vertical image, like one with an aspect ratio of 1:4, is going to end up being cropped to 3:2 if the images bounds are 900x600.

It's one thing for a skin to crop the thumbnails, but when it crops the slide images, it's going to end up cutting off people's heads.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 19:29   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Attachment inputImage.png (192.7 KB)
Attachment outputImage.png (755.8 KB)
Here's an example of what you're going to end up with. Image bounds are 1200x600, and a fixed-shape filter is applied to the slide images ("closeups"). Is this really what you want?
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 20:22   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
Here's an example of what you're going to end up with. Image bounds are 1200x600, and a fixed-shape filter is applied to the slide images ("closeups"). Is this really what you want?
This is of course nonsense: you apply this type of filter only if all images do have more or less the same W/H ratio as the image bounds. If not you can expect this type of effects!
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 20:26   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
Seriously? You can't figure this out? OK, let's see, now.... There are five choices. It's not a thumbnail that you're trying to crop, so that lets out the last two of the choices. It's not all images that you're trying to crop, so that eliminates the first two. Hmmm.... There's only one left. What could this possibly mean?
Do you really think that normal people understand what ALL_POSTSCALE_STAGE means? All these constants should get a description!
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to give all slide images the same height and width?
Posted: 28 Aug 16, 21:34   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
If you had read the manual section on image filters, this would not be a mystery to you.

http://jalbum.net/help/en/More_about_image_filters
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to give all slide images the same height and width?
Posted: 29 Aug 16, 00:40   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
If you had read the manual section on image filters, this would not be a mystery to you.

http://jalbum.net/help/en/More_about_image_filters


Well even after reading this, it is still a mystery for me, because I tried these user variables:

filter 1	class=FixedShapeFilter prescale closeups 
and
filter 1	class=FixedShapeFilter closeups 

But it had no effect, the images in the slides directory did not get all the same dimensions.

So I think the FixedShapeFilter can not solve my problem.

And of course my question:

Is the Set focus ... function also working for these slide images?

is not answered in that chapter.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to give all slide images the same height and width?
Posted: 29 Aug 16, 00:45   in response to: AndreWolff in response to: AndreWolff
Correct
  Click to reply to this thread Reply
It has to be filter1, not filter 1. And prescale has no effect on closeups - it's always postscale.

But why are you messing around with doing this via user variables? Just stick this in your init.bsh:
if(fixedShapeSlides) engine.addFilter(new FixedShapeFilter(), JAFilter.CLOSEUPS_POSTSCALE_STAGE);
Assuming, of course, that your skin has a variable called fixedShapeSlides.
AndreWolff

Posts: 1,289
Registered: 14-Dec-2007
Re: How to give all slide images the same height and width?
Posted: 29 Aug 16, 08:39   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
Just stick this in your init.bsh:
if(fixedShapeSlides) engine.addFilter(new FixedShapeFilter(), JAFilter.CLOSEUPS_POSTSCALE_STAGE);
Yes!! That was the answer I was looking for.
And I see that the Set focus ... function is also working for these slide images!

Thanks for your help!
Legend
Forum admins
Helpful Answer
Correct Answer

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