Click or drag to resize
XDL

XFramePictureSaveFrame(String, String, String, XThread) Method

이 객체의 화면 프레임을 이미지로 저장한다.

Namespace: Pixoneer.NXDL.NXVideo
Assembly: NXVideo (in NXVideo.dll) Version: 3.0.0.4
Syntax
C#
public bool SaveFrame(
	string strFilePath,
	string strFormatKey,
	out string strError,
	XThread thd
)

Parameters

strFilePath  String
[In] 파일 저장 경로
strFormatKey  String
[In] 저장을 위한 파일 포맷 Key(Ex. TIFF, NITF, JPEG, BMP...)
strError  String
[Out] 에러 발생시 에러 메시지.
thd  XThread
[In] 처리 상황을 받아 볼 콜백 스레드.

Return Value

Boolean
성공이면 true, 실패면 false를 리턴
Example
XFramePicture 객체를 생성하여 현재 도시된 화면 프레임을 저장한다.
C#
XFramePicture frameRGB = VS.videoChannel.GetRenderedFrameRGB();
SaveFileDialog dlg = new SaveFileDialog();
dlg.Title = "저장경로를 설정하세요.";
dlg.OverwritePrompt = true;
dlg.Filter = "JPEG File(*.jpg)|*.jpg";

Nullable<bool> result = dlg.ShowDialog();
if (result == true)
{
    string strError;
    string strFileName = dlg.FileName;

    // XFramePicture 객체의 화면 프레임을 이미지로 저장
    // 저장을 위한 파일 포맷으로는 TIFF, NITF, JPEG, BMP, JPEG2000 등 지원
    bool bres = frameRGB.SaveFrame(strFileName, "JPEG", out strError, null);
    if (!bres)
    {
        MessageBox.Show(this, "프레임 저장 실패했습니다", "오류");
        return; 
    }
}
See Also