BRL-CAD
Loading...
Searching...
No Matches
libicv (Image Conversion and Processing)
Collaboration diagram for libicv (Image Conversion and Processing):

Modules

 Definitions
 Definitions used in the LIBICV image processing library.
 
 Colorspace
 Functions to change an image from one color space to another.
 
 Crop Image
 Functions for cropping images.
 
 Image Filters
 Routines for image filtering.
 
 Image Read/Write
 Functions provided by the LIBICV image processing library for reading and writing of images.
 
 Image Operations
 
 Image Statistics
 

Files

file  anim.h
 
file  icv.h
 

Typedefs

typedef struct icv_anim icv_anim_t
 

Enumerations

enum  icv_anim_format_t { ICV_ANIM_UNKNOWN = 0 , ICV_ANIM_APNG = 1 , ICV_ANIM_MJPG = 2 }
 

Functions

icv_anim_ticv_anim_create (icv_anim_format_t format, uint32_t width, uint32_t height, int fps)
 
icv_anim_ticv_anim_read (const char *filename)
 
int icv_anim_write (const icv_anim_t *anim, const char *filename)
 
int icv_anim_destroy (icv_anim_t *anim)
 
int icv_anim_add_frame (icv_anim_t *anim, const icv_image_t *img)
 
int icv_anim_insert_frame (icv_anim_t *anim, size_t index, const icv_image_t *img)
 
int icv_anim_replace_frame (icv_anim_t *anim, size_t index, const icv_image_t *img)
 
int icv_anim_remove_frame (icv_anim_t *anim, size_t index)
 
icv_image_ticv_anim_get_frame (const icv_anim_t *anim, size_t index)
 
size_t icv_anim_num_frames (const icv_anim_t *anim)
 
int icv_anim_set_fps (icv_anim_t *anim, int fps)
 
int icv_anim_set_frame_delay (icv_anim_t *anim, size_t index, uint32_t delay_usec)
 

Detailed Description

Functions for creating and manipulating animations (APNG, MJPG) provided by the LIBICV image processing library.

Functions provided by the LIBICV image processing library.

Typedef Documentation

◆ icv_anim_t

Opaque animation object

Definition at line 45 of file anim.h.

Enumeration Type Documentation

◆ icv_anim_format_t

Supported animation formats

Enumerator
ICV_ANIM_UNKNOWN 
ICV_ANIM_APNG 
ICV_ANIM_MJPG 

Definition at line 38 of file anim.h.

Function Documentation

◆ icv_anim_create()

icv_anim_t * icv_anim_create ( icv_anim_format_t  format,
uint32_t  width,
uint32_t  height,
int  fps 
)
extern

Create a new empty animation object.

Parameters
formatThe output format (ICV_ANIM_APNG or ICV_ANIM_MJPG).
widthThe canvas width (can be 0 to auto-detect based on frames).
heightThe canvas height (can be 0 to auto-detect based on frames).
fpsThe default frames per second for the animation.

◆ icv_anim_read()

icv_anim_t * icv_anim_read ( const char filename)
extern

Read an animation from file into an animation object.

Parameters
filenameThe path to the animation file.

◆ icv_anim_write()

int icv_anim_write ( const icv_anim_t anim,
const char filename 
)
extern

Write the animation object to a file.

Parameters
animThe animation object.
filenameThe output file path.

◆ icv_anim_destroy()

int icv_anim_destroy ( icv_anim_t anim)
extern

Free an animation object.

Parameters
animThe animation object.
Returns
0 on success.

◆ icv_anim_add_frame()

int icv_anim_add_frame ( icv_anim_t anim,
const icv_image_t img 
)
extern

Append a frame to the end of the animation.

Parameters
animThe animation object.
imgThe frame image data.

◆ icv_anim_insert_frame()

int icv_anim_insert_frame ( icv_anim_t anim,
size_t  index,
const icv_image_t img 
)
extern

Insert a frame into the animation at the specified 0-based index.

Parameters
animThe animation object.
indexThe 0-based insertion index.
imgThe frame image data.

◆ icv_anim_replace_frame()

int icv_anim_replace_frame ( icv_anim_t anim,
size_t  index,
const icv_image_t img 
)
extern

Replace a frame in the animation at the specified 0-based index.

Parameters
animThe animation object.
indexThe 0-based replacement index.
imgThe frame image data.

◆ icv_anim_remove_frame()

int icv_anim_remove_frame ( icv_anim_t anim,
size_t  index 
)
extern

Remove a frame from the animation at the specified 0-based index.

Parameters
animThe animation object.
indexThe 0-based removal index.

◆ icv_anim_get_frame()

icv_image_t * icv_anim_get_frame ( const icv_anim_t anim,
size_t  index 
)
extern

Extract a specific frame from the animation.

Parameters
animThe animation object.
indexThe 0-based index of the frame to extract.
Returns
A newly allocated icv_image_t containing the frame. Must be freed by caller.

◆ icv_anim_num_frames()

size_t icv_anim_num_frames ( const icv_anim_t anim)
extern

Get the number of frames currently in the animation.

Parameters
animThe animation object.
Returns
The number of frames.

◆ icv_anim_set_fps()

int icv_anim_set_fps ( icv_anim_t anim,
int  fps 
)
extern

Set the global frames per second for the animation.

Parameters
animThe animation object.
fpsThe frames per second.
Returns
0 on success, -1 on invalid input.

◆ icv_anim_set_frame_delay()

int icv_anim_set_frame_delay ( icv_anim_t anim,
size_t  index,
uint32_t  delay_usec 
)
extern

Set a specific frame's delay in microseconds. This overrides the global FPS for this specific frame. (Note: Only fully supported by APNG format. MJPG will use the global FPS and generally ignore per-frame delays).

Parameters
animThe animation object.
indexThe 0-based index of the frame.
delay_usecThe delay in microseconds (1,000,000 = 1 second).