CamanJS icon indicating copy to clipboard operation
CamanJS copied to clipboard

Swap out the instance with altered image

Open darrensw opened this issue 11 years ago • 5 comments

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...

darrensw avatar Jun 07 '13 14:06 darrensw

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.

meltingice avatar Jun 11 '13 05:06 meltingice

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!

darrensw avatar Jun 11 '13 06:06 darrensw

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.

meltingice avatar Jun 11 '13 13:06 meltingice

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

Danjavia avatar Dec 03 '14 22:12 Danjavia

I need to clone canvas, how can I do

Danjavia avatar Dec 04 '14 13:12 Danjavia