Process Instance Diagram

Hello everybody!
How I get Process Instance Diagram in PNG file from Java API. I want save image of every step(on each task).

I get
ActivityInstance ai = runtimeService.getActivityInstance(pi.getId());
But I don’t know how it vizualize… It is very important for me!
Help me!