public static String makeSOFSection(int length, int bitDepth, int width, int height) {
    return SOF_MARKER
        + encodeInt2HexString(length, 2, false)
        + encodeInt2HexString(bitDepth, 1, false)
        + encodeInt2HexString(height, 2, false)
        + encodeInt2HexString(width, 2, false)
        + encodeInt2HexString(0, length - 7, false);
  }
Provide test use functions for JfifUtilTest.
imagepipeline-base/src/test/java/com/facebook/imageutils/JfifTestUtils.java