Fix JAlbum ICC Profiles
JAlbum is a cross platform photo gallery creation package, written in Java and available for several different computer platforms, including Mac OS. It works very well on the whole, but when it creates albums, it ignores any ICC colour profile information that original images contained. The files it generates have no associated colour profile at all.
If you know nothing about ICC colour profiles, then the rest of this page is probably not of much interest! :-)
For those people who use JAlbum on an operating system which supports colour management, then you may see significant differences between the JAlbum pictures and your original photos. Usually, the images will look too dark, with over-saturated colours. You can't do anything about how the images might look on a computer with no colour management support in the first place, but for computers which do have it, this is a real shame as keeping the colour profiles would entirely avoid the problem.
All instructions below refer to JAlbum 8.13. Other versions will probably vary in appearance but the principles should be the same.
Why can't JAlbum do this?
JAlbum does have a setting which tells it to copy over extra data from source images to generated images. That extra data will include the colour profile. However, in the vast majority of cases this seems to fail with obscure error messages because of shortcomings with the way that the underlying Java implementation handles images. If you want to try this out though, it's by far the most simple solution.
- Go to your album settings window by using the "Cog" icon in the album browser or pressing F4 when your album is open in JAlbum.
- Go to the "Advanced" tab.
- Go to the "Metadata" tab underneath.
- Select "Include photographic data in generated images". JAlbum will warn you about increasing file sizes and introducing colour distortions. In fact, colour distortions are exactly what we are going to avoid by including profiles, which should add no more than about 4K at most to each image's size. Click on "OK" to close this warning and click on "OK" to close the settings window.
- Try to generate your album. If this succeeds with no error messages, great! You're good to go. Otherwise, read on!
Another way...
I wrote an Automator workflow which patches around this on Mac OS X using built-in routines to copy the colour profile from each source image to each slide and thumbnail image.
Limitations
- You need to include original images in your output gallery
before you use the workflow. This is the biggest drawback
because of the very large galleries this creates.
If you don't want the large, original images in your final
gallery, there's a trick you can use to sidestep this which is
described below - but! - this only works if
your chosen JAlbum skin ignores original images when
it generates slides. That probably limits the usefulness of
this to hand made custom skins or users who don't mind editing
their skin files accordingly.
- Due to my lack of mastery of AppleScript, the routine to find
original images is pretty crude and based on filename extension
rather than universal type information. Your original files
must be JPEGs with filename extension .jpg or
.jpeg. It's easy to understand the AppleScript part of
the workflow even if you don't know AppleScript, so changing it
to find TIFFs, PNGs or other image types should be quite simple,
though the script will only work if Mac OS's built in colour
management command line tool "sips" is able to extract
the ICC profile from your files.
- If you are working on a case-insensitive file system (by default, Mac systems are always formatted that way) then image filename extensions can be in upper case, lower case or any mixture thereof. On case sensitive filing systems, the filename extension must be in lower case. Again, though, this is easy to change by editing the workflow's AppleScript code to look for the exact filename extensions you're using. In a perfect world I'd figure out how to detect images by universal type information rather than filename, but I haven't been able to get it to work (got any tips? Please e-mail me - I'd love to hear from you!).
How to generate your album
You must tell JAlbum to include original images in your gallery. If you don't want them including for file size, copyright or any other reasons, then you may be able to work around this.
To include and keep original images
- Go to your album settings window by using the "Cog" icon in the album browser or pressing F4 when your album is open in JAlbum.
- Go to the "Pages" tab.
- Make sure either "Link to originals" or "Link to originals via scaled images" is selected.
- Make sure "Copy originals" is checked - this is very important!
- Generate your album.
- Run the ICC profile workflow (see later).
To avoid having original images left over
As mentioned above and in the steps below, this is a very imperfect workaround as it is only of use if your skin either does not ever refer to original images in its generated HTML even if original images have been included, or if the skin has been so modified.
- Follow all the steps described above.
- You must now manually post-process each gallery one by one, if you have many galleries.
- Inside JAlbum, go to each gallery and press Command+A to select all of the images inside that gallery.
- Right-click, or Command-click on any of the selected thumbnails and choose "Include original" from the pop-up menu. This menu item should become ticked and small camera icons should appear over the top right of the thumbnails shown in the JAlbum window.
- At this point, JAlbum (v8.13, at least) will delete the original images for some reason, perhaps because it's going to re-copy them if you were to re-generate the album. Don't do that! You can safely use the pop-up menu to turn "Include original" back off afterwards. You can use the Finder to look inside your album and make sure you just have the index file, slides directory and thumbs directory present, without any original images also included.
- Once you've made these changes, you can copy your gallery somewhere safe. Of course, this is only worthwhile if your generated HTML at no point references the original images which you just deleted, and that's down to the skin you use. You will almost certainly need to be using a hand made custom skin, or to modify your chosen skin, to achieve this and that's why this work around is pretty poor.
- If you were to ask JAlbum to regenerate the gallery, just updating for changes, then unfortunately not only does it update slides - which is necessary if the presence of original images has been changed since the slides may link to them - but it also recreates all the thumbnail and slide images too, even though these won't have changed. That's a pity. If JAlbum in future changes so that it only updates the slides and not the generated images when "Include original" is toggled in the menu, and if I hear about this, then I will update the above instructions to a version which means any skin can be used without modification (the gist will be - generate the album with originals; run the workflow; turn off "Include originals" again; regenerate the album, changes only - HTML should be updated, but the modified thumbnail and slide images with ICC profiles added ought to be unchanged).
Run the workflow
Having generated your album, you need to copy over the ICC profiles into the generated images. You may have additional steps after this depending on which path you're following from the above instructions but in most cases this will be the last thing you need to do.
Having generated your gallery, it may be a good idea to preview it in Safari now. That way, you can reload it after running the workflow and more easily see the changes caused by the addition of the colour profiles.
Extract the download workflow Zip file by double-clicking on it if you haven't already. A workflow file called "Fix JAlbum ICC profiles" will be extracted and placed into the same folder. Load this by double-clicking on it.
Automator should start up and show the workflow in a window. Click on the Automator "run" button at the top right of the window. A file selector dialogue box will open. Here, you choose one or more gallery folders. This can be the top-level folder created by JAlbum containing one or more nested galleries; or an individual gallery (choose the folder which contains the "thumbs" and "slides" sub-folders, along with the original images and index file).
Automator will now churn away for a while. This may take a long time depending on your computer's processor speed, disc speed and the number and size of images in the album(s). If all goes well, Automator will tell you it has been successful and your gallery should be updated. If you have a preview of the gallery open in Safari, reload it now and watch out for the shift in colours and/or brightness in the thumbnails resulting from the ICC profile additions.
You can now publish your gallery. Don't forget to re-run the workflow if JAlbum re-generates any of its thumbnail or slide images.