Skip to content

image_io

Image I/O.
More...


Functions

morapi_Result  morapi_ImageIO__getImageSize (morapi_Env *env, morapi_Int32 *o_width, morapi_Int32 *o_height, const morapi_Char *i_file_name)
morapi_Result  morapi_ImageIO__load (morapi_Image *o_image, morapi_ImageFormat i_image_format, const morapi_Char *i_file_name)
morapi_Result  morapi_ImageIO__saveJpeg (const morapi_Char *i_file_name, const morapi_Image *i_image, morapi_Int32 i_quality)
morapi_Result  morapi_ImageIO__savePng (const morapi_Char *i_file_name, const morapi_Image *i_image)
morapi_Result  morapi_ImageIO__savePpm (const morapi_Char *i_file_name, const morapi_Image *i_image)
morapi_Result  morapi_ImageIO__savePgm (const morapi_Char *i_file_name, const morapi_Image *i_image)


Detailed Description

Image I/O.


Function Documentation


morapi_ImageIO__getImageSize()

morapi_Result morapi_ImageIO__getImageSize (morapi_Env * env,
                                            morapi_Int32 * o_width,
                                            morapi_Int32 * o_height,
                                            const morapi_Char * i_file_name)

Gets image width and height from a file.

It automatically analyzes the image codec in the file (i.e., jpeg, png and so on).


morapi_ImageIO__load()

morapi_Result morapi_ImageIO__load (morapi_Image * o_image,
                                    morapi_ImageFormat i_image_format,
                                    const morapi_Char * i_file_name)

Reads an image from a file.

It automatically analyzes the image codec in the file (i.e., jpeg, png and so on).


test_dnn_api.c.


morapi_ImageIO__saveJpeg()

morapi_Result morapi_ImageIO__saveJpeg (const morapi_Char * i_file_name,
                                        const morapi_Image * i_image,
                                        morapi_Int32 i_quality)

Writes an image to a jpeg file.

i_quality takes a value from 0 to 256 and larger is better.


morapi_ImageIO__savePng()

morapi_Result morapi_ImageIO__savePng (const morapi_Char * i_file_name,
                                       const morapi_Image * i_image)

Writes an image to a jpeg file.


morapi_ImageIO__savePpm()

morapi_Result morapi_ImageIO__savePpm (const morapi_Char * i_file_name,
                                       const morapi_Image * i_image)

Writes an image to a ppm file.


morapi_ImageIO__savePgm()

morapi_Result morapi_ImageIO__savePgm (const morapi_Char * i_file_name,
                                       const morapi_Image * i_image)

Writes an image to a pgm file.