mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-03 04:54:26 +00:00
Update pikture.h
This commit is contained in:
parent
0bd5fc6f4c
commit
79a46b3ddf
1 changed files with 5 additions and 13 deletions
18
pikture.h
18
pikture.h
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
pikture.h
|
pikture.h
|
||||||
Native PIKTURE format encoder and decoder library.
|
Native PIKTURE format encoder and decoder library.
|
||||||
Version: 100
|
Version: 101
|
||||||
License: MIT
|
License: MIT
|
||||||
Made by: Nexoniarz
|
Made by: Nexoniarz
|
||||||
*/
|
*/
|
||||||
|
|
@ -12,34 +12,26 @@ Made by: Nexoniarz
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
/* Image data structure */
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t width;
|
uint16_t width;
|
||||||
uint16_t height;
|
uint16_t height;
|
||||||
uint8_t channels; /* Always 4 (RGBA) */
|
uint8_t channels;
|
||||||
uint8_t* pixels; /* Raw RGBA pixel array */
|
uint8_t endianness;
|
||||||
|
uint8_t* pixels;
|
||||||
} pikture_t;
|
} pikture_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* * Loads a PIKTURE image from the specified file path.
|
|
||||||
* Returns a pointer to a pikture_t struct, or NULL on failure.
|
|
||||||
*/
|
|
||||||
pikture_t* pikture_load(const char* filename);
|
pikture_t* pikture_load(const char* filename);
|
||||||
|
|
||||||
/* * Saves a PIKTURE image to the specified file path.
|
|
||||||
* Returns 1 on success, 0 on failure.
|
|
||||||
*/
|
|
||||||
int pikture_save(const char* filename, const pikture_t* img);
|
int pikture_save(const char* filename, const pikture_t* img);
|
||||||
|
|
||||||
/* * Frees the memory allocated for the PIKTURE image.
|
|
||||||
*/
|
|
||||||
void pikture_free(pikture_t* img);
|
void pikture_free(pikture_t* img);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* PIKTURE_H */
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue