Issue: Canvas Area Exceeds Maximum Limit on iOS Safari
Description
When attempting to resize large images on iOS using Safari, the process fails due to the browser's limitations. Specifically, this issue arises because Safari restricts the canvas area to a maximum size (width * height > 16777216). As a result, resizing large images leads to failures, often resulting in a black image being sent to the server.
Steps to Reproduce
Open Safari on an iOS device.
Attempt to resize a large image (e.g., an image with dimensions that exceed the maximum canvas area).
Observe the failure and the resulting black image.
Expected Behavior
Large images should either:
Not be resized if the canvas size exceeds the maximum limit.
Be resized using an alternative method that does not rely on the canvas.
Actual Behavior
The resizing process fails, and a black image is sent to the server.
Suggested Solution
Implement a check for the canvas size before resizing. If the size exceeds the limit, either:
Skip the resizing process, or
Use a different resizing method that does not involve the canvas.
Additional Information
While resizing images before uploading is typically desired, it is preferable to avoid sending a black image due to resizing issues. This solution aims to provide a more graceful fallback for handling large images in Safari on iOS.
Issue: Canvas Area Exceeds Maximum Limit on iOS Safari
Description
When attempting to resize large images on iOS using Safari, the process fails due to the browser's limitations. Specifically, this issue arises because Safari restricts the canvas area to a maximum size (width * height > 16777216). As a result, resizing large images leads to failures, often resulting in a black image being sent to the server.
Steps to Reproduce
Expected Behavior
Large images should either:
Actual Behavior
The resizing process fails, and a black image is sent to the server.
Suggested Solution
Implement a check for the canvas size before resizing. If the size exceeds the limit, either:
Additional Information
While resizing images before uploading is typically desired, it is preferable to avoid sending a black image due to resizing issues. This solution aims to provide a more graceful fallback for handling large images in Safari on iOS.