How to Erase Parts of Images in Scratch - dummies

How to Erase Parts of Images in Scratch

By Derek Breen

Is there anything you want to remove from your photographs that you’re using in Scratch? You probably know which tool you need. Yes, the Erase tool.

  1. Right-click or Shift-click Costume1 and then choose Duplicate to preserve the original copy.

  2. Use the Erase tool to remove unwanted portions of the photo.

    You might find the Select tool handy for removing larger portions.

  3. Click the Select tool, click and drag over the area you want to remove, and then click the Delete key on your keyboard.


Hide and show sprites

If you have a bunch of images, hiding some of them at first might be helpful. Shift-click each sprite you want to hide and select Hide. Now, you can move the remaining images around the Stage and gradually unhide sprites when you are ready to include them in your composition.


Erase around jagged edges

Any dummy can use the Erase tool on the Paint canvas to erase part of a sprite, right? Check out this photo of Anne Frank:


What if you want to erase the background of the photo, the gray area around Anne’s head? Have you noticed one of the hardest things to erase around is hair? Another is grass or trees — pretty much anything with jagged edges.

  1. Expand the Paint canvas by clicking the small triangle on the border beside the Stage (or choose Edit→Small Stage Layout).

  2. Click the sprite you want to edit, click the Costumes tab, Shift-click the costume you want to modify, and select Duplicate.

    You will make all changes to the copy, preserving the original in case you go too far with the changes and want to start over.


  3. Click the Erase tool.

  4. Drag the slider to increase the eraser size.

  5. Click and drag in the photo to remove larger areas.

  6. Gradually reduce the size of the eraser to match the smallest areas you want to remove.

    For tight areas, move your eraser into place and click one time (rather than dragging across). Then you can move your eraser to another spot and click again. If you’re removing outer parts, move your cursor to the area where you want to start erasing and then click and move toward the edge of the image.


Erase complex shapes from bitmaps

This one will REALLY impress your friends! Do you know you can convert a bitmap graphic into a vector graphic? To cut out the area around the Star of David image, for example, you need to convert the bitmap photograph into a vector graphic and then convert the vector graphic back into a bitmap graphic.

If you are creating your own collage with custom images, you can use this trick to cut out images or create different-shaped holes to see through an image to the layer beneath.

  1. Click one of your bitmap sprites (the star photograph).

  2. Click the Costumes tab, Shift-click the costume (there will be only one if you imported the image), and then select Duplicate.

  3. Click the Convert to Vector button.

  4. Click the Rectangle tool, choose the Outline option, and select a green color swatch (or a color that is not in your image).

  5. Click, drag, and release with the left mouse or trackpad button to draw a rectangle that covers the top half of the image.

  6. Click the Reshape tool, click one time inside the shape to select it, and then click and drag each corner of the rectangle to fit one corner of the star.


  7. Click between line points on the edge of the shape to add a new line point.

  8. Drag that line point outward to a point on the star.

  9. Continue until the top half of the star is covered.


Now turn your shape inside-out. WHAT?! How can you turn a two-dimensional (2D) shape inside out? Remember negative space? You want to modify your shape from being on the top half of the star to cover the top half of the emptiness you will be erasing.

  1. Still using the Reshape tool, click the bottom edge of your shape to create a new point and then click again for a second point.

  2. Drag the two new line points above the star, right off the Paint canvas.

  3. Click near the edge to add another line point on each side.


Now, how do you select the rest of the background on the top half of the image? Why did you add another line point on each side?

  1. Click and drag the new line points down and out.

  2. Add a new point for each remaining star corner, dragging each to the corner on the star.


Great work! Now just one more point and then it’s time for the real magic.

  1. Click to create the last line point and drag it to the bottom of the star.

  2. You may need to drag the outer corner points off the canvas to make sure you have selected the entire background.

  3. Shift-click the costume you have been working on and ­duplicate it.


Duplicate it again? That’s not MAGICAL! Nevertheless, you just did all that work and if something goes wrong with the “trick,” you do not want to have to do it again, do you? Plus, that shape might come in handy later. Okay, NOW for the MAGIC!

How about converting a bitmap graphic to a vector graphic and then back to bitmap? Watch THIS:

  1. Click the Convert to Bitmap button. (It may take several seconds. You’ll know it’s finished when your tools jump to the left side.)

  2. Click the Fill with Color tool and select the Fill option and the Empty color swatch (white with red diagonal line).

  3. Move the cursor into the shape and click one time.


Isn’t that COOL? Doing the same thing with the Erase tool in Bitmap mode would take WAY longer, WAY more steps, and would not look nearly as sharp.


If you still see thin lines of the original background, just use the Erase or Select tool to remove them quickly. If there is a bit of color on the edge, that will be less noticeable after the next collage technique on blending sprites.

That vector shape you created to cover part of the image is a mask, just like masking tape, which you use to cover edges of windows while painting your bedroom wall.