Closed bennymeier closed 1 year ago
The reason for this is that it renders the image onto an internal canvas when it loads, and it takes a while for large images. I guess I should add a loading indicator or something like that.
Theoretically, it should be possible to rework this so the initial rendering happens in parallel but could be a can of worms in terms of syncing. Or maybe move it to right before rendering the final result and show a progress bar there.
I'll look into it.
The reason for this is that it renders the image onto an internal canvas when it loads, and it takes a while for large images. I guess I should add a loading indicator or something like that.
Theoretically, it should be possible to rework this so the initial rendering happens in parallel but could be a can of worms in terms of syncing. Or maybe move it to right before rendering the final result and show a progress bar there.
I'll look into it.
I'm not sure if cropro's Renderer.ts
works the same way as the markerjs2's Renderer.ts
, but it seems to me that there are no problems there - even with larger images.
Maybe a customization like in markerjs2 could be a quick solution?
marker.js and cropro work differently in this regard. marker.js never touches the actual underlying image until the final render and since there's no underlying image manipulations in marker.js, everything is much simpler in that regard.
I've just release v1.2.4 where I've changed the rendering logic, and the editor should appear instantly (it could take a moment for the image to show up in it for the first time). The rendering on save now takes a bit longer as a result but I've added a spinner so the perception should be better.
Let me know how it works for you now.
I've just release v1.2.4 where I've changed the rendering logic, and the editor should appear instantly (it could take a moment for the image to show up in it for the first time). The rendering on save now takes a bit longer as a result but I've added a spinner so the perception should be better.
Let me know how it works for you now.
Looks very good now imo! Thanks a lot. 🎉
Hi, we are testing to introduce cropro in our product because we are already convinced by markerjs2. Unfortunately the editor opens very slowly, it takes 2-4 seconds to open an image of 2-4MB. It also feels almost like an infinity loop.
Do you have any idea what this could be due to? I am using the normal code from the demo.
You can check it out here: https://codesandbox.io/s/cropro-all-defaults-demo-forked-tcr5mn?file=/index.html
Many greetings Benny