New Feature: Transparent support for better image resizing via "Import Image 2 Lotus Notes" (II2LN)
Tags: Image Handling
The open source Java agents doing the resizing in Blogsphere today, has some issues with the image quality for certain image types. For example will screenshots look bad when resized. I have therefore added completely transparent support for Import Image 2 Lotus Notes (II2LN), meaning that II2LN will automatically be used if it is installed, and quitly ignored if not. II2LN will resize images with much better quality, and other benefits is that you can import any kind of image type, such as PNG, TIF and BMP files! The best of all, II2LN is free to use together with Blogsphere!
The open source Java agents doing the resizing in Blogsphere today, has some issues with the image quality for certain image types. For example will screenshots look bad when resized. I have therefore added completely transparent support for Import Image 2 Lotus Notes (II2LN), meaning that II2LN will automatically be used if it is installed, and quitly ignored if not. II2LN will resize images with much better quality, and other benefits is that you can import any kind of image type, such as PNG, TIF and BMP files! The best of all, II2LN is free to use together with Blogsphere!
Below you see two albums, where the first uses the standard Java-based resize, and the second uses the II2LN resizing;
The results speak for themselves. This functionallity has been implemented like this;
All changes are in the script library BlogSphere.PhotoImport.
First of all , some definitions in the (Declarations)-section;
Basically I define a global variable II2LNInstallCode which will reveal to the rest of the code whether II2LN is installed or not. Remember, the code should be completely ignorant to II2LN if it isn't installed. The other lines in the declaration defines some functions in in the VCII2LN.DLL. I have only defined the necessary functions to use in this implementation. II2LN contains several other functions, but since they aren't used here, I don't want to confuse you with non-used functions
Then, I have added two new functions to the script library, named VerifyII2LNVersion and II2LN_Resize. The first function do the actual check to see whether II2LN is installed or not. The result from this check is stored in the II2LNInstallCode variable. The second function do the actual resize with II2LN. I don't dive into these functions now, as they should be pretty self explanatory. However, I just want to mention that II2LN controls a lot of its functionality via so-called Import Options. An Import Option is essentially a function within II2LN and some parameters. You can have a bunch of Import Options when you use the ProcessImage-function. All import options are on the format of command:parameter(s). Multiple import options are separated with a semicolon.To make it a little bit easier to separate each import option and their parameters, I use the LotusScript list functionality to build up the string of import options.
The next functions which has got some changes is PhotoImport. The first change is at the very top of the function code;
Here you see I call the VerifyII2LNVersion-function. If II2LN is present I allow for some more files to be imported. Note that this isn't fully implemented yet, so stick to JPGs
The last change is in the ResizeImage-function, which looks like this;
The code above calls the II2LN_Resize function to do the resize there if II2LN is installed. If not, the ordinary JAVA_Resize is called.
How do you get II2LN?
Simple, just head over to http://www.vcode.no/ii2ln and follow the links to download-page. Download the installer and install II2LN locally on your machine. II2LN require a registration key to operate without stamping all images with a logo. However, it is possible from release 1.6.0.0 of II2LN to install the Blogsphere II2LN key by simply by specifying the parameter /BLOGSPHERE to the installer. If you have multiple Notes clients installed, then the installer will attempt to install II2LN on the selectable clients. However, due to the fact that there are many ways to install multiple Notes clients, the installer sometimes fails. If that happens for you, please check out the User's Guide which is included in the installer.
Other cool things to do with II2LN
II2LN can process the images in a multitude of ways, such as rotating, resizing, sharpen, blur etc. Additionally you can overlay text and images (easy to create watermarks on all images
