Update
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user