Use of makePtr, shift fix for 16-bit images.