pa06.h 755 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Do not modify this file.
  3. */
  4. #ifndef PA06_H
  5. #define PA06_H
  6. #include <stdint.h>
  7. #define FALSE 0
  8. #define TRUE 1
  9. #define ECE264_IMAGE_MAGIC_BITS 0x21343632
  10. struct ImageHeader {
  11. uint32_t magic_bits; // Should be ECE264_IMAGE_MAGIC_BITS
  12. uint32_t width; // [width x height], cannot be zero
  13. uint32_t height;
  14. uint32_t comment_len;// A comment added to the file
  15. };
  16. struct Image {
  17. int width;
  18. int height;
  19. char * comment;
  20. uint8_t * data;
  21. };
  22. // -- Load an image from disk
  23. struct Image * loadImage(const char* filename);
  24. // -- Deletes any resources allocated to the image
  25. void freeImage(struct Image * image);
  26. void linearNormalization(struct Image * image);
  27. #endif /* pa06.h */