Image Manipulation

How to convert an image to binary image (black and white) and rotating
an image.