Are you using GIMP? Also, horizontal or vertical?
If it's gimp, Go to view > Check 'Show grid'
Go to Image > Configure grid and type 256 in both of the length and with boxes under "Spacing" boxes.
That will give you a line exactly half way vertical and horizontal.
Then just use the pen tool or brush and put the dot on the line > Shift + click and hold.
The line should light up green if you have it exact.