Images hw
Images Hw
Popcorn Hack
Turn to a partner and answer:
Which format would you use for an image with a transparent background that needs to stay sharp on any screen?
PNG or SVG
Practice MCQ
Which file format is best for an image with a transparent background?
A) JPEG B) PNG C) GIF D) BMP
Correct Answer: B) PNG
PNG supports transparency and doesn’t lose image quality.
Popcorn Hack
Turn to a partner and discuss: What do you think could be one downside of Base64 in the real world? It takes up more space.
Practice MCQ
Which of the following is true about Base64 encoding?
A) It encrypts data to make it secure. B) It increases the size of the data. C) It reduces the size of the data. D) It ensures data is unreadable by humans.
Correct Answer: B) It increases the size of the data. Base64 encoding increases the size of data, as it converts binary data into text characters.
HW HACK
What is a hex color code? A hex color code is a way to show colors using numbers and letters. Examples: #FF0000 (red), #00FF00 (green), #0000FF (blue) My work: I used hex codes to choose colors for my website buttons.
What is Base64 and how is it used with images? Base64 turns data, like an image, into letters and numbers so it can go in code. My work: I used Base64 to add an image to my webpage without uploading a file.
Why might you use Base64 instead of a regular image file? You can use it right in the code, no need for a separate file.
I added an image by dragging and dropping it into the “images” section, then used this code to display it:
img src=”/avas_2025/images/iii.jpg” alt=”photo”
How it’s stored and displayed:
The image is saved as a file (like PNG or JPG) in the “images” folder of the project. The Markdown code tells Jupyter Notebook where the image is and how to show it. When the notebook runs, it loads the image from that folder and displays it right in the notebook.
EC
RGB Value | Hex Code | Color Name |
---|---|---|
rgb(255, 0, 0) | #FF0000 | Red |
rgb(0, 255, 255) | #00FFFF | Cyan / Aqua |
rgb(255, 165, 0) | #FFA500 | Orange |
rgb(128, 0, 128) | #800080 | Purple |
rgb(0, 128, 0) | #008000 | Green |