A program that creates a data type that stores a b&w image and pixelated image
A program that creates a data type that stores a b&w image and pixelated image
The algorithm:
- call create_image with the width and height of the image
- call set_pixel for every pixel in the image to make them monochrome
- call get_pixel for every pixel to read the monochrome value and save it
- call destroy_image to free the allocated memory
How to execute the program:
./blocky sparty.png sparty-m.png
The original image: The black and white image produced: The pixelated image produced: