private @Nullable Map<String, String> getExtraMap(
        EncodedImage encodedImage,
        @Nullable ResizeOptions resizeOptions,
        @Nullable ImageTranscodeResult transcodeResult,
        @Nullable String transcoderId) {
      if (!mProducerContext
          .getProducerListener()
          .requiresExtraMap(mProducerContext, PRODUCER_NAME)) {
        return null;
      }
      String originalSize = encodedImage.getWidth() + "x" + encodedImage.getHeight();

      String requestedSize;
      if (resizeOptions != null) {
        requestedSize = resizeOptions.width + "x" + resizeOptions.height;
      } else {
        requestedSize = "Unspecified";
      }

      final Map<String, String> map = new HashMap<>();
      map.put(INPUT_IMAGE_FORMAT, String.valueOf(encodedImage.getImageFormat()));
      map.put(ORIGINAL_SIZE_KEY, originalSize);
      map.put(REQUESTED_SIZE_KEY, requestedSize);
      map.put(JobScheduler.QUEUE_TIME_KEY, String.valueOf(mJobScheduler.getQueuedTime()));
      map.put(TRANSCODER_ID, transcoderId);
      map.put(TRANSCODING_RESULT, String.valueOf(transcodeResult));
      return ImmutableMap.copyOf(map);
    }
Resizes and rotates images according to the EXIF orientation data or a specified rotation angle.

<p>If the image is not supported by the {@link ImageTranscoder}, no transformation is applied.

<p>This can be used even if downsampling is enabled as long as resizing is disabled.
imagepipeline/src/main/java/com/facebook/imagepipeline/producers/ResizeAndRotateProducer.java