function image = mInverseDCT( coefficients, image_size, M ) A = mDCT_A_Matrix( M ); block_width = M-1; [ row_max, col_max ] = size( coefficients ); image = zeros( size( coefficients ) ); for col = 1:M:col_max for row = 1:M:row_max image( row:row+block_width, col:col+block_width ) = A'*coefficients( row:row+block_width, col:col+block_width )*A; end end image = image( 1:image_size(1), 1:image_size(2) );