Discuss Scratch

thevenotedu
New Scratcher
2 posts

Use Scratch blocks to save program image to PNG, GIF, Bitmap

Hello Discussion Forum,

How can I code the Green Checkmark sprite to save the current program image to an image format on my PC? I'm looking for code that will allow the user to click the green checkmark sprite and the current image will be “Snapshot” and saved. Just as if I “Right-click” on the image and save it but using the actual code to perform this action.

Thanks

Thevenotedu
samurai_master123
Scratcher
100+ posts

Use Scratch blocks to save program image to PNG, GIF, Bitmap

To my knowledge scratch projects can't access your hard drive…
idkhow2type
Scratcher
100+ posts

Use Scratch blocks to save program image to PNG, GIF, Bitmap

i seem to be answering with a lot of theoretical ideas than i would like to but here we go
a file is stored in bits. the file extension usually tells us what the bits are supposed to mean (.txt for text, .bmp for bitmap images, etc…)
however, the file extension cant affect the bits inside a file. for example, i can rename a file called image.png to image.txt, open it in a text editor and as long as i don't modify it, it will stay intact when i rename it back to image.png
when you open the image.txt, you will notice that it looks pretty weird with lots of symbols and random letters and characters that cant be rendered. this is because the bits are being treated incorrectly (displayed as text instead of an image). despite looking strange, it technically still works as a text file.
this is the basis of our idea. what if we create a piece of text using those weird characters and rename the file extension to an image file. do it correctly and you'll create an image using text.
*note: image files are actually more complicated than you'd think, for the sake of simplicity, lets define a custom image file type
each pixel will be represented by 3 color channels: red, green and blue. each one of these channels will take up a byte
a pixel will be represented by 3 bytes standing next to each other, one for red, one for green, and one for blue
this is how most image files work, but they usually include some kind of header and footer, for simplicity, we will ignore the header and footer
what we will do is create a list of all ascii characters, displayable or not. all ascii characters are stored in 1 byte, so this will technically allow us to write any file type byte by byte.
then we will scan the entire screen to create an image. griffpatch made a tutorial about an image scanner using binary search, we will use that to scan the screen
after that, we will loop through each pixel and split them into separate red, green and blue channels. each one of these values will range from 0 to 255, fitting in exactly 1 byte
now its time to construct our image. we will loop through each of the split pixels, map each value to an ascii character, and save all of that to one long string.
finally, we will display that string to the user, tell them to copy that string and paste it into a .txt file, rename that file to an image file, and in theory, we should have an image.

*i just realized you don't want to use right-click to save the image, and this is really way more work than that, it was fun to write tho so ill still post it in case someone wants to do something similar for some reason

Last edited by idkhow2type (June 19, 2022 02:30:40)

awesome-llama
Scratcher
1000+ posts

Use Scratch blocks to save program image to PNG, GIF, Bitmap

idkhow2type wrote:

what if we create a piece of text using those weird characters and rename the file extension to an image file. do it correctly and you'll create an image using text.

what we will do is create a list of all ascii characters, displayable or not. all ascii characters are stored in 1 byte, so this will technically allow us to write any file type byte by byte.

