Resample Image

I have a data set of 2d images. I want to resample it with given space value. like spacing with 1.2 or 1.5.
Most of the itk resampling examples are based on given image size. Which example works like that?

I wrote a small command line tool a few years ago that allows to deal with ITK transform. Part of the tool does exactly what you are talking about. You can look at the source code here. Sorry about the lack of comments and documentation in the codeā€¦

Lets suppose, I have a 2D image of spacing value 1.0 with dimension of 512x546.
for this image i have a pixel value of 255 in position (218,141)

after doing a sampling on the 2D image with spacing 1.5 , the dimension becomes 341x364.
Now what will the position of the same pixel value of 255 ?