Axiell WebAPI home page > Documentation > Image handling

Image handling

The wwwopac.ashx offers functionality for efficiently retrieving and safely storing of images. Its high performance for retrieving, scaling and cropping of images for display in the Axiell Collections Media Viewer or for thumbnail display in the Result set view for a search result is accomplished by not resizing the images to be retrieved for every request, but by reducing or enlarging the image only when first requested, and then saving the result in a cache folder so that for a following identical request the next time a ready-made resized image can be retrieved. So the use of wwwopac.ashx for retrieving images is most useful if the images to which you link in your (museum) visual documentation records are pretty large files. For use in thumbnail displays, the image handler will scale those images on the server or it'll retrieve earlier created thumbnails, which results in less data traffic on your network, it lightens the workload of the Collections core software en also diminishes memory use of the work station enormously.
You can also use this functionality to directly and safely store images linked to in a visual documentation record, in a SQL Server Axiell Collections database, although you can store images in the file system as well.

To be able to work with images, you'll first have to configure the images server. Click here for information about how to configure the images server in the adlibweb.xml file.
The two WebAPI functions for retrieving and respectively storing images, are getcontent and writecontent.

Example 1: retrieve an image and fit it, regardless of its size, in a square box of fixed dimensions with a black background:

Example 2: retrieve an image file, scale it to fill a circular box and only show the middle part of the image against a linen background:

Instead of just using the file name of the image to retrieve, you may precede it by a partial path to a subfolder of the main images folder, when applicable. From the wwwopac.ashx version of 2011-10-18 you may also use a full URL pointing to an image file, although in that case resized images won't be cached by wwwopac.ashx so you won't profit from the performance benefits otherwise provided by the caching of images.

Note that during the development phase of this functionality, there was talk of separate software named Image Handler which could have been used alongside wwwopac; however, the relevant functionality is now only available as part of wwwopac.ashx.