finally, we will display that string to the user, tell them to copy that string and paste it into a .txt file, rename that file to an image file, and in theory, we should have an image.
This won't work due to many reasons.
  • I tried importing a list from a file I generated (see the hex code below). Not all characters could get imported correctly. Those between 128-255 are replaced with a question mark character (this one �). I exported the list and checked the data to ensure that nothing else was being lost and this was the case though scratch has a glitch where quotes, apostrophes (and possibly commas) do not get imported so these characters were also missing from my test.
    Here is a hexadecimal representation of that file if you want to generate it yourself (hex editor required to reconstruct it):
    Note: I am using CR LF for the newlines (0d0a)
    000d0a010d0a020d0a030d0a040d0a050d0a060d0a070d0a080d0a090d0a0a0d0a0b0d0a0c0d0a0d0d0a0e0d0a0f0d0a100d0a110d0a120d0a130d0a140d0a150d0a160d0a170d0a180d0a190d0a1a0d0a1b0d0a1c0d0a1d0d0a1e0d0a1f0d0a200d0a210d0a220d0a230d0a240d0a250d0a260d0a270d0a280d0a290d0a2a0d0a2b0d0a2c0d0a2d0d0a2e0d0a2f0d0a300d0a310d0a320d0a330d0a340d0a350d0a360d0a370d0a380d0a390d0a3a0d0a3b0d0a3c0d0a3d0d0a3e0d0a3f0d0a400d0a410d0a420d0a430d0a440d0a450d0a460d0a470d0a480d0a490d0a4a0d0a4b0d0a4c0d0a4d0d0a4e0d0a4f0d0a500d0a510d0a520d0a530d0a540d0a550d0a560d0a570d0a580d0a590d0a5a0d0a5b0d0a5c0d0a5d0d0a5e0d0a5f0d0a600d0a610d0a620d0a630d0a640d0a650d0a660d0a670d0a680d0a690d0a6a0d0a6b0d0a6c0d0a6d0d0a6e0d0a6f0d0a700d0a710d0a720d0a730d0a740d0a750d0a760d0a770d0a780d0a790d0a7a0d0a7b0d0a7c0d0a7d0d0a7e0d0a7f0d0a800d0a810d0a820d0a830d0a840d0a850d0a860d0a870d0a880d0a890d0a8a0d0a8b0d0a8c0d0a8d0d0a8e0d0a8f0d0a900d0a910d0a920d0a930d0a940d0a950d0a960d0a970d0a980d0a990d0a9a0d0a9b0d0a9c0d0a9d0d0a9e0d0a9f0d0aa00d0aa10d0aa20d0aa30d0aa40d0aa50d0aa60d0aa70d0aa80d0aa90d0aaa0d0aab0d0aac0d0aad0d0aae0d0aaf0d0ab00d0ab10d0ab20d0ab30d0ab40d0ab50d0ab60d0ab70d0ab80d0ab90d0aba0d0abb0d0abc0d0abd0d0abe0d0abf0d0ac00d0ac10d0ac20d0ac30d0ac40d0ac50d0ac60d0ac70d0ac80d0ac90d0aca0d0acb0d0acc0d0acd0d0ace0d0acf0d0ad00d0ad10d0ad20d0ad30d0ad40d0ad50d0ad60d0ad70d0ad80d0ad90d0ada0d0adb0d0adc0d0add0d0ade0d0adf0d0ae00d0ae10d0ae20d0ae30d0ae40d0ae50d0ae60d0ae70d0ae80d0ae90d0aea0d0aeb0d0aec0d0aed0d0aee0d0aef0d0af00d0af10d0af20d0af30d0af40d0af50d0af60d0af70d0af80d0af90d0afa0d0afb0d0afc0d0afd0d0afe0d0aff
  • Copy-pasting the data instead? Won't work, at least for my Windows computer. Most characters get replaced with whitespace so data is lost. This means attempting to import data this way will not work and neither will exporting the generated image
  • Editing the scratch project's save? This won't work either since Scratch refuses to store 128-255 as exactly that. They get replaced with unicode representations which is not the same data.
    Here's the project.json file with the list showing the result of the above file imported (note that I had to replace the 3 problematic characters with something else for it to work):
    "\u0000", "\u0001", "\u0002", "\u0003", "\u0004", "\u0005", "\u0006", "\u0007", "\b", "\t", "\n", "\u000b", "\f", "\r", "\u000e", "\u000f", "\u0010", "\u0011", "\u0012", "\u0013", "\u0014", "\u0015", "\u0016", "\u0017", "\u0018", "\u0019", "\u001a", "\u001b", "\u001c", "\u001d", "\u001e", "\u001f", " ", "!", "quotes", "#", "$", "%", "&", "apostrophe", "(", ")", "*", "+", "comma", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�"
    

There is an alternative method to this. Instead of converting bits into characters, data can be converted into base64, placed in a URL and the browser can go to this as if it was a link to a webpage. I did this successfully with my image editor project.

