// TODO(satya): Extend this library to gray scale images.
if (numComponents == 3 && toBeProcessed == 9) {
// Process 'Luma' Channel.
// Skipping the component Id field.
binaryParser.skipBytes(is, 1, INVALID_JPEG_ERROR_MSG);
imageParams.setSamplingMode(binaryParser.readByte("Sampling Factors", is,
"Unable to read the sampling factor from the 'Y' channel component spec"));
imageParams.setLumaIndex(binaryParser.readByte("Quantization Table Index", is,
"Unable to read Quantization table index of 'Y' channel"));