input output as the post "Nearest Neighbor Image Scaling" http://blog.csdn.net/songzitea/article/details/10562055