off by one - should be dividing by 257
only adjust the value of the pixel if ImageMagick was compiled with 16 bit QuantumDepth