A simple Python script that will help you convert images to XPM files with just one command line: img2xpm
Clone repo (you can delete it after running script successfully)
git clone git@github.com:eyubech/image-to-xpm.git && cd image-to-xpmand run config script
./config.bashnow ur ready
img2xpm path/to/image