New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research is needed if quality of resizing with canvas can be improved #354

Open
jswiderski opened this Issue Apr 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@jswiderski

jswiderski commented Apr 6, 2018

By default resizing with the help of canvas in a browser works much worse than resizing on server thus the qualities of the resized images are different when we take same image and: use context menu -> Edit -> Resize -> Save vs use context menu -> Choose Resized.

We should make a research to find out whether there is anything we can do about it. I have seen some attempts being made e.g.
https://stackoverflow.com/questions/18922880/html5-canvas-resize-downscale-image-high-quality
https://stackoverflow.com/questions/18761404/how-to-scale-images-on-a-html5-canvas-with-better-interpolation

Please also see the resizing results for CKFinder 3 (canvas, php), CKFinder 2 (PHP) and paint.net (.net custom library for comparison):
resize results.zip

@zaak zaak added the Task label Apr 6, 2018

@jswiderski

This comment has been minimized.

jswiderski commented Apr 6, 2018

I know the tools is using canvas but if canvas can't be improved then perhaps as an alternative there could be a way to create configuration setting where user can select between canvas and server-side library.

In that second case initial resizing could be done in browser (so that user culd see result faster) but the final resizing would be done on server, meaning image path and parameters would be sent instead of the resized image. I'm not sure how it would work on case of other Edit settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment