Namespace: image

lib. image

Image module.

Author:
  • Taka Okunishi
Source:

Methods

<static> png2ico(src, dest)

Parameters:
Name Type Description
src string

PNG source file.

dest string

ICO source file.

Author:
  • Taka Okunishi
Source:

<static> resizeImage(src, size, dest, callback)

Resize a image

Parameters:
Name Type Description
src string

Source image file path.

size object

Resize image size.

Properties
Name Type Description
width number

Resize image width.

height number

Resize image height.

dest string

Destination image file path.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source:

<static> text2image(text, filename, options, callback)

Create a image from text.

Parameters:
Name Type Description
text string

Source text.

filename string

Image file name.

options object

Optional settings.

Properties
Name Type Argument Description
width number

Image width.

height number

Image height.

color string

Text color.

backgroundColor string <optional>

Image background color.

fontFamily string <optional>

Text font family.

fontFile string <optional>

Custom font file.

cornerRadius number <optional>

Corner radius size.

callback function

Callback when done.

Author:
  • Taka Okunishi
Source: