public static ImageRequestBuilder fromRequest(ImageRequest imageRequest) {
    return ImageRequestBuilder.newBuilderWithSource(imageRequest.getSourceUri())
        .setImageDecodeOptions(imageRequest.getImageDecodeOptions())
        .setBytesRange(imageRequest.getBytesRange())
        .setCacheChoice(imageRequest.getCacheChoice())
        .setLocalThumbnailPreviewsEnabled(imageRequest.getLocalThumbnailPreviewsEnabled())
        .setLoadThumbnailOnly(imageRequest.getLoadThumbnailOnlyForAndroidSdkAboveQ())
        .setLowestPermittedRequestLevel(imageRequest.getLowestPermittedRequestLevel())
        .setCachesDisabled(imageRequest.getCachesDisabled())
        .setPostprocessor(imageRequest.getPostprocessor())
        .setProgressiveRenderingEnabled(imageRequest.getProgressiveRenderingEnabled())
        .setRequestPriority(imageRequest.getPriority())
        .setResizeOptions(imageRequest.getResizeOptions())
        .setRequestListener(imageRequest.getRequestListener())
        .setRotationOptions(imageRequest.getRotationOptions())
        .setShouldDecodePrefetches(imageRequest.shouldDecodePrefetches())
        .setDelayMs(imageRequest.getDelayMs())
        .setDiskCacheId(imageRequest.getDiskCacheId())
        .setDownsampleOverride(imageRequest.getDownsampleOverride())
        .setResizingAllowedOverride(imageRequest.getResizingAllowedOverride());
  }
Creates a new request builder instance with the same parameters as the imageRequest passed in.

@param imageRequest the ImageRequest from where to copy the parameters to the builder.
@return a new request builder instance
imagepipeline/src/main/java/com/facebook/imagepipeline/request/ImageRequestBuilder.java