My Project
Loading...
Searching...
No Matches
Typedefs | Functions
image_io.h File Reference

Image input/output functions. More...

#include "_file.h"
#include "image.h"
#include "result.h"
#include <stdio.h>

Go to the source code of this file.

Typedefs

typedef ImageParserResult ImageParser(FileBuffer buffer)
 Function that converts image data to a specific format.
 
typedef ImageBuilderResult ImageBuilder(Image img)
 Function that builds data for a specific image file.
 

Functions

 Result (ImageParserResult, Image, uint64_t)
 Image parser result.
 
 IOResult (ImageOpenResult, ImageParserResult)
 Result of image opening.
 
ImageOpenResult image_open (char const *img_path, ImageParser *parser)
 Read and parse image.
 
 Result (ImageBuilderResult, FileBuffer, uint64_t)
 Image builder result.
 
 IOResult (ImageSaveResult, ImageBuilderResult)
 Result of image building and saving.
 
ImageSaveResult image_save (char const *img_path, Image img, ImageBuilder *builder)
 Build and save image.
 

Detailed Description

Image input/output functions.

Function Documentation

◆ image_open()

ImageOpenResult image_open ( char const *  img_path,
ImageParser parser 
)

Read and parse image.

Parameters
img_pathPath to the image file.
parserImage parser function.
Returns
Image open result.

◆ image_save()

ImageSaveResult image_save ( char const *  img_path,
Image  img,
ImageBuilder builder 
)

Build and save image.

Parameters
img_pathPath to the output image file.
imgImage to be saved.
builderImage builder function.
Returns
Image save result.