Create generateDynamicImage

Function to create, show and save a dynamic PNG image