meltingice / CamanJS

Javascript HTML5 (Ca)nvas (Man)ipulation
http://camanjs.com
BSD 3-Clause "New" or "Revised" License
3.55k stars 406 forks source link

Resize lead to bad Quality #105

Open confile opened 11 years ago

confile commented 11 years ago

Resize will lead to very bad quality when you scale down drawImage leads to a bad quality when you scale down in one step.

You will get a much better quality if you scale down in steps:

See this post: http://stackoverflow.com/questions/18761404/how-to-scale-images-on-a-html5-canvas-with-better-interpolation

http://stackoverflow.com/questions/17861447/html5-canvas-drawimage-how-to-apply-antialiasing

http://stackoverflow.com/questions/2303690/resizing-an-image-in-an-html5-canvas

Do you have a way implemented to get high quality results for down scaling?

bebraw commented 10 years ago

Maybe we could implement some extra parameter for stepped scaling? Any better ideas?

ldim87 commented 7 years ago

Hey guys! I know it's kinda old post, but I just ran into this issue and used Hermit-resize algorithm to create a Caman plugin... Load the plugin and use it just like resize resample_plugin.js.txt