The program flow:
- The width and height of the Panel are adapted to the aspect ratio of the bitmap.
- Draw with the finger the border for cropping.
- Press Crop, the image is cropped, the entire surface of the Panel is set to transparent and the bitmap is drawn again onto the Panel with the crop path.
- Press Save, the bitmap of the Panel Canvas is saved, the Panel dimensions are reduced to the outer dimensions of the cropped image, the cropped image is drawn onto the Panel. This you can see when the cropped image moves toward the upper left corner. The new Canvas image is saved. I did it that way to see what happens.
- Press Clear, to get the original Panel.
I don't understand exactly your question, but I suppose you are missing the last point in the program flow above.