added greyscaling and 12-bit respective hack