Accusoft ImagXpress 13
LoadBlob Method
A variant that contains information about the image data stored in memory. The Blob data may be in any image format that is supported by the FileName property.
The size of the Blob data.
Description
Loads an image file stored in memory.
Syntax
Visual Basic
Public Sub LoadBlob( _
   ByVal BlobData As Variant, _
   ByVal BlobSize As Long _
) 
Parameters
BlobData
A variant that contains information about the image data stored in memory. The Blob data may be in any image format that is supported by the FileName property.
BlobSize
The size of the Blob data.
Remarks

Note: A Blob is a Binary Large Object.

A typical use of the LoadBlob method is to retrieve image data from a database.

The result of setting this method is identical to setting the FileName property except that the LoadBlob method loads image data from memory while the FileName property loads image data from a disk file.

The LoadBlob method is also the same as the LoadBuffer and LoadBufferPtr methods, except that the interfaces are different:

When an image is loaded using the LoadBlob method, the image is converted to a Device Independent Bitmap (DIB). The hDIB property is set to the handle of DIB. The DIB is converted to a Device Dependent Bitmap (DDB) and the Picture property is set to the resulting DDB. If an Undo DIB resides in memory, it is deleted and the hDIBUndo property is set to NULL.

Note: CameraRAW images can only be loaded from a filename. Loading from a stream is not supported as the entire image must be loaded before the raw format can be recognized.

Example
The following Visual Basic example shows how to retrieve image data from a database using the Visual Basic Data control:
Private Sub Data1_Reposition()
    Dim BlobSize As Long
    Dim ReadData As String

    On Error Goto Err_View

    ' Get the Size of the Image Data
    BlobSize = Data1.Recordset("ImgData").FieldSize()

    ' Get the image data and send it to ImagXpress
    If (BlobSize > 0) Then
        ReadData = Data1.Recordset("ImgData").GetChunk(0, BlobSize)
        ImagXpress1.LoadBlob ReadData, BlobSize
    End If

    ' Exit in case there was an error!
Err_View:

End Sub
See Also

ImagXpress Object  | ImagXpress Members  | LoadBuffer Method  | LoadBufferPtr Method  | FileName Property  | Loading

 

 


©2018. Accusoft Corporation. All Rights Reserved.

Send Feedback