Here is an example (copy it and paste it into your browser's URI/URL bar):
data:image/bmp;base64,Qk0AABs0AAAAADYAAAAoAAAAMAAAACQAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2eDf/9nZ2f/Y2Nj/19jY/9jf3v/R19b/0dbV/8TOzf/By8r/w83M/8jNzv+6x8b/tsXG/7nGxv/AzMr/wMrJ/8jMzP/Gycj/npmT/6ahnv/Aurf/g3x5/7Wuq//Gwb7/vbe0/5aNiv9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LOv+Hc17//f39//7+/v/9/f3//f39//39/f/9/f3//f39//39/f/9/f3//f39//39/f/8/Pz//Pz8//v8/P/8+/r/+fv6//v5+f/Eycv/X2qD/4CQtP91gar/UVuF/0lRcP9QXG//UVt+/0lUcP9LU2z/VmN+/11je/9SWWz/Tlpv/z9HU/9jcpD/a3ug/2p8pv9xhLL/cYW1/2uCsP9mear/W3Cc/0FQbv9OSUf/X1FD/z0zKv9qWET/v7SY/8m/of/Iv6H//v7+//7+/v/+/v7//v7+//7+/v/+/v7//v7+//7+/v/9/f3//f39//7+/v/9/f3//f39//39/f/9/f3//f39//v7+/9aYGj/V1xm/1ZcZv9cY3H/UFlu/2Zyg/9peKP/bHys/1Vhgv9KU2j/X2mK/09Ycf9UXHL/XmuC/09Ya/9XY3//bXul/2t5of9tga3/boGz/2yAr/9fcqL/T2GG/zlFYf8yO0r/YVFF/zkyJ//g3tf/8vLv//Pz7f/y8u7//v7+//7+/v///////v7+///////+/v7//v7+//7+/v///////v7+//7+/v/+/v7//v7+//39/f/9/f3/2dzo/73C0/9veZD/WF9w/2Bof/90fJ//b3mk/3F9rv+Gks//fIvE/3OArP9eaoj/YmuG/1Rbcv9WXXH/UFp1/01WaP9YYoP/bXmj/3F/rP9oe6P/bH+w/2l9rP9fcpr/S1x6/0FQa/82Pj3/NTo6/29tZP/09PL/9PTy//Tz8f/z8/D///////////////////////////////////////////////////////7+/v///////v7+//7+/v/q7PL/i5vW/4STzP95hbz/dIC+/2x4t/96hcn/c4G8/36Kzv+Nmdj/jJnW/4STz/9mdp3/YWuP/1NbeP9reJr/WWN//01VbP9ZY4P/anil/3WGuP9tfaz/a3+v/2d7q/9ccJX/RlZw/z1IWf87P0D/O0FA/9TXz//09PT/8/Pz//P08v/09PH///////////////////////////////////////////////////////7+/v////////////7+/v/5+fv/jJXS/4aQ0P9+iM//jZra/3F7yf9rdrj/fIjP/3+J1P+Vn9z/jZnY/4iX0/92gLn/ZnGc/0pVcf9aY4n/U116/0pSZ/9XYYT/coS1/3uOx/9sf63/bYGx/2h8rP9SZIf/Ki86/yUnKP8+Q0L/QkRE//Pz9P/09PT/9PXz//P08v/18/L////////////////////////////////////////////////////////////////////////////+/v7/ho/L/4qT1P+KmNX/eoTJ/3N+xv9yfr//e4bM/4OM1v+Qmtv/k5/f/42c2/9+jMz/Y3Gp/1xkk/9WXoD/YWqI/09Wbv9PXoH/coW6/4KS0/94gNL/YnCy/2uArf9RYYD/KjA4/zI0NP87QD//RkhG//X19P/19fX/9PT0//Xz8v/18/L////////////////////////////////////////////////////////////////////////////9/v7/q7HQ/4+c0/+LmNX/iZja/3iFyf9verr/cH29/3uI0P+Ektb/j5vb/5Cb3P+DktT/fY/Q/2h3sP9DTGb/UFZv/09YdP9eapX/eIzB/3mMyP95iMr/d4TL/2V0s/9TY4T/LzA3/ystLf87Pj3/eHp2//b29v/29vb/9fX1//X19f/09PT////////////////////////////////////////////////////////////+/v7/////////////////4uXq/4SPx/+Mm9T/fI3L/3iGyP9qerP/Y3Wt/26Aw/96is//gZLV/5Gf3v9+kNP/gZTU/3aHw/9JU3T/V2GC/05Ycv9sfrD/fJLG/26Buf98jcz/b369/296x/9JU33/KSot/yksLP84PTz/QkdG//P08P/19fT/9fbx//X18f/09fD////////////////////////////////////////////////////////////+/v7//v7+//7+/v/+/v7/9PT0/3iHuv+HldH/f5HI/3qLt/9fbqD/a36z/2V4sf9sgcD/dYjL/4KT0/9+kNH/gZXT/3yQzv9ebJf/Qkpi/zpCWv9xhrb/gZfL/3iJwv+AkMb/cYG6/3qJzv9vfcb/JCQq/yotLf81Nzf/PkRD/250cv/z9PD/+PXt//j17v/38u/////////////////////////////+/////v///////////////////////////////v7+//7+/v/09PP/iIuT/3KFrf+Hms//j53K/1lmkP9DSGH/TFZ//2Z4qf9mf7L/dY7G/4GU0/9/k9P/fJLR/3iQzf9tf67/R0xb/zlEVv9ziLf/d5PG/3KDu/9xg8L/na/g/2t8t/9ib7r/JCQm/y8xMf83Pj//NkE//0VRUv9I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/0tWVP9GT07/TVhW/05ZV/9FTUv/R01M/0lPT/9IVFL/SVNR/1FXVP/78d//+/Hf//rw3v/68N7/+e/d//ju3f/37dz/

Data URLs support more than just image formats. It is also possible to display a webpage with automatic file conversion and download. I did this in my project Procedural Sandbox for exporting 3D models.

Last edited by awesome-llama (Sept. 28, 2025 13:18:59)

thevenotedu
New Scratcher
2 posts

Use Scratch blocks to save program image to PNG, GIF, Bitmap

Thank you all. I will look at these suggestions and try. Or else, just revert back to a right click save if it is going to be that tough. Cheers.
ItsBigBrain
New Scratcher
1 post

Use Scratch blocks to save program image to PNG, GIF, Bitmap

.

Last edited by ItsBigBrain (Sept. 28, 2025 11:07:56)

Powered by DjangoBB