Package 

Class DocumentCropper

    • Method Summary

      Modifier and Type Method Description
      final ByteArray basicCrop(List<PointF> uiCorners, Float viewWidth, Float viewHeight, Float paddingPercent) Maps the UI guiding lines, expands them outward by a fixed percentage, flattens the perspective natively, and returns a compressed JPEG ByteArray.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DocumentCropper

        DocumentCropper(ByteArray imageBytes)
    • Method Detail

      • basicCrop

         final ByteArray basicCrop(List<PointF> uiCorners, Float viewWidth, Float viewHeight, Float paddingPercent)

        Maps the UI guiding lines, expands them outward by a fixed percentage, flattens the perspective natively, and returns a compressed JPEG ByteArray.

        Parameters:
        uiCorners - Exactly 4 points representing the guiding lines from your UI overlay.
        viewWidth - The actual width of your camera preview layout view.
        viewHeight - The actual height of your camera preview layout view.
        paddingPercent - The percentage to scale outward from the center (e.g., 0.08f for 8%).