public static void addOptionalFeatures(ImageOptions.Builder imageOptionsBuilder, Config config) {
    if (config.usePostprocessor) {
      final Postprocessor postprocessor;
      switch (config.postprocessorType) {
        case "use_slow_postprocessor":
          postprocessor = DelayPostprocessor.getMediumPostprocessor();
          break;
        case "use_fast_postprocessor":
          postprocessor = DelayPostprocessor.getFastPostprocessor();
          break;
        default:
          postprocessor = DelayPostprocessor.getMediumPostprocessor();
      }
      imageOptionsBuilder.postprocess(postprocessor);
    }
    if (config.rotateUsingMetaData) {
      imageOptionsBuilder.rotate(RotationOptions.autoRotateAtRenderTime());
    } else {
      imageOptionsBuilder.rotate(RotationOptions.forceRotation(config.forcedRotationAngle));
    }
  }
Utility method which adds optional configuration to ImageRequest

@param imageOptionsBuilder The Builder for ImageOptions
@param config The Config
samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/util/PipelineUtil.java