Esempio n. 1
0
        def getMessage(buttonHide):
            print(self.entryMessage.get())

            msg = bytes(self.entryMessage.get(), 'utf8')
            img = self.entryImagem.get()
            image = bytes(ImageOperations.extracting_blue(img))

            blue = Client.insert_image(image, msg)
            ImageOperations.write_image(img, blue)
Esempio n. 2
0
        def extractMessage(buttonExtract):
            self.photo["file"] = self.entryImagem.get()

            img = self.entryImagem.get()
            image = bytes(ImageOperations.extracting_blue(img))

            msg = Client.extract_msg(image)
            decoded_msg = "".join(chr(x) for x in msg)

            self.labelMessageExtract[
                "text"] = "Extracted message: \n" + decoded_msg
Esempio n. 3
0
 def test_write_new_image(self):
     blue_values = imgop.extracting_blue('screen.png')
     imgop.write_image('screen.png', blue_values)
     img1 = imgop.extracting_blue('encodedscreen.png')
     self.assertEqual(blue_values, img1)
Esempio n. 4
0
 def test_blue_values(self):
     blue_values = imgop.extracting_blue('screen.png')
     self.assertEqual(imgop.extracting_blue('screen.png'), blue_values)