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.
|
This header contains declaration of functions related to QOI viewer.
Definition in file qoi_viewer.h.
◆ IMG_BUFFER_SIZE
| #define IMG_BUFFER_SIZE 307200 |
Image buffer size: 320 pixels in width * 240 pixels in height * 4 channels.
Definition at line 46 of file qoi_viewer.h.
◆ 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.
|
Definition at line 53 of file qoi_viewer.h.
◆ draw_image()
This function draws image decoded from QOI.
- Parameters
-
| disp | Surface image |
| info | QOI info for drawing image properly |
Definition at line 51 of file qoi_viewer.c.
◆ 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 |
Definition at line 116 of file qoi_viewer.c.
◆ toggleDebugText()
Toggles printing debugging text.
- Parameters
-
Definition at line 105 of file qoi_viewer.h.
◆ buffer0
Raw image buffer that decoded from qoi image file.
Definition at line 54 of file main.c.
◆ buffer1
second raw image buffer that decoded from qoi image file
Definition at line 57 of file main.c.