Bpmn to image with custom icons and elements

I want to create the image of the BPMN with customized icons. The existing bpmn-to-image command line utility I used against the diagram.bpmn file in the example “bpmn-js-example-custom-elements” . The customization is missing in the image. i want prgramatically create the image from customized bpmn file, Please suggest the solution

Could you link the examples you quote? This allows us to better understand what you’re using.