Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Fri 21 Nov 2003, 02:33 PM
After missing a day due to my wife's birthday (duty calls), here is the next in my customer inspired list of the top ten ways to use Midas which I started a few days ago with  #10) Rich text comparisons with red-lining.  I now offer #7...


#7) Work with images in rich text and in image resources

Description
Midas has long allowed developers to access and modify images, referred to as graphics in some cases.  From the early days when all images were stored in internal Notes bitmap format to the current images that may be JPEG or GIF images, and may be stored in native form or as attachments or even URLs, and even image resources that may be included in a rich text field or on a form, Midas has given access to all of them.

History
The ability to import images has been available since Version 1.00 in June, 1997.  As additional formats have been added, Midas has been enhanced to handle the new formats, then to add image resources, and finally to modify the attributes on graphics such as alt text, image hotspots, and image flow (how text flows around the image).  As recently as Version 3.20, we have added the ability to convert Notes bitmap images into GIF images, thereby saving a great deal of space and making export of the Notes bitmap images possible.

Comparison with standard Notes/Domino functionality
Notes 6.x has incorporated some ability to access images, but mostly only to delete them or move them about.  There is no facility in the backend to import images, no facility to modify the attributes of the image, no facility to export or extract the images.  In short, the Notes model barely handles images at all.

Documentation
Documented in the Help database by looking at the properties, methods and events associated with importing, exporting and modifying graphics, including the AppendGraphic method, ExportGraphic methid and SetTargetProperties method, as well as a series of properties such as GraphicWidth and GraphicHeight, GraphicFormat (which shows whether the graphic is in Notes bitmap format, JPEG or GIF format or an image resource), and GraphicOffset, which the special offset needed to use in URL's which reference the graphic directly from the rich text.

On-line demo
None available at this time.

Sample Database
Graphics are used so extensively that there are no specific samples dedicated to their use, but graphics are used in samples such as Walden, Jose's Keyword Replacements, Generate HTML, Export To MS Word, etc.  If we add a Graphics-specific sample, I'll change this post to reflect that.
Sample Script Snippet
This is adapted from a Help database script:

Set rtchunk = rtitem.DefineChunk("Graphic 1")
found = False
While rtchunk.Exists And Not found
  If rtchunk.GraphicFormat = "Notes Bitmap" Then
    Call rtchunk.ConvertBitmaps("Format=GIF")
  End If
  Call rtchunk.ExportGraphic(path & doc.NoteID & "_" & rtchunk.GraphicFormat & "." & rtchunk.GraphicFormat)
  found = True
  rtchunk.GetNextTarget
Wend

Copyright © 2003 Genii Software Ltd.

Fri 21 Nov 2003, 01:17 PM
I had to laugh.  One of our on-line demos for Midas shows how you can send HTML mail (click here to try it), so I have occasionally worried that somebody might hijack the demo to send offensive messages or pictures "from Genii Software".  Because of this, I check the messages if they are different than the standard message, just to know if I need to let somebody know a message was not from us.
 
Today, I found my first "offensive" picture.  Well, it might not be offensive to some, but I live in Cleveland, Ohio, and the big OSU-Michigan game takes place tomorrow.  I am not quite sure whether this was someone showing team spirit (for the wrong team) or simply demonstrating the power of Midas to colleagues, but I hope they don't mind my sharing this picture.
 
 
 
I am not much of a football fan, but I feel it is my duty to point out that Michigan doesn't stand a chance.

Copyright © 2003 Genii Software Ltd.

Fri 21 Nov 2003, 10:51 AM
Well, for the fourth year in a row, I will be speaking at Lotusphere, but for the first time, it won't be any variation of my rich text talk.  This year I'm doing a talk on Advanced Lotus Notes/Web Coexistence, which is all about how to exploit some lesser known, or even well known, the features in R5, ND6 and ND6.5 to design once for both platforms, and when not to bother.  The official abstract is:

Discover useful tricks and techniques for handling forms, views and databases that must be used in both the Notes client and a web browser. Learn ways to better handle rich text fields, @DbLookups, JavaScript and UI methods to allow an optimal experience for both Notes users and web users. Learn when to create two sets of design elements and when to use just one. Covers native and third party solutions for managing Notes/Web coexistence.


I hope to see some of you there!  For those of you who are going to miss my demo filled rich text talk, I still plan to include some fun and fireworks.  Come and join the fun.

Copyright © 2003 Genii Software Ltd.