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

Swap out the instance with altered image #85

Open darrensw opened 11 years ago

darrensw commented 11 years ago

Hi

If I have an image that I apply a filter to, e.g. Lomo filter, is there way to make that the current Caman instance? Without saving the image and then reloading it.

Meaning, if I then want to then play about with the brightness on the image that I applied the filter to, and use this.revert(); to reset the brightness, I want it to revert to the canvas with the filter on it that I just applied.

Is this possible?

I'm having a nightmare with trying to apply many effects, only one at once (except for preset filters), and carry the state through...

meltingice commented 11 years ago

This is a good idea. CamanJS should have the ability to create "save points" so that you can revert back to a specific state that isn't the original.

darrensw commented 11 years ago

Out of interest, what is Caman.Store()? I thought this was it actually but after trying it in every single combination I could think of, I realised it wasn't!

meltingice commented 11 years ago

Caman.Store is responsible for remembering initialized Caman instances so that, if Caman() is called on an already initialized canvas, we can return the instance instead of creating a new one.

Danjavia commented 9 years ago

I need to create multiple sizes from a same image, but the canvas is pixelate, pls, help me

Danjavia commented 9 years ago

I need to clone canvas, how can I do