Esempio n. 1
0
    def extractMessageFromImage(self):
        #Create a NewSteg object
        steg = NewSteganography(self.currentPath)

        #Make sure it is set to the proper orientation
        steg.setProperOrientation()

        #Get the message from the image
        message = steg.extractMessageFromMedium()

        #Disable the extract button
        self.btnExtract.setEnabled(False)


        #Display the message based on the type
        if message.messageType == "GrayImage" :
            pass
            image = message.getDecodedGrayImage()
            self.displayExtractedGrayImage(image)

        elif message.messageType == "ColorImage" :
            image = message.getDecodedColorImage()
            self.displayExtractedColorImage(image)

        else :
            text = message.getDecodedText()
            self.displayExtractedText(text)