Skip to content

Commit

Permalink
Changed file save location
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTheCurse authored Nov 20, 2023
1 parent 05a9ef1 commit 1bc220a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ make

encoding image example:
```
./HIPS -i images/newroad.png -f test.txt -e
./HIPS -i images/lena.png -f test.txt -e
```
```
./HIPS -i images/newroad.png -m "this is amazing!" -e
Expand All @@ -56,12 +56,12 @@ decoding image example:
```
./HIPS -i enc_file.png -d
```
Decoded file will be saved to HiddenInPlainSight directory.
Encoded image and Decoded file will be saved to results directory.

## Disclaimer

This program is a proof-of-concept, and should not be intended for transfring important information, and I won't be liable for any damagaes caused by this program.

## Copyright

This software is licensed under MIT. Copyright © 2022 Rani Giro
This software is licensed under MIT. Copyright © 2022 Rani Giro
1 change: 1 addition & 0 deletions results/decodedMessage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is amazing!
Binary file added results/enc_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/Decode.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "Decode.hpp"
#include <fstream>
#define MAX_RANK_AMOUNT 10

Decode::Decode(cv::Mat image, Channel encodingChannel, Channel markingChannel, Channel rankingChannel) : _img(image),_encodeChannel(encodingChannel)
Expand All @@ -8,6 +9,10 @@ Decode::Decode(cv::Mat image, Channel encodingChannel, Channel markingChannel, C
setDataToDecodedString();
std::cout<<_decodedString<<std::endl;

std::ofstream outfile ("results/decodedMessage.txt");
outfile <<_decodedString<< std::endl;
outfile.close();


}

Expand Down
2 changes: 1 addition & 1 deletion src/Encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void Encode::writeToImage()
//compression_params.push_back(cv::IMWRITE_PNG_STRATEGY_RLE);
//compression_params.push_back(1);

cv::imwrite("enc_"+_fileName,_img);
cv::imwrite("results/enc_"+_fileName,_img);

}

Expand Down
1 change: 1 addition & 0 deletions test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello world!

0 comments on commit 1bc220a

Please sign in to comment.