-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cropper adds a line to image if it's too big #476
Comments
I'm having the same problem! Thanks for reporting the issue 👍 |
What's the browser and system? |
I apologize for the delay fengyuanchen! I've been out of town. |
If you want I can send you the specific image I'm having issues with also! but any big image in terms of resolution is having the same problem on my end. I've even tried it on a Mac and Safari (don't know version here as it was a firend's computer) and was getting the same issue. |
Send me the specific image please as I found that everything is fine on Chrome 46 and Windows 10 in my computer. |
It seems to be an issue of the CanvasRenderingContext2D.drawImage API, and it only occurs when the dimensions of the image large than some threshold values (e.g. 5400 × 3600 px). |
Ok...so then this is not a an issue with the cropper, is just that the API is like that. Can you think of any workaround that doesn't involve re-sizing the image to a lower res? or we are stuck with this API issue? |
Passed browsers:
Failed browsers:
So, this may be a bug of the Webkit or Chromium? |
You could run this through a pre-renderer first to crop the image back. We use BlueImp's Javascript Load Image and set the max-width to: 1500
|
We've got the same issue here on Windows / Chome. I tried a lot of time with Ubuntu / Chrome and never succeed to reproduce it, with the same picture. The picture is (10 109 x 4 542 px) |
Hi @hppycoder , |
Hi @hppycoder! I'm already using that for mobile cropping, as the memory there is an issue with big images. |
Hi, It's need to resolve the problem. |
@ctomoshekamer I just try your solution, It really resolves the problem. You are so awesome!!! 👍 |
Sorry for the late comment, but I couldn't leave the opportunity to say thank you!! This is great!! |
Hi!
I'm facing an issue with big images. And I mean big in pixels, not necessarily big on size.
I have for example this sunset image which is 5472 x 3648px and weights about 581kb.
When I upload it to the cropper, it looks good:
I make a little zoom, move it around a bit and click on the "get cropped canvas" button on the demo page for the cropper, and I end up with the cropped image with a weird line. Some times is vertical, some times it's horizontal:
Do you guys know anything about this and how to avoid it?
The text was updated successfully, but these errors were encountered: