resize image, make c++11