This works fine. When would it crash?
Group Details Private
Global Moderators
Forum wide moderators
Member List
-
RE: Clear prints buttons don't work again
Can you please share the project link? We will look into why it crashes.
-
RE: Clear prints buttons don't work again
Please use the draw and clear blocks in the “Pen” category for now.
-
RE: How to add a code snippet?
You can right click on any sprite and select share. Please make sure the code in that sprite is serving one purpose so it is reusable by others.
-
Generate Vector Images Using AI
Image Formats: Vector vs Bitmap
In Scratch, a costume image can be a “bitmap” or a “vector” format:- Bitmap images are stored as a matrix of small square boxes called “pixels”
- Vector images are stored as a few shapes, where each shape is represented by its outline and fill colors.
You can easily tell the difference when you zoom in an image:
There are several important benefits when we use a vector image:
First, vector images will always look the same when you scale them up, but bitmap images look worse due to lower resolution when you switch to full screen mode.
Second, a vector image’s file size is usually much smaller than a bitmap for the same content. For example, imagine we need to draw a big square. In bitmap format, we need to specify every pixel’s color, but in vector format we only need to specify the edge length and one color. Therefore, if your project would run faster and smoother when you use vector images
Third, vector images are much easier to modify. Since it is composed of individual shapes, you can move/resize/recolor each shape without affecting other parts of the image.
Note that the vector format is not always better. If the image has a lot of details, then the bitmap format should used. For example, if almost every pixel in the image has different colors, then there is no easy way to describe it using simple shapes in the vector format, and we should just store each pixel’s information using the bitmap format.In summary, choose the vector format if the image is made of a few simple shapes in uniform or gradient colors.
How to Generate a Vector Image Using AI
On MIT Scratch, there are only a limited number of vector images from the library. On CreatiCode, you can use AI to generate new vector images based on your project. The basic idea is to generate a bitmap image using AI, then convert it to a vector format using another AI tool.
Below are the steps:
Step 1 - Generate a bitmap image
As shown, you can start by selecting the “AI” tool for adding a sprite.In the input box, describe the object, specify it is a vector image, and then click “generate”. For example:
Important notes:
-
This AI tool can only generate images in the bitmap format, even if our prompt says “vector image”. It will try to generate an image that looks like a typical vector image (a few shapes of simple colors)
-
The prompt must contain the keyword “vector” to ensure the AI generates an image in this style. You can add additional instructions to further emphasize this, such as “with simple shapes”, “flat vector illustration”, “for costumes in MIT Scratch”, etc.
-
You might need to refine the description or regenerate the image.
Once you have the image you like, click on it to add it as a new costume.
Step 2 - Clean up the costume image (optional)
The costume will be in bitmap format. Before converting it to a vector image, you might need to clean it up.
For example, the image may contain a shadow. You can use the erazer tool to remove it manually, or use the new magic wand tool to select and delete it.
For another example, sometimes the AI generated image has some transparent parts. You can use the “fill” tool to fill some colors in there.
Step 3 - Convert the bitmap costume to a vector image
You can click the “Vectorize” button to convert any bitmap costume to a new vector costume:
A new vector format costume will be added, and the original bitmap costume is not changed. This is a true vector image, as you can select individual parts and change them:
Note that the original MIT Scratch provides a button to convert a bitmap image to vector, but it is not really a true vector image. It only represents the entire image as one big shape, and you still can’t edit individual parts.
Create Vector Images from Drawings
Since you can convert any bitmap costume to a vector costume, you can also draw a costume of your own, then convert it.
For example, suppose we use a few simple shapes to create a small house, and then use the “variations” tool to convert it to a cartoon:
Next, we can convert this cartoon house to a vector image. Note that it needs to be in the “bitmap” mode first, since the “vectorize” button is only available in the bitmap mode:
Search for Vector Images
The vector images generated by any user is shared with the community. You can open the AI image tool for sprites (not backdrops), and select the “Vector” type to search for them:
-
RE: Weird bug in Creaticode
This seems to be caused by the new buttons we added at the bottom of the costume editor, which takes too much space. We will fix this ASAP.