From f17673be9ccc136f12abf9bb21c903024569cb72 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 2 Jan 2015 19:15:09 -0800 Subject: [PATCH] docs: Template image --- docs/api/image.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/api/image.md b/docs/api/image.md index 75545e99..d7cf8aee 100644 --- a/docs/api/image.md +++ b/docs/api/image.md @@ -13,7 +13,10 @@ var window = new BrowserWindow({icon: '/Users/somebody/images/window.png'}); ## Supported formats -Only `PNG` and `JPG` formats are supported, and `PNG` format is preferred. +On Mac all formats supported by the system can be used, while on Linux and +Windows only `PNG` and `JPG` formats are supported. + +So it is recommended to use `PNG` images for all cases. ## High resolution image @@ -51,4 +54,22 @@ Following suffixes as DPI denses are also supported: * `@2x` * `@2.5x` * `@3x` +* `@4x` +* `@5x` + +## Template image + +Template images consist of black and clear colors (and an alpha channel). +Template images are not intended to be used as standalone images and are usually +mixed with other content to create the desired final appearance. + +The most common case is to use template image for menu bar icon so it can adapt +to both light and dark menu bars. + +Template image is only supported on Mac. + +To mark an image as template image, its filename should end with the word +`Template`, examples are: +* `xxxTemplate.png` +* `xxxTemplate@2x.png` -- 2.43.0