Python reads data from the image through channel B

Source: Internet
Author: User

After encountering an image information hiding question, the question hides the information in Channel B of the image, and finds a readable tool on the Internet,

It's just a graphical figure. You need to move it one by one, and it's a little troublesome to start reading data. You want to write a simple Applet and print all the information directly.

1 #! /Usr/bin/env python 2 # coding = UTF-8 3''' read the data hidden in Channel B from the Image ''' 4 import Image 5 6 im1_image.open('4.png ') 7 pixdata = im. load () 8 result = [] 9 # obtain the range to be resolved. We recommend that you do not run 10 for y in xrange (limit 6, 10 80) on the entire graph ): # modify the range of y to 11 for x in xrange () as needed: # modify the range of x to 12 data = pixdata [x, y] [2] 13 result. append (chr (data) 14 print ''. join (result)

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.