Discuss Scratch

samq64
Scratcher
1000+ posts

Image Reader



Note: This project is still being developed. Please don't post here yet.

This is a project that can read different image format. This forum topic is for instructions on how to correctly set up the images to be read.

From Image Scanners
These are images created through a Scratch project and are made to be read easily be other Scratch projects. The file format might vary by project.

1. Open the project editor.
2. Right-click on the Image list and import the text file.

Troubleshooting:
If you get a “Invalid file format” Error, it's probably because the scanner you're using scans differently. To fix this, try re-scanning the image using one of these scanners:

Super-Fast Image Scanner by samq64
Adaptive Scanner by imph
Image Scanning Test by Maximouse

These image scanners have been tested and should work with this project.

Bitmap Images (BMP)
Bitmap images are uncompressed images that most computers can read, but aren't vary popular due to large file size.

1. Your image must be a 24-bit BMP. To convert it just open the image with Microsoft paint or GIMP and save the image as a “BMP picture” or “24-bit bitmap” If you use GIMP to prepare the image, Make sure to enable Do not write color space information under Compatibility options and choose the R8 G8 B8 pixel format under Advanced options.

2. Go here and import the file.
3. Uncheck the “Use 0x and comma as separator” and “Insert newlines after each 16B” boxes.
4. Copy the output to the clipboard, then open the project and paste it into the ask block.

Troubleshooting:
If you get an “Unsupported version” error, then try again using GIMP 2.10
If you get an “Unsupported compression type” error the BMP file is not a 24-bit RGB, try again following the instructions above.
You will get a invalid file format error, if you don't convert the file to hex correctly, make sure both boxes are unchecked and try again.


Common Troubleshooting
1. The most common problem is when an image is to large to be drawn. If this happens you will see a “Image too large” error. This can be fixed by reducing the image resolution

2. If you get a “Invalid file format” Error, then it could be two things: either the file type is unsupported or the image file contains errors. Make sure your image type is supported.

Last edited by samq64 (March 4, 2021 18:58:22)

Powered by DjangoBB