Added quantization tables and subsampling options to the JPEG encoder.