Text edits
This commit is contained in:
parent
2c6210cf9c
commit
254cdc0e6c
1 changed files with 10 additions and 10 deletions
|
@ -29,15 +29,15 @@ On Windows, you can also load `ICO` icon from a file path.
|
||||||
## High resolution image
|
## High resolution image
|
||||||
|
|
||||||
On platforms that have high-DPI support, you can append `@2x` after image's
|
On platforms that have high-DPI support, you can append `@2x` after image's
|
||||||
file name's base name to mark it as a high resolution image.
|
base filename to mark it as a high resolution image.
|
||||||
|
|
||||||
For example if `icon.png` is a normal image that has standard resolution, then
|
For example if `icon.png` is a normal image that has standard resolution, then
|
||||||
`icon@2x.png` would be treated as a high resolution image that has double DPI
|
`icon@2x.png` would be treated as a high resolution image that has double DPI
|
||||||
density.
|
density.
|
||||||
|
|
||||||
If you want to support displays with different DPI density at the same time, you
|
If you want to support displays with different DPI densities at the same time,
|
||||||
can put images with different sizes in the same folder, and use the filename
|
you can put images with different sizes in the same folder and use the filename
|
||||||
without DPI suffixes, like this:
|
without DPI suffixes. For example:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
images/
|
images/
|
||||||
|
@ -51,7 +51,7 @@ images/
|
||||||
var appIcon = new Tray('/Users/somebody/images/icon.png');
|
var appIcon = new Tray('/Users/somebody/images/icon.png');
|
||||||
```
|
```
|
||||||
|
|
||||||
Following suffixes as DPI denses are also supported:
|
Following suffixes for DPI are also supported:
|
||||||
|
|
||||||
* `@1x`
|
* `@1x`
|
||||||
* `@1.25x`
|
* `@1.25x`
|
||||||
|
@ -71,13 +71,13 @@ 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
|
Template images are not intended to be used as standalone images and are usually
|
||||||
mixed with other content to create the desired final appearance.
|
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
|
The most common case is to use template images for a menu bar icon so it can
|
||||||
to both light and dark menu bars.
|
adapt to both light and dark menu bars.
|
||||||
|
|
||||||
Template image is only supported on OS X.
|
**Note**: Template image is only supported on OS X.
|
||||||
|
|
||||||
To mark an image as a template image, its filename should end with the word
|
To mark an image as a template image, its filename should end with the word
|
||||||
`Template`, examples are:
|
`Template`. For example:
|
||||||
|
|
||||||
* `xxxTemplate.png`
|
* `xxxTemplate.png`
|
||||||
* `xxxTemplate@2x.png`
|
* `xxxTemplate@2x.png`
|
||||||
|
@ -112,7 +112,7 @@ Creates a new `NativeImage` instance from `dataUrl`.
|
||||||
|
|
||||||
## Instance Methods
|
## Instance Methods
|
||||||
|
|
||||||
The following methods are available on instances of `nativeImage`
|
The following methods are available on instances of `nativeImage`:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var NativeImage = require('native-image');
|
var NativeImage = require('native-image');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue