added an example how to create an image file for an NSImage or a system entity image, fixed a deprecation