Question
Write a simple plain PPM image steganography program written using C Programming. The program will be called : steg. steg. It will encode and decode
Write a simple plain PPM image steganography program written using C Programming. The program will be called : steg. steg. It will encode and decode secret messages in bitmap images. It operates with two functions : encode and decode and can be selected by using the first command-line argument : e or d.
An RGB colour bitmap image consists of a grid of pixels with red, green and blue colour values.
To encode text inside an image, the program will replace the red value in successive random pixels in the image with characters from the text, then output a new image. The program will be invoked as: ./steg e old.ppm >new.ppm. It will prompt for a message to encode, and output the new image to SOutput.
To decode the text, the program will compare the new image with the old image, and extract characters from the new one where it differs from the old one. The program will be invoked as: ./steg d old.ppm new.ppm. It will decode the message and output the hidden text to SOutput.
The program will work with Plain PPM format images which consists of ASCII text: P3 (code for plain PPM format) , # comment, width, height, max and ri gi bi ( i.e. integers between 0 and max for pixel i's red, green and blue values). It will read information from the PPM header of a open PPM file F, using fscanf function and stores comments, and other attributes such as height, width, and integer maximum colour value of 255, and a pointer to the array containing the pixel data.
The program will be written in C programming language.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started