summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-23Fail if the format is not supportedOlivier Gayot
Signed-off-by: Olivier Gayot <og@satcom1.com>
2014-09-18write the algorithms to write to and read from the bitmapOlivier Gayot
* now we can write to the LSBs of the bitmap using: $ ./stegmp write file.bmp input_file if input_file is "-", then then standard input will be handled * the same way, we can read the content of the-said LSBs using: $ ./stegmp read file.bmp Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2014-09-18fix non persistent changes to fileOlivier Gayot
when using MAP_PRIVATE with mmap(), the content is not updated in the filesystem. Only the mapping is changed. fixed by replacing MAP_PRIVATE by MAP_SHARED Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2014-09-17reader: do not map the pages as writableOlivier Gayot
it is somehow insecure and useless to map the pages of the bitmap as writable if we only want to read data from it. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2014-09-17split the reading and writing featuresOlivier Gayot
stegmp() now receives a file handler as second argument. if this one is non-null, then it is the file from which we need to read the input and write it back to the bitmap. if it is null, then we need to read from the bitmap and display back the data on the standard output Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
2014-09-17reader: read and parse a BMP headersOlivier Gayot
we retrieve valuable information such as the data offset, the width and the height of the picture which path is passed as parameter. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>