16 lines
552 B
C
16 lines
552 B
C
// image.h
|
|
#pragma once
|
|
#ifndef IMAGE_H
|
|
#define IMAGE_H
|
|
#include <stdint.h>
|
|
|
|
extern "C" {
|
|
// Loads an image file as ARGB8888. Returns pointer to pixel data (free with image_free), sets width/height.
|
|
uint32_t* image_load(const char* filename, int* width, int* height);
|
|
// Loads and resizes an image file to desired dimensions as ARGB8888. Returns pointer to pixel data (free with image_free).
|
|
uint32_t* image_load_resized(const char* filename, int desired_width, int desired_height);
|
|
void image_free(uint32_t* data);
|
|
}
|
|
|
|
#endif // IMAGE_H
|