Options

The BitmapImage class supports the following options.

Table 10-1. BitmapImage Options

Option

Type

Description

file

string

Read image data from the given file.

data

string

Read image data from a string. If the file option is given, this option is ignored.

width, height

integer

The width (height) of the image memory. Note that this is the requested size, not the actual size. To get the actual size, use the corresponding methods.

format

string

If several file handlers can handle the given file, this option can be used to specify which handler to use. If you haven't installed extra file handlers, there's no need to use this option.