-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.js
32 lines (21 loc) · 1.12 KB
/
Main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const ManipulateFiles = require('./src/scripts/ManipulateFiles');
const hideMessage = require('./src/scripts/HideMessage');
const showMessage = require('./src/scripts/ShowMessage');
const files = new ManipulateFiles();
const caminho_input = './src/images/input/';
const caminho_output = './src/images/output/';
const input_image = 'input.bmp';
const input_text = 'arquivo.txt';
const output_image = 'output.bmp';
const messageBreak = '<<<';
// -----------------------------------------------------------------
// DESCOMENTAR PARA CARREGAR A FOTO & ADD MENSAGEM SECRETA
// const readStream = files.getImage(caminho_input,input_image);
// const writeStream = files.setImage(caminho_output, output_image);
// const message = files.getText(input_text);
// readStream.pipe(hideMessage(message, messageBreak)).pipe(writeStream) // ADD MENSAGEM + IMG
// -----------------------------------------------------------------
// DESCOMENTAR PARA SABER A MENSANGEM
// const readStream = files.getImage(caminho_output,output_image);
// readStream.pipe(showMessage(messageBreak));
// -----------------------------------------------------------------