If you erase lower two bits in the red value you can clear


Problem

1. Is it possible to hide a color picture in another color picture? Why or why not?

2. If you erase lower two bits in the red value, you can clear space for hiding values 0-4.

for p in getpixels(picture):
# Clear out the red 2xLSB
r = getRed(p)
setRed(p, r -(r%4))

If you erase the lower two bits from red, green, and blue, you can save six bits. Six bits can encode 64 values. That's enough to encode all 27 letters, both upper and lowercase.

(a) Write a function to input a picture and a string. Save each character in the string in a pixel of the picture, by saving it across the least significant two bits in each of red, green, and blue. Can you tell the difference between the original picture and the picture with the encoded text message?

(b) Now write a function to decode the original text.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: If you erase lower two bits in the red value you can clear
Reference No:- TGS02641159

Expected delivery within 24 Hours