Newbie - write directly to external image file

Good Morning,

I am an experienced programmer, but new to Vulkan - so please excuse if these are overly simplistic question(s).

I would like to create a triangle using Vulkan, but not render it to a GUI/popup, rather just write it out to an external file as PPM/JPG/PNG (some kind of image file). Can anyone point me to a simple example of how this can be done?

Thank you in advance for any help/hints or code example(s).

Sascha Willems has an example for that (among many others).