APCSA Steganography Lab A2
APCSA Steganography Lab A2
Date:
Recall from Activity 1 that changing the lowest two bits of each color in all pixels of an
image did not noticeably change the image. Taking advantage of this will allow hiding
secret.jpg source.jpg
two bits of each color in all pixels of source.jpg with the highest two bits of each
color in all pixels of secret.jpg
What would be the color of the top left pixel of the revealed image?
Why are the lowest two bits of each color in all pixels in source.jpg replaced
rather than the highest two bits?
Why are the highest two bits of each color in all pixels in secret.jpg used in the
resulting image rather than the lowest two bits?
After arch.jpg has been hidden in another image and then revealed, the revealed
image is shown below. It almost looks pixelated. Why?
One iterative process can trigger a second iterative process, requiring the
process provides input values through control variables for the second
process. Regardless of where the iterative statement is in the overall
program code, the only control variables that are changing are within that
iteration statement.
reveals the secret picture by returning a new picture containing only the hidden pixels.
Write the main method which should construct two images and call canHide
with them. If canHide returns true, the method calls hidePicture, calls explore
on the picture returned, calls revealPicture and then calls explore on the new
picture.
How could the hiding algorithm be altered so the revealed image is more like the