Images Practice Assignment

Use the notes for python images to help you with this assignment. Start with Intro to PIL notes.

https://www.nemoquiz.com/python/#images

Part I – Image Grid

Create a square canvas as your background image. Use Image.new().

Choose an appropriate size so that it can fit a grid of four square images.

2) Upload four square images to your repl and use Image.open() to create a Python object for each image.

Choose four images that are somehow related, and make sure these images are all school appropriate for all ages. No sketchy humor.

Resize the images so they are all the same size, and so they are each half as wide and half as tall as your canvas background image.

3) Paste all four of your images onto one quadrant of your canvas. Use the paste function.

4) Save your image file.

Part II – Background with images pasted on

1) Choose a background image that you will add characters or objects to. Upload this background to replit. You may want to resize it if it’s a very large image – you don’t need anything larger than about 1000 pixels wide.

The background should be some sort of environment where you can paste a character later on.

2) Select two images that you will paste onto the background. They can be objects or characters, still appropriate for all ages.

3) Use an external website such as remove.bg to remove the backgrounds of these two images. Download these modified files. They should be PNG files with a transparent background.

4) Load these files into replit. Print the mode of these files – they should be “RGBA” mode. If they do not have an alpha channel (the “A”), then they do not have a transparent background.

5) Resize your character / object images so they can fit onto the background in a way that looks right.

6) Paste the two character / object pictures onto your background in a way that makes some sort of logical sense. For example, you can put a character into a forest background.

7) Save your image file.