analitics

Pages

Showing posts with label stepic. Show all posts
Showing posts with label stepic. Show all posts

Thursday, August 11, 2016

Hide your info with stepic python module.

I will show a funny way to put your info into one image and then show this info.
First you need one image. I used this image:


First need to use Python 2.7 with Image ( Pillow python module) and stepic python module.
... and follow the below steps:

C:\Python27>cd Scripts
C:\Python27\Scripts>pip install Image
C:\Python27\Scripts>pip install stepic
C:\Python27\Scripts>cd ..

C:\Python27>python
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

To encode and then to show the text from one image I used this python script:


import PIL
from PIL import Image
import stepic
im=Image.open("MonaLisa.jpg")
im1 = stepic.encode(im,'The smallest feline is a masterpiece.')
im1.save('test_encode.jpg','JPEG')
im.show()
im1.show()
decoding=stepic.decode(im1)
data_encode=decoding.decode()
print data_encode