pitmap.h 601 B

123456789101112131415161718192021
  1. #ifndef PITMAP_H
  2. #define PITMAP_H
  3. #include <stdint.h>
  4. typedef struct {
  5. uint32_t* frame_buffer; // the array that stores the pixel data
  6. int width; // width of the image
  7. int height; // height of the image INCLUDING all stacked frames
  8. int frame_height; // height of each FRAME
  9. int frame_count; // number of frames
  10. uint16_t* frame_delays; // centisecond delay for each frame
  11. } PM_image;
  12. // loads an image file and returns a PM_image
  13. PM_image* PM_load_image(const char* filename, unsigned char debug_mode);
  14. // unallocated a PM_image*
  15. void PM_free_image(PM_image* image);
  16. #endif