private void updateRegion() {
    if (mImageInfo == null) {
      return;
    }
    int left = 0;
    int top = 0;
    int right =
        mSelectedRegion.getMeasuredWidth()
            * mImageInfo.getWidth()
            / mFullImageView.getMeasuredWidth();
    int bottom =
        mSelectedRegion.getMeasuredHeight()
            * mImageInfo.getHeight()
            / mFullImageView.getMeasuredHeight();

    ImageDecoder regionDecoder = createRegionDecoder(left, top, right, bottom);
    VitoView.show(
        mUri,
        IMAGE_OPTIONS
            .extend()
            .imageDecodeOptions(
                ImageDecodeOptions.newBuilder().setCustomImageDecoder(regionDecoder).build())
            .build(),
        CALLER_CONTEXT,
        mRegionImageView);
  }
Simple region decoding example that renders the original image and a selected region.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/imagepipeline/ImagePipelineRegionDecodingFragment.java