What steps do I take to import a simple heightmap from mspaint into Unity?

I would like to import a simple black and white drawing made in mspaint as a heightmap for a terrain object.

I tried several times and to convert the heightmap from bmp or png to raw using imagemagick and different command options but I never got the results I expected.

Please tell me the steps I need to take to convert an image generated in mspaint into a format where I can use it as a heightmap in Unity. I do not have access to photoshop, only free tools.

HeightmapFromTexture