THORLABS DCU223x Operation Manual And Sdk page 268

Cdd and cmos cameras
Hide thumbs Also See for DCU223x:
Table of Contents

Advertisement

DCx Cameras
Example 1
IMAGE_FILE_PARAMS ImageFileParams;
ImageFileParams.pwchFileName = NULL;
ImageFileParams.pnImageID = NULL;
ImageFileParams.ppcImageMem = NULL;
ImageFileParams.nQuality = 0;
// Load bitmap into active memory (with file open dialog)
ImageFileParams.nFileType = IS_IMG_BMP;
INT nRet = is_ImageFile(m_hCam, IS_IMAGE_FILE_CMD_LOAD, (void*)&ImageFileParams,
// Load jpeg into active memory (with file open dialog)
ImageFileParams.nFileType = IS_IMG_JPG;
nRet = is_ImageFile(m_hCam, IS_IMAGE_FILE_CMD_LOAD, (void*)&ImageFileParams,
sizeof(ImageFileParams));
// Alloc image memory and load bitmap into it (without file open dialog)
char* pcMemory = NULL;
UINT nID = 0;
ImageFileParams.pwchFileName = L"c:\\test.bmp";
ImageFileParams.pnImageID = &nID;
ImageFileParams.ppcImageMem = &pcMemory;
ImageFileParams.nFileType = IS_IMG_BMP;
nRet = is_ImageFile(m_hCam, IS_IMAGE_FILE_CMD_LOAD, (void*)&ImageFileParams,
sizeof(ImageFileParams));
Example 2
IMAGE_FILE_PARAMS ImageFileParams;
ImageFileParams.pwchFileName = NULL;
ImageFileParams.pnImageID = NULL;
ImageFileParams.ppcImageMem = NULL;
ImageFileParams.nQuality = 0;
// Save bitmap from active memory to file (with file open dialog)
ImageFileParams.nFileType = IS_IMG_BMP;
INT nRet = is_ImageFile(m_hCam, IS_IMAGE_FILE_CMD_SAVE, (void*)&ImageFileParams,
// Save jpeg from active memory with quality 80 (without file open dialog)
ImageFileParams.pwchFileName = L"c:\\test.jpg";
ImageFileParams.nFileType = IS_IMG_JPG;
ImageFileParams.nQuality = 80;
nRet = is_ImageFile(m_hCam, IS_IMAGE_FILE_CMD_SAVE, (void*)&ImageFileParams,
sizeof(ImageFileParams));
// Save png from special memory with quality 50 (with file open dialog)
ImageFileParams.pwchFileName = NULL; ImageFileParams.pnImageID = &nID;
ImageFileParams.ppcImageMem = &pcMemory;
ImageFileParams.nFileType = IS_IMG_PNG;
ImageFileParams.nQuality = 50;
nRet = is_ImageFile(m_hCam, IS_IMAGE_FILE_CMD_SAVE, (void*)&ImageFileParams,
sizeof(ImageFileParams));
266
sizeof(ImageFileParams));
sizeof(ImageFileParams));
// valid buffer
// valid ID
© 2013 Thorlabs GmbH

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcu224xDcc1240xDcc1545mDcc1645c

Table of Contents