From 9afed448df20c9bc1681369267dd240fe2f3465b Mon Sep 17 00:00:00 2001 From: Pin Date: Fri, 3 Dec 2021 18:45:05 -0500 Subject: Update --- README.md | 2 ++ cmd/pspng.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b6a3e7..bbfce54 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Sample program to embed messages into PNG images ## 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) Build: diff --git a/cmd/pspng.c b/cmd/pspng.c index 2bf9d7a..8a99a31 100644 --- a/cmd/pspng.c +++ b/cmd/pspng.c @@ -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); 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)); for(int k = 0; k < 300000; k++) { new_data[k] = data[offset-(offset-prior_offset-1)+k]; -- cgit v1.2.3