Converting images to .r16 (heightmap tiles)?

I have 16 images that I am trying to use as a terrain’s heightmap, with each image being a “tile”. Unfortunately, the only format that UE4 will accept for landscape tiles is .r16, and I can not find any way to convert these images to this specific file format. What are the ways that I can do this using simple tools, or Photoshop?

It should also accept 16-bit grayscale png. The tiled import was upgraded to accept png in 4.12.

Yes sir I convert into .png format. This method is absolutely 100% usable

Any .jpg or .png file cannot be converted to .RAW format .Only vice versa is possible .Try using .png .UE4 works fine on png .Just convert to greyscale. Hope this helps.