This commit is contained in:
Pin
2021-12-03 18:45:05 -05:00
parent 5b45337d98
commit 9afed448df
2 changed files with 4 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ Sample program to embed messages into PNG images
## Install ## Install
**NOTE:** Set the core_count variable to one value lower than maximum cores on the host in cmd/pspng.c
Requires zlib, pthread, and sodium header files to compile (These will be distro specific packages) Requires zlib, pthread, and sodium header files to compile (These will be distro specific packages)
Build: Build:

View File

@@ -265,7 +265,8 @@ static int crc_embed_data(unsigned char *data, unsigned int data_length, int bit
raw_data = create_raw_pixel_values(data, bit_width, color_range, sliding_window); raw_data = create_raw_pixel_values(data, bit_width, color_range, sliding_window);
random_window_bit_change(data, raw_data, bit_width, 2, color_range, sliding_window, offset); random_window_bit_change(data, raw_data, bit_width, 2, color_range, sliding_window, offset);
if(offset > 500000) { //if(offset > 500000) {
if(offset == -1) {
new_data = calloc(300000, sizeof(unsigned char)); new_data = calloc(300000, sizeof(unsigned char));
for(int k = 0; k < 300000; k++) { for(int k = 0; k < 300000; k++) {
new_data[k] = data[offset-(offset-prior_offset-1)+k]; new_data[k] = data[offset-(offset-prior_offset-1)+k];