sekoyo / react-image-crop

A responsive image cropping tool for React
ISC License
3.85k stars 344 forks source link

Library not supporting image cropping in iOS WebView #589

Open rahul-appinventiv opened 4 months ago

rahul-appinventiv commented 4 months ago

I have implemented the library in ReactJS website to crop images after they've been selected by the user. I am then loading the React web page in a WebView in an iOS app. However, the library in unsupportive towards cropping images with 24 MP resolution (res 4284 X 5712) from the iPhone 15 Pro Max photo gallery which is selected by the user from the WebView of the iOS app. Would like you to provide support for HEIC images with 24 MP (res 4284 X 5712) resolution.

sekoyo commented 4 months ago

HEIC is not supported by browser canvas element so you have to crop it on the server. There is nothing this library can do to support HEIC. Also this library doesn’t do crop previews, an example is in the demo but it’s not bullet proof, you will have to resize your crop previews down to a max size so that they don’t hit iOS size limits

On Tue, 7 May 2024 at 15:27, rahul-appinventiv @.***> wrote:

I have implemented the library in ReactJS website to crop images after they've been selected by the user. I am then loading the React web page in a WebView in an iOS app. However, the library in unsupportive towards cropping images with 24 MP resolution (res 4284 X 5712) from the iPhone 15 Pro Max photo gallery which is selected by the user from the WebView of the iOS app. Would like you to provide support for HEIC images with 24 MP (res 4284 X 5712) resolution.

— Reply to this email directly, view it on GitHub https://github.com/sekoyo/react-image-crop/issues/589, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZT6VSUTG5L3SUAPS32V3ZBB645AVCNFSM6AAAAABHKM7MZ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4DENJQGI4DANI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rahul-appinventiv commented 4 months ago

@sekoyo HEIC, in a way, is supported by browser canvas element. Otherwise, I would not have success with cropping images with lesser resolutions on iPhone 13 (all variants), iPhone 14(all variants) & iPhone 15.

sekoyo commented 4 months ago

Ah yes you’re right, it’s supported in safari

On Tue, 7 May 2024 at 15:37, rahul-appinventiv @.***> wrote:

@sekoyo https://github.com/sekoyo HEIC, in a way, is supported by browser canvas element. Otherwise, I would not have success with cropping images with lesser resolutions on iPhone 13 (all variants), iPhone 14(all variants) & iPhone 15.

— Reply to this email directly, view it on GitHub https://github.com/sekoyo/react-image-crop/issues/589#issuecomment-2097646988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFZT6RPHBIIQXCTVQZ7ADTZBCAEPAVCNFSM6AAAAABHKM7MZ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJXGY2DMOJYHA . You are receiving this because you were mentioned.Message ID: @.***>

rahul-appinventiv commented 4 months ago

Ah yes you’re right, it’s supported in safari

So would you please look into how the library can provide support for cropping HEIC images with 24 MP (res 4284 X 5712) resolution in a WebView on iOS? My app is about to go live and this is the only issue stopping my client from marketing their product.

AsadAlihp commented 4 months ago

@rahul-appinventiv did you find any solution?, Im doing exactly the same using web page in mobile WebView, but the cropped image does not match user selection

rahul-appinventiv commented 4 months ago

@AsadAlihp None. Waiting for @sekoyo to fix this.