Add grayscale JPEG file writer

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>