Saving Pure Filtered Image #926
-
Hello, I am making an app to apply filters to an image. I am able to apply a color matrix on the loaded image on the front end and show visually. I was wondering if the canvas had a way of extracting the full and only the image data and making a snapshot of just the filtered full image that because I want to send it to the backend/ save it to cloud storage/save it to users phone. I am just trying to ensure that there is no information lost in the original image, the filters are applied correctly and i could extract the full byte information without any noise from the rest of the canvas. I've see the makeImageSnapshot, but I'm not sure it does what I'm looking for exactly, can I get any advice on this please |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can use the picture |
Beta Was this translation helpful? Give feedback.
You can use the picture
PictureRecorder
to get a binary representation of the image + the skia operations applied to it.You can convert these pictures into png encoded image on your backend (if you have Skia available).
Currently
makeImageSnapshot
is actually using the picture recorder to get the png of the canvas.We may offer a way to go from Picture to an Image directly. Right now
makeImageSnapshot
is your best bet. Let us know if you have specific requirements such as scaling the picture before converting it into an image.