src/pt_image.h

Mon, 03 Aug 2009 14:09:20 +0100

author
Philip Pemberton <philpem@philpem.me.uk>
date
Mon, 03 Aug 2009 14:09:20 +0100
changeset 5
1204ebf9340d
parent 3
4aec27d9d4da
permissions
-rw-r--r--

added P-touch decoder source

     1 #ifndef PT_IMAGE_H
     2 #define PT_IMAGE_H
     4 /**
     5  * A storage class for simple images.
     6  *
     7  * Data is stored as bytes, as this makes the math easier (and modern
     8  * computer systems have plenty of RAM anyway).
     9  */
    10 typedef struct {
    11 	unsigned long	width, height;
    12 	unsigned char	*data;
    13 } pt_Image;
    15 pt_Image *ptimage_Create(unsigned long width, unsigned long height);
    16 void ptimage_Free(pt_Image *image);
    17 int ptimage_GetPixel(pt_Image *image, unsigned long x, unsigned long y);
    18 int ptimage_SetPixel(pt_Image *image, unsigned long x, unsigned long y, unsigned char val);
    20 #endif	// PT_IMAGE_H