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.
|
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.
|
|
|
| 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.
|
|
Image input/output functions.
◆ image_open()
ImageOpenResult image_open |
( |
char const * |
img_path, |
|
|
ImageParser * |
parser |
|
) |
| |
Read and parse image.
- Parameters
-
img_path | Path to the image file. |
parser | Image 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_path | Path to the output image file. |
img | Image to be saved. |
builder | Image builder function. |
- Returns
- Image save result.