@Nullable
    @Override
    public ImageFormat determineFormat(byte[] headerBytes, int headerSize) {
      if (headerSize < getHeaderSize()) {
        return null;
      }
      if (ImageFormatCheckerUtils.startsWithPattern(headerBytes, HEADER)) {
        return IMAGE_FORMAT_COLOR;
      }
      return null;
    }
Custom color format checker that verifies that the header of the file corresponds to our {@link
#COLOR_TAG}.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/imageformat/color/ColorImageExample.java