Convert Ionogram to Image (bmp/raw) written in C