Khodaei and Faez proposed a new adaptive data hiding technique based on LSB substitution and pixel-value differencing. Their algorithm can embed a large amount of secret data while maintaining acceptable image quality. However, their proposed algorithm only has fixed embedding capacity. In addition, the derivation for three consecutive pixels in the boundary region is poorly manipulated using raster scan order, resulting in inaccurate pixel differences. Finally, an overflow problem may occur for some embedding cases. In this study, we adopt non-overlapping blocks with m-by-n pixels to address the above problems. The cover image is first partitioned into non-overlapping blocks. The LSB substitution and optimal pixel adjustment process are then employed to embed the secret message into the central pixel of each block. The residual pixels within the same block are with message embedded using a pixel-value differencing scheme. The experimental results show that our proposed algorithm can achieve an adjustable embedding capacity according to the block size.The proposed technique is feasible in adaptive data hiding.