If you wish to apply a certain image effect to all images or thumbnails of an album, like grayscale, cropping or watermark, then you have two basic options: Using the "Edit mode" image filters or the "classic" image filters. Both options have interesting properties. Let's look into them:
Edit mode image filters
These image filters are probably the ones you're already familiar with, but did you know you can automatically apply them to several images? Double click any thumbnail image in jAlbum to enter Edit mode. Now perform the desired operation, for instance applying a grayscale or tint effect. Leave edit mode and right click the image you just edited. From the popup menu that now shows, select "Image filters->Copy". Now select the images you wish to apply the effect to (CTRL+A or CMD+A selects all) and right click again and select "Image filters->Paste". Done.
The advantage with "Edit mode filters" lies in the user friendlyness of the user interface, the ability to apply an effect on a select number of images and to apply different effects to different images. You can however not apply Edit mode filters to closeup images only or thumbnails only. But wait, there is more…
Classic image filters
Probably unknown to you, unless you've studied the image filters page of this site are the classic image filters. They have been around since the early days of jAlbum and don't provide a user interface, but they are powerful and have just got some more enhancements with the latest jAlbum 9.4 release. The classic filters are mostly used by skins and many skins actually provide some basic user interface settings, but if you learn to manipulate these filters directly, then you are not limited to the filter features a certain skin provides.
The classic image filters generally apply to all images of an album, but can be restricted to apply to closeup images or thumbnail images only. Let's use the updated LogoFilter to apply a logotype watermark onto each image: Here is the image we will be using as a watermark by the way:

We want to apply this image half-transparently along the top-right edge of each image, like this:
To achieve this effect, open album settings, then click the "Advanced" tab and the "User variables" sub-tab. You now see a table with a "Name" and "Value" column. In the "Name" column type filter1. In the value column type:
class=LogoFilter src="http://jalbum.net/res/press/jalbum_desktop_app.png" angle="90" align="right" valign="top" strengthPercent="50"
Pay careful attention to the CaSEinG, cause Filter1 is different to filter1. Now finally press "Make album" and have jAlbum apply this watermarking effect onto each image. Pretty powerful, right?
Let's make a tiny change to this LogoFilter so it pastes the logo across each image instead. The code in the "Value" column then looks like this:
class=LogoFilter src="http://jalbum.net/res/press/jalbum_desktop_app.png" angle="-20" align="center" valign="center" strengthPercent="50"
The resulting images will now look like this:
By default, the classic image filters are applied to both closeup and thumbnail images. However, you probably don't want to clutter your thumbnail images with watermarks. To restrict a classic image filter to only apply to closeups, simply add the word "closeups" to the "Value" column. Adding the "thumbnails" word instead restricts the filter to thumbnail images only.
Multiple filters
Don't restrict yourself to applying only one filter. Try adding the FixedShapeFilter to thumbnail images and set your thumbnail image bounds under Album settings->Images to a squary shape, for instance to 150×150. You will now have all your images cropped to the fixed 150×150 shape no matter if they were originally portrait or landscape oriented images. Go to an empty line in the User variables table and add filter2 to the "Name" column. Now type this code in the value column:
class=FixedShapeFilter thumbnails
As you can see, manipulating the classic image filters isn't rocket science. At least not if you're familiar with a markup language like HTML. I hope you're inspired to play further with the classic image filters to further customize the album viewing experience.
Controlling filters from within skins
Skin developers that want to make use of the classic filters can easily control them via the jAlbum's API. To programatically apply the first filter example in your skin hit CTRL+SHIFT+E to open jAlbum's embedded skin editor. Now locate the "init.bsh" file. If it doesn't exist for your skin, just add it. Now type:
import se.datadosen.jalbum.JAFilter;
LogoFilter lf = new LogoFilter();
lf.setSrc("http://jalbum.net/res/press/jalbum_desktop_app.png");
lf.setAngle(90);
lf.setAlign("right");
lf.setValign("top");
lf.setStrengthPercent(50);
engine.addFilter(lf, JAFilter.CLOSEUPS_POSTSCALE_STAGE);
Save the changes and make an album. That's it!
If this last section has triggered you you explore the wonderful world of skin development, just study the material in our developer section. If you need help, post in the developer section of our user forum. In most cases you will probably be able to peek at the code of an existing skin too.

Leave a Reply
You must be logged in to post a comment.