Is it possible to create binary, not grayscale image?
(So it would use 8 times less memory)
You can create a binary image, but it won't save space.
See this answer.