Get canvas image with JavaScript

Is there any way to get an image of the canvas as a costume without using javascript blocks?

untitled script pic (2)
Try using this block. It gets the costume of the stage and stuff like that.

As far as I'm aware, object stage doesn't actually give you a costume of the stage, it only shows you a preview of the stage as a non-costume object.


Are you looking for a block that gets the Stage's Costume NAME, or just the Stage Costume, or...?

There is a Dev mode block
untitled script pic (39)

i was looking for a block/reporter that got everything that was on the canvas as a costume

works. thank you!

That reports an object, not a costume. To visually indicate that it was reporting an object, the block will report a small preview of what is supposed to be the sprite's current costume/direction/etc. But for some reason, the stage's preview is just a small screenshot of the entire stage.

This could help you as well!
It lets you report the stage pic as a costume instead of adding it to the costume library, it also lets you apply screen shaders

i love this lmao

Is this sarcasm or are you genuinely complimenting me

OMG thanks! This works perfectly!

Welcome! I made it like a year ago and it’s just been sitting there ever since. I might make a reimplementation of it now that I’ve grown so much

This block doesn't delete the costume from the costume list and can cause problems for some projects.
Try this from my Custom Blocks 2 Project:

Custom Blocks 2 script pic

at the time i created the block it did delete the costume

i love this lmao (/srs)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.