Full QOI Reader Really fast here: https://turbowarp.org/726846259?limitless • To load a demo image, enter '#' followed by the id of the image you want to load (between 1 and 6), for example '#4', OR leave it empty to read a random demo image. (If your device is slow, the first two images should still load fast, but the others may take a bit longer) • Click outside of the popup and press [X] to show the list of demos. Press [X] again to hide that list. • The only blocks you need are: one block to decode a base64 QOI image, and one block to render it on the screen! • Supports alpha channel (transparency). Try pressing [SPACE] to change to background and on some images you'll see that the background is transparent.
Really fast here: https://turbowarp.org/726846259?limitless It is still fast enough on vanilla scratch. >>> Credits to @Arctenik for the base64 decoder To import your own images (preferably small ones!): 1) go to one of these links depending on the format of your image https://www.aconvert.com/image/png-to-qoi/ https://www.aconvert.com/image/jpg-to-qoi/ and download the output file. 2) then convert your qoi image to base64 here https://base64.guru/converter/encode/file , copy the output, paste it into the project, press enter and enter the scale (please read notes and credits if you have any problem, or comment if you need help!) ABOUT QOI FORMAT: • QOI is an algorithm that compress images losslessly to a similar size than PNG. • But it's much faster and simpler! This project only use 459 blocks to decode an image, while scratch implementations of PNG readers can take more than 2k blocks. •This project does not correctly support files larger than 195KB, due to scratch lists limitations (on turbowarp there isn't this limit). I could make it so there isn't that limit, but it would end up in a slower decoding, and you don't really need images larger than 195KB on vanilla scratch. •The maximum amount of pixels that can be decoded in vanilla scratch is 200,000 pixels, again due to scratch lists limitations (turbowarp doesn't has that limit either) CHANGELOG : V 1.0 : Initial release V 1.1 : Fixed a bug with the rendering script that could cause transparency, reduced the block count in the decoding script.