Version: 1.0
Loading...
Searching...
No Matches
Utility functions for handling image data structures

Detailed Description

The functions in this section cover handling of Ocular's internal image data structures and retrieving information about image files.

Functions

bool ocularGetImageSize (const char *file_path, int *width, int *height, int *file_size)
 Quickly retrieve width and height from an image file without processing image. Supports PNG/GIF/JPEG/BMP/ICO files.
 
const char * ocularGetVersion ()
 Get the version of the library.
 
const char * ocularGetStatusString (OC_STATUS status)
 Get the status string for a given status code.
 

Function Documentation

◆ ocularGetImageSize()

bool ocularGetImageSize ( const char * file_path,
int * width,
int * height,
int * file_size )

Quickly retrieve width and height from an image file without processing image. Supports PNG/GIF/JPEG/BMP/ICO files.

Parameters
file_pathThe absolute file path of the image file.
[out]widthThe returned image file width.
[out]heightThe returned image file height.
file_size[out]The returned file size in bytes.
Returns
True if able to get image size, otherwise False.

◆ ocularGetVersion()

const char * ocularGetVersion ( )

Get the version of the library.

Returns
The version of the library as string.

◆ ocularGetStatusString()

const char * ocularGetStatusString ( OC_STATUS status)

Get the status string for a given status code.

Parameters
statusThe status code returned by Ocular functions.
Returns
The status string.