can_load method

can_load

Determines whether image can be loaded from the specified file path.

Returns

true if image can be loaded from the specified file; otherwise, false.

def can_load(self, file_path):
    ...
ParameterTypeDescription
file_pathstrThe file path.

Example

Checks whether loading of a drawing is possible

can_load

Determines whether image can be loaded from the specified stream.

Returns

true if image can be loaded from the specified stream; otherwise, false.

def can_load(self, stream):
    ...
ParameterTypeDescription
streamio.RawIOBaseThe stream to load from.

Example

Checks whether loading of a drawing is possible from the stream specified

can_load

Determines whether an image can be loaded from the specified file path and optionally using the specified open options

Returns

true if an image can be loaded from the specified file; otherwise, false.

def can_load(self, file_path, load_options):
    ...
ParameterTypeDescription
file_pathstrThe file path.
load_optionsLoadOptionsThe load options.

Example

Checks whether loading of a drawing is possible with specified encoding

can_load

Determines whether image can be loaded from the specified stream and optionally using the specified load_options.

Returns

true if image can be loaded from the specified stream; otherwise, false.

def can_load(self, stream, load_options):
    ...
ParameterTypeDescription
streamio.RawIOBaseThe stream to load from.
load_optionsLoadOptionsThe load options.

Example

Checks whether loading of a drawing is possible from the stream specified with a corresponding encoding

See Also