As @WojciechKaczmarek says, use NetPBM. If you want a concrete example with ImageMagick you need to use -compress none for the ASCII versions (i.e. P1, P2 and P3) of NetPBM files.
So, make a 3-pixel wide image with one black, one white and one lime green pixel:
magick xc:black xc:white xc:lime +append image.png
Upscaled Output - so you can see it:

Now convert to ASCII PPM, everything after the # is my comment:
magick image.png -compress none ppm:
P3 # ASCII PPM signature
3 1 # dimensions are 3x1 pixels
255 # pixels are 8-bit scaled
0 0 0 255 255 255 0 255 0 # black pixel, white pixel, lime green pixel
The above syntax is for writing the PPM file on stdout. If you want it written to a file, just do:
magick image.png -compress none result.ppm
Obviously it works for BMPs and all other formats too:
magick image.bmp -compress none result.ppm
When you have finished processing your image with assorted tools, you can convert back to a BMP or other format with:
magick image.ppm result.bmp
Now that we have created a little PNG image with ImageMagick, I can show you how to convert it to ASCII PPM with the NetPBM tools:
pngtopam -plain image.png
P3
3 1
255
0 0 0 255 255 255 0 255 0
Hopefully you will see that this gives the same result as the code I showed earlier magick image.png -compress none ppm: