void parseSOF(int marker) throws InvalidJpegFormatException, IOException {
            byte[] bytes = new byte[2];
            mIs.read(bytes);
            int num = i16(bytes)-2;
            bytes = new byte[num];
            mIs.read(bytes);

            int precision = bytes[0];
            if (precision != 8){
                throw new InvalidJpegFormatException("当前图像每个数据样本的位数为:"+precision+".\n暂只支持解析样本位数为8位的图像");
            }
            int height = i16(bytes, 1);
            int width = i16(bytes, 3);
            mImg.setSize(width, height, precision);
            switch (bytes[5])
            {
                case 1:
                    mImg.setColors(JPEGImage.COLORS_GREY);
                    break;
                case 3:
                    mImg.setColors(JPEGImage.COLORS_YCrCb);
                    break;
                case 4:
                    mImg.setColors(JPEGImage.COLORS_CMYK);
                    break;
                default:
                    throw new InvalidJpegFormatException();
            }
            for(int i=6;i!=bytes.length;i+=3){
                // 颜色分量id，水平采样因子，垂直采样因子，使用的量化表id
                int color_id = bytes[i];
                int h_samp = bytes[i+1] >>> 4;
                int v_samp = bytes[i+1] & 0x0f;
                int DQT_id = bytes[i+2];
                mImg.setLayer(new JPEGImage.JPEGLayer(color_id, v_samp, h_samp, DQT_id));
            }
        }