meltingice / CamanJS

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

crop and resize #17

Closed xrmx closed 12 years ago

xrmx commented 12 years ago

It would be nice if CamanJS would provide crop and resize functionalities, nothing fancy just a wrapper around canvas drawImage.

SunboX commented 12 years ago

subscribe

balupton commented 12 years ago

+1 - I would LOVE this!

It seems Caman.js could unlock a huge potential as being the jQuery chainable-api for Canvas Manipulation - mmmmmm.

meltingice commented 12 years ago

I agree, there definitely needs to be more work done on this. I'll see what I can come up with.

balupton commented 12 years ago

Perhaps teaming up with the gury guys would help? They seem to have a similar API, but less catered towards filters etc. Seems that the two projects should be merged. Cross-posted here: https://github.com/rsandor/gury/issues/16

meltingice commented 12 years ago

Crop and resize abilities added. Examples:

Caman "#test-image", ->
  # width, height, x, y
  @crop 150, 150, 100, 100

  # width and/or height
  @resize width: 50
  @render()
balupton commented 12 years ago

Sweet! Thanks. Will give it a go now :)

shramee commented 9 years ago

Thanks for adding this hug ^_^