Click or drag to resize

Person Picture and Blobs

Pictures are get/set’able, and extractable via COM

Pictures are currently supported on three objects: Picture, Picture, and Picture

 

ISOPicture : IDispatch
    Id         -> record identity (read-only)
    Type     -> string   (read-only - picture format GIF/JPEG/BMP)
    Height    -> long   (read-only – pixel size of picture)
    Width    -> long   (read-only)
    IsReadOnly  -> boolean  (read-only – can we load a new picture?)
    Picture   -> bitmap  (get picture in format suitable for use with GUI controls)
    ReadFromFile( path )    (can’t be called if read-only)
    WriteToFile( path  )
    Delete()      (removes picture from object - can’t be called if read-only)

 

 

This means we can write code like this:

    Set p = db.GetPerson( 123 )
    If p.HasPicture Then
       p.Picture.WriteToFile( "123.image.jpg"  )
       msgbox p.Picture.Width & "x" &  p.Picture.Height
    Else
       p.Picture.ReadFromFile("defaultimage.jpg")
       p.Save
    End if

 

 

The blob system is also accessible from the Database object:

[Database.ExportBlobToFile] and [Database.ImportBlobFromFile]

 

This allows you to store any object you like in the database, and to associate it with any object in the database you like.

Up: Using SuperOfficeDB   Prev: More Simple Searches   Next: Recurring Appointments          Edit