2.1.13.11 image_import


Description

import an image and get its handle

Syntax

pBITMAPHANDLE image_import( LPCSTR lpcszFile, FILEINFO * pfi = NULL, int * pErrCode = NULL )

Parameters

lpcszFile
[input] the image file name
pfi
[input] pointer to structure of file information
pErrCode
[output] pointer to error code

Return

handle of this image

Examples

EX1

#include <image_utils.h>

void image_import_ex1()
{
    string fn = GetOriginPath() + "samples\\Image Processing and Analysis\\scale.jpg";
    pBITMAPHANDLE pLbmp = image_import(fn);
    Image img;
    img.SetLBmp(pLbmp, false);
    Worksheet wks("Book1");
    wks.SetCell(0, 0, img);
}

Remark

See Also

image_import_to_matrix

Header to Included

image_utils.h

Reference