HTMLify
image.h
Views: 2 | Author: abh
#include <stdbool.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#ifndef IMAGE_H
#define IMAGE_H
typedef struct {
unsigned char r;
unsigned char g;
unsigned char b;
} Pixel;
typedef struct {
int width;
int height;
Pixel *pixels;
} Image;
Image *load_image(const char *image_path);
bool save_image(Image*, const char*);
GdkPixbuf *image_to_pixbuf(Image*);
Image *image_new(int, int);
Image *pixbuf_to_image(GdkPixbuf*);
Pixel *image_get_pixel(const Image *, int, int);
void image_set_pixel(Image *, int, int, const Pixel*);
void image_set_pixel_values(Image *, int, int, unsigned char, unsigned char, unsigned char);
Pixel *pixel_new(unsigned char r, unsigned char g, unsigned char b);
#endif