N64 QOI Demo
A N64 homebrew app that opens QOI images from ROM
Loading...
Searching...
No Matches
qoi_viewer.c File Reference

This source code implements functions related to QOI viewer. More...

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sQOI.h"
#include "qoi_viewer.h"
#include <assert.h>

Functions

void draw_image (surface_t *disp, qoi_img_info_t info)
 This function draws image decoded from QOI.
 
void openQOIFile (const char *filename, uint8_t *bytes, qoi_img_info_t *info)
 This function decodes QOI file from from into the framebuffer.
 

Detailed Description

This source code implements functions related to QOI viewer.

Function Documentation

◆ draw_image()

void draw_image ( surface_t * disp,
qoi_img_info_t info )

This function draws image decoded from QOI.

Parameters
dispSurface image
infoQOI 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
filenameName of the QOI file
bytesPointer to a raw image buffer
infoQOI decoding info as a result of decoding qoi file