divide image to blocks in python and compute histogram for each one , then Return it to its origin

i would like to divide image to blocks in python and compute histogram for each one , then Return it to its origin.

after divide it to blocks, i would to encrypt it using serpent algorithm

any one can help me at any part

many thanks for all

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum