Pārlūkot izejas kodu

Editando los comentarios

SaraB 7 gadus atpakaļ
vecāks
revīzija
b66ffda1b1
3 mainītis faili ar 20 papildinājumiem un 5 dzēšanām
  1. 1
    0
      StegaPanel.h
  2. 17
    5
      mainwindow.cpp
  3. 2
    0
      steganography.cpp

+ 1
- 0
StegaPanel.h Parādīt failu

@@ -38,6 +38,7 @@ private:
38 38
     QImage old_image;
39 39
     QImage new_image;
40 40
     int leastBits; //number of bits used in pixel for message
41
+		   //cantidad de bits usadod en pixel para el mensaje
41 42
     QString orig_msg;
42 43
 
43 44
 };

+ 17
- 5
mainwindow.cpp Parādīt failu

@@ -11,17 +11,29 @@ StegaPanel::StegaPanel(QWidget *parent) :
11 11
     QMainWindow(parent),
12 12
     ui(new Ui::StegaPanel)
13 13
 {
14
-    ui->setupUi(this); //
14
+    ui->setupUi(this); 
15 15
 
16 16
 }
17 17
 
18 18
 void StegaPanel::hideMessage()
19 19
 {
20 20
 
21
-    string binMsg ;         // Will be used to store the message in a binary String format
22
-
23
-    ui->error_msg_label->clear(); //clear error text
24
-    orig_msg = ui->textEdit->toPlainText(); //obtain msg from textEdit
21
+  ///~English 
22
+  /// Will be used to store the message in a binary string format
23
+  ///~Spanish
24
+  /// Se usara para almacenar el mensaje en un formato de caracteres binario  
25
+  string binMsg ;         
26
+
27
+    ///~English
28
+    /// clear error text
29
+    ///~Spanish
30
+    /// despejar mensaje de error
31
+    ui->error_msg_label->clear(); 
32
+    ///~English
33
+    /// obtain message from textEdit
34
+    ///~Spanish
35
+    /// obtener el mensaje de textEdit
36
+    orig_msg = ui->textEdit->toPlainText(); 
25 37
 
26 38
     if(old_image.isNull()){
27 39
         qDebug() << "Load an image first!";

+ 2
- 0
steganography.cpp Parādīt failu

@@ -84,9 +84,11 @@ void EmbbedMessage(const QImage & origImage, QImage & newImage, string msg){
84 84
 
85 85
     binMsg = messageToBinaryString(msg);
86 86
 
87
+    //~English
87 88
     // We will include this postfix, so that the decoder will
88 89
     // know when the embedded message ends. It consists of 1 char
89 90
     // whose ASCII is 0.
91
+    //~Spanish
90 92
     // Vamos a incluir este sufijo, tal que el decodificador sepa
91 93
     // cuando el mensaje embedido termina.  Este consiste de 1 caracter
92 94
     // cuyo ASCII es 0.