Skip to content

Delayed rendering of the image in ASP.Core #1975

Answered by ojb500
artemiusgreat asked this question in Q&A
Discussion options

You must be logged in to vote

Docs for SKImage.FromBitmap say it can make a copy of the pixels, so you are sending back the image as it looked before you started drawing on the canvas

Either call SKImage.FromBitmap only after drawing is done, or possibly just use SKBitmap.Encode to encode directly from the bitmap

I would dispose the canvas as well to make sure all drawing is flushed, maybe it's not essential here but it's a good practice.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@artemiusgreat
Comment options

Answer selected by artemiusgreat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants