My Project
|
BMP image handling functions. More...
#include "_file.h"
#include "image.h"
#include "image_io.h"
#include "result.h"
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Enumerations | |
enum | FromBmpStatus { FROM_BMP_OK = 0 , FROM_BMP_INVALID_HEADER , FROM_BMP_UNSUPPORTED_FORMAT , FROM_BMP_UNSUPPORTED_COMPRESSION , FROM_BMP_UNSUPPORTED_COLOR_DEPTH , FROM_BMP_INVALID_PIXELS , FROM_BMP_CANNOT_ALLOC_MEMORY } |
Status codes for reading BMP images. More... | |
enum | ToBmpStatus { TO_BMP_OK = 0 , TO_BMP_BAD_IMAGE_DATA , TO_BMP_WRITE_FAILED , TO_BMP_CANNOT_ALLOC_MEMORY } |
Status codes for writing BMP images. More... | |
Functions | |
ImageParserResult | from_bmp (FileBuffer buffer) |
Read BMP image from file. | |
ImageBuilderResult | to_bmp (Image img) |
Write image to file in BMP format. | |
BMP image handling functions.
enum FromBmpStatus |
Status codes for reading BMP images.
Enumerator | |
---|---|
FROM_BMP_OK | Image read properly. |
FROM_BMP_INVALID_HEADER | Unsupported or broken header. |
FROM_BMP_UNSUPPORTED_FORMAT | Not BMP format. |
FROM_BMP_UNSUPPORTED_COMPRESSION | Unsupported compression. |
FROM_BMP_UNSUPPORTED_COLOR_DEPTH | Unsupported color depth. |
FROM_BMP_INVALID_PIXELS | Cannot read pixel data. |
FROM_BMP_CANNOT_ALLOC_MEMORY | Not enough memory for image. |
enum ToBmpStatus |
ImageParserResult from_bmp | ( | FileBuffer | buffer | ) |
Read BMP image from file.
buffer | File buffer containing BMP data. |