02 REFERENCE GUIDE
Converting Bitmaps into GIFs
Lotus Notes/Domino
has long used a proprietary format for storage of bitmaps in rich
text. Prior to R5, this was the only way images could be
stored in rich text, so all images were converted to this proprietary
format when imported. In R5 and beyond, it became possible
to store GIF and JPEG images (usually image files with extensions of
.gif and .jpg respectively) in a native format. Since these
formats are compressed, this allowed a much smaller storage size for
the rich text. In addition, since the web does not support
the proprietary bitmap format, this allows images to be displayed
without requiring conversion.
Along with Midas
Version 2.50, we have introduced a utility call the Genii GrabIt LSX,
which can be used to grab an image from a URL. This utility
is used along with the
GraphicOffset property
to retrieve the image converted by the Domino HTTP stack, and then is
used to replace the existing bitmap graphic. The
GraphicFormat property
is used to ensure that only "Notes Bitmap" images will be
replaced.
Installing / Using this Sample (must be followed carefully):
If the database is on a server which allows web access, change the
SOURCE_SERVER constant below to the web server name used from the
web. If the database is local, you must have the ability to
preview locally (comes with Designer), and you must preview some
document in the web browser before starting the process.
THIS IS CRITICAL! If you do not, you will not be able to
retrieve images using Genii GrabIt LSX, and you will lose your images.
To convert, follow
these steps:
-
Make a backup of
your database.
-
Create an agent
called Convert Bitmaps to GIFs and import the code below.
Make sure the agent is set to run on all selected documents.
-
Change the
SOURCE_WEB_FILEPATH constant to the correct database filepath.
-
Change the
SOURCE_WEB_VIEW constant to the view which you want used to open the
documents. It should have access to all documents.
-
If database is
local, preview a document (any document will do) in IE or
Netscape. This starts nhttp.exe, which is used to render
documents using local web browser.
-
Run the agent on a
document which has a bitmap image. If the image is still
visible after running the agent, look at the BitmapStatus field
through the document properties. This may not exist, or may
say "Stored", which means the agent worked. If
you try this on document with lots of images or with large
bitmap images, the size of the document can be checked to see how much
space is saved (often a great deal).
Additional
information and samples are available from Genii Software either on
our website at http://GeniiSoft.com or by request at
Support@GeniiSoft.com. Free evaluation licenses are also
available from our website or by filling out our on-line request form
at http://GeniiSoft.com/showcase.nsf/WebEvalRequest.
Submitted by:
Ben Langhinrichs of Genii Software