I am not sure but you might just have to use mel (maya embedded language). I use only scripts for custom buttons, because of the ease of editing. In order to get the icon, I just apply it to an object, go into the attributes editor, click the texture's tab and take a screenshot of the sample. Then I go into photoshop, then paste, crop, and resize if necessary. You could easily make them with paint to, I use .bmp's for mine. I am unsure if you can use other file formats.