How to convert a boolean array to a GIF image file (and vice versa)?
I have an application where I need to do the following:
I have a two-dimensional array containing boolean values. I would like to convert these data into an image such that 'true' array elements become 'white' pixels and 'false' array elements become 'black' pixels. Then I want to save the image to a file in GIF or PNG format.
Conversely, I want to import a GIF or PNG image into a boolean array, such that white pixels become true elements and non-white pixels become false elements.
My array of boolean values uses standard [row][column] ordering of the subscripts, i.e. myArray is the top left corner of the image and myArray[height-1][width-1] is the bottom right corner.
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.