Machine Vision Camera SDK (C) Developer Guide
nRet = MV_CC_SaveImage(&stParam);
if(MV_OK != nRet)
{
break;
}
//Save converted picture data as file
FILE* fp = fopen("image", "wb");
fwrite(pImage, 1, stParam.nImageLen, fp);
fclose(fp);
free(pImage);
//...other image data processing
nTestFrameSize++;
}
}
free(g_pFrameBuf);
//...other processing
//Stop acquiring image
nRet = MV_CC_StopGrabbing(m_handle);
if (MV_OK != nRet)
{
printf("error: StopGrabbing fail [%x]\n", nRet);
return;
}
//Shut down device and release resource
nRet = MV_CC_CloseDevice(m_handle);
if (MV_OK != nRet)
{
printf("error: CloseDevice fail [%x]\n", nRet);
return;
}
//Destroy handle and release resource
nRet = MV_CC_DestroyHandle(m_handle);
if (MV_OK != nRet)
{
printf("error: DestroyHandle fail [%x]\n", nRet);
return;
}
}
4.8.15 MV_CC_SaveImageEx
Convert original image data into picture format and saves in specified memory, supporting setting
JPEG encoding quality.
164
    "