Binary image creation

Image processing on binary image. But the image size is high that’s why I am trying to save memory. Thx