Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_CaptureJPEGPicture

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    7
    BOOL NET_SDK_CaptureJPEGPicture(
        LONG lUserID,
        LONG lChannel,
        LPNET_SDK_JPEGPARA lpJpegPara,
        char* sJpegPicBuffer,
        DWORD dwPicSize,
        LPDWORD lpSizeReturned);

    1
    2
    3
    4
    5
    6
    7
    public static extern Boolean NET_SDK_CaptureJPEGPicture(
        Int32 lUserID,
        Int32 lChannel,
        ref NET_SDK_JPEGPARA lpJpegPara,
        IntPtr sJpegPicBuffer,
        UInt32 dwPicSize,
        ref int lpSizeReturned);

### Function Description

Capture JPEG format images and save them. Only supported by Windows version. Capture images in the decoding library.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
lChannelin | LONG | Channel number, starting from 0. This parameter is invalid for IPC devices.
lpJpegParain | `LPNET_SDK_JPEGPARA` | JPEG image parameter structure, refer to `LPNET_SDK_JPEGPARA` (this parameter is not used).
sJpegPicBufferout | char* | JPEG data cache.
dwPicSizein | DWORD | The buffer size requested by sJpegPicBuffer.
lpSizeReturnedout | LPDWORD | Actual JPEG data size.

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

None

Error Code