Quote:How to convert pixels to binary?
But pixels are already binary, What you mean ?
An image stored to file is like any file, so any file encrypting technique works with images.
From encryption point of view, any file is a string of byte, no more no less.
My advice: Save the image to file, and then encrypt the file. tools for both operations are standard.