flutter_image_cropper icon indicating copy to clipboard operation
flutter_image_cropper copied to clipboard

Some problems about web

Open vidyda opened this issue 2 years ago • 4 comments

1.When you open an image locally, there may be some confusion, causing the problem of image scaling. image image 2.In the screenshot, there is a vertical line on the left, which cannot be removed. image

There are also several optimization suggestions: 1.It would be better if the image clipping module could be set with rounded corners, not just circles and squares image 2.If we can make the slider zoom module ourselves, it would be better to provide the zoom API image

vidyda avatar Jan 04 '23 02:01 vidyda

b1cbcf17-5bee-45b8-93b4-e86a3f9eef87 2b085c28-3c17-4fb4-83c6-6426fba83650 The first question is like this. Can anyone answer it

vidyda avatar Jan 06 '23 01:01 vidyda

bc8bc1a8-e5f4-498c-a26d-a526ffe4cdad Canvas data was not bound successfully when the problem occurred e720a9b7-253a-46a5-b3b1-00784de4d398 When rotated, it will be rebound

vidyda avatar Jan 06 '23 07:01 vidyda

I found the problem. In the javascript code, the canvas is initializing before it is loaded, resulting in the inability to obtain the width and height of the canvas, and the problem of scaling misalignment will occur. The solution is to download croppie.min.js, and then modify the width and height of the canvas. If the width and height are not obtained, re-initialize it.

vidyda avatar Jan 11 '23 10:01 vidyda

I found the problem. In the javascript code, the canvas is initializing before it is loaded, resulting in the inability to obtain the width and height of the canvas, and the problem of scaling misalignment will occur. The solution is to download croppie.min.js, and then modify the width and height of the canvas. If the width and height are not obtained, re-initialize it.

Can you provide an example of how you fixed it using this workaround of checking canvas size? Thanks

lucasoares avatar Jun 21 '23 02:06 lucasoares