This header contains declaration of functions related to QOI viewer.
More...
#include "sQOI.h"
#include <stdint.h>
#include <stdbool.h>
#include <libdragon.h>
Go to the source code of this file.
|
#define | IMG_BUFFER_SIZE 307200 |
| Image buffer size: 320 pixels in width * 240 pixels in height * 4 channels.
|
|
|
typedef enum qoi_error_code | qoi_error_code |
| Error codes for different situations when handling a QOI file.
|
|
typedef struct qoi_img_info | qoi_img_info_t |
| Metadata about the QOI image and the QOI image viewer.
|
|
|
uint8_t | buffer0 [IMG_BUFFER_SIZE] |
| Raw image buffer that decoded from qoi image file.
|
|
uint8_t | buffer1 [IMG_BUFFER_SIZE] |
| second raw image buffer that decoded from qoi image file
|
|
This header contains declaration of functions related to QOI viewer.
◆ qoi_error_code
Error codes for different situations when handling a QOI file.
Enumerator |
---|
QOI_NOT_INITIALIZED | QOI Image not yet decoded.
|
QOI_OK | QOI Image decoded successfully.
|
QOI_NULL_BUFFER | No buffer for image found.
|
QOI_INVAILD_FILE | Invaild QOI image file found.
|
QOI_NO_FILE | No file found given a filename to the supposed QOI image.
|
QOI_NO_FILENAME | Filename to the QOI image not passed to decoder.
|
◆ draw_image()
This function draws image decoded from QOI.
- Parameters
-
disp | Surface image |
info | QOI info for drawing image properly |
◆ openQOIFile()
void openQOIFile |
( |
const char * | filename, |
|
|
uint8_t * | bytes, |
|
|
qoi_img_info_t * | info ) |
This function decodes QOI file from from into the framebuffer.
- Parameters
-
filename | Name of the QOI file |
bytes | Pointer to a raw image buffer |
info | QOI decoding info as a result of decoding qoi file |
◆ toggleDebugText()
Toggles printing debugging text.
- Parameters
-