DBPix Documentation
Version 2.0

ImageLoadFile Method


Description:  Loads the image specified by the FileName argument from disk
Syntax:  boolean ImageLoadFile(BSTR FileName)
Return Value:  
True    The image was loaded successfully.
False    An error occurred.
Arguments:  

Name    Type    Description

FileName    BSTR    Path and filename of the image to load.

Remarks:  

After decoding the image it will be resampled (resized) if specified by the ImageResampleMode property, then encoded according to the ImageSaveFormat property (and any relevant format-specific property settings for JPEG, PNG etc).

The ImageModified. and ImageChanged events will be fired, and if DBPix is bound to a data-source the source will be updated.

To prevent recompression of JPEG images (and avoid unnecessary JPEG 'generational loss') see the JPEGNoRecompress property (ImageResampleMode must also be set to ImageResampleModeOriginal [1]).

Image files can also be loaded via the context-menu at runtime (the ViewMenuMode property controls which menu-items are displayed at runtime).

To simply display an image file, use the ImageViewFile method.

See also the ImageLoad method, which prompts the user to choose a file using the common File-Open dialog.

 

 

Documentation version 2.0.0