Function gpujpeg_image_save_to_file

Source
pub unsafe extern "C" fn gpujpeg_image_save_to_file(
    filename: *const c_char,
    image: *const u8,
    image_size: usize,
    param_image: *const gpujpeg_image_parameters,
) -> c_int
Expand description

Save image to a file

File format is deduced from the filename extension (if any).

Use the extension "XXX" (eg. "image.XXX") to automatically select the extension according to param_image. PNM is used for grayscale or RGB, PAM for RGBA, Y4M ottherwise. "XXX" placeholder in filename is replaced with used extension. It is user responsibility to ensure that @ref filename is writable in this case.

@param filaname Image filename @param image Image data buffer @param image_size Image data buffer size @param param_image Image properties (may be NULL)

ยงreturn

0 if succeeds, otherwise nonzero