__author__ = 'chunk' # import mjsteg import numpy as np # a = mjsteg.Jsteg("res/test2.jpg") # compY,compCr,compCb = a.coef_arrays # # res = np.array([np.split(arr,arr.shape[1]/8, axis=1) for arr in np.split(compY,compY.shape[0]/8)]) # # print res.shape # # print res[0,0:20] import jpegObj b = jpegObj.Jpeg("res/test2.jpg") c = b.getCoefBlocks(channel='Y') print c print c.shape