djrobin17 / image-stego-tool Goto Github PK
View Code? Open in Web Editor NEWLSB Image Steganogrpahy Encoder and Decoder Python Program
LSB Image Steganogrpahy Encoder and Decoder Python Program
This might be a python 2 to python 3 thing, but there is a bug in the code that leads to really obviously distorted images (especially obvious where there is a dark background to the image).
Because bin() does not pad with leading zeroes, for small pixel values, you aren't changing only the LSB
e.g. take a pixel value of 17 - the output of bin(17) is 0b10001, and when you take the [2:9] slice of this you get 10001. The new LSB is added to the end of this, so you end up with 100010 or 100011 - which is 34 or 35 so very different from 17!
I'm sure there is a simpler solution, but the below code works :-)
array[p][q] = int(bin(array[p][q])[2:].zfill(8)[:7] + b_message[index], 2)
i.e. convert to binary, remove 0b from start, pad with leading zeroes, then remove LSB
Thanks for the code - was very useful - even if it did drive me slightly nuts debugging my weirdly striped images :-)
I have dont the entire code with opencv and bitarray where i used bitarray instead of using a delimiter to encode and decode the message. I have taken zero padding(null bytes padding) and completed the code with proper exception handling.Can you assign me this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.