< Back

Lab 20: Images

For all of our activities, make sure your practice with the new blocks today. Some of the activities you can complete without using the new blocks. They do save some time and headaches. Open up the Practice Area, and take a crack at the following activities.


Activity 1: Mirror

Create a blockly program which allows the user to load an image. Your program should go through and swap the colors in each row, to create a mirrored effect.

In each row, you are going to be setting the color value of a pixel based off its mirrored position from the other side of the image. You can compute the position of the color you should assign to the current (x, y) coordinate by subtracting x from the Image Width. The y coordinate should remain the same.

Before

After