gdallocationinfo
is for getting pixel values out of a raster. For conversion you should use gdaltransform
. If you provide the target image as an argument you can enter pixel coordinates and get projected coordinates in return.
So:
gdaltransform input.tif
256 256