My web app built with react needs to upload images to a Django server. The upload process is okay except that the server expects square images. I know how to pad or crop the image using python on the server-side, but I feel it is better to do this kind of computations on the client-side. Could anyone points me to some image cropping, padding tools on react framework like PIL, numpy or cv2 in python.
CodePudding user response:
You can try the package, react-image-crop.
This can provide a UI that can crop the image as we want. You can review the code in the working example here.