1
0
Fork 0
mirror of https://github.com/Raymo111/i3lock-color.git synced 2024-11-11 13:50:52 -05:00
i3lock-color/jpg.h
maxice8 c265fea703 jpg.h: add include for sys/types.h and define _GNU_SOURCE.
this allows us to use uint on musl libc systems like Void Linux and
Alpine.
2018-06-27 21:55:47 -03:00

24 lines
482 B
C

#ifndef _JPG_H
#define _JPG_H
#include <sys/types.h>
#define _GNU_SOURCE 1
typedef struct {
uint height;
uint width;
uint stride; // The width of each row in memory, in bytes
} JPEG_INFO;
/*
* Checks if the file is a JPEG by looking for a valid JPEG header.
*/
bool file_is_jpg(char* file_path);
/*
* Reads a JPEG from a file into memory, in a format that Cairo can create a
* surface from.
*/
void* read_JPEG_file(char *filename, JPEG_INFO *jpg_info);
#endif