Click here to Skip to main content
15,885,278 members
Articles / Programming Languages / VC++

PNG Image Steganography with libpng

Rate me:
Please Sign up or sign in to vote.
4.96/5 (16 votes)
22 Apr 2013GPL317 min read 61.7K   4.8K   33  
Performing steganography on PNG images
#include <png.h>

/* Class PNG_file
 * Contains the data for a PNG file object
 */
class PNG_file {

public:
	
	//Constructor
	PNG_file(const char *inputFileName);

	//Function for encoding data into the PNG from a file
	void encode(const char *fileToEncodeName);

	//Function for outputing the newly created PNG to a file
	void outputPNG(const char *outputFileName);

	//Function for outputing the decoded PNG to a file
	void decode(const char *outputFileName);

private:
	png_bytep* row_pointers;
	png_infop info_ptr;
	png_structp read_ptr;
	png_structp write_ptr;
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
United States United States
Grant is a specialist in computer security and networking. He holds a bachelors degree in Computer Science and Engineering from the Ohio State University. Certs: CCNA, CCNP, CCDA, CCDP, Sec+, and GCIH.

Comments and Discussions