setImage

Insert image from clipboard or image file into an annotation

Syntax

thisAnnotation.setImage(path)
thisAnnotation.setImage('clipboard')
thisAnnotation.setImage('')

Description

thisAnnotation.setImage(path) inserts a image from the file specified with the path argument.

thisAnnotation.setImage('clipboard') inserts an image from the clipboard.

thisAnnotation.setImage('') sets the annotation to be a text annotation.

Arguments

path

Specifies the full path to the image file.

'clipboard'

Specify inserting an image from the clipboard.

''

An empty value that sets the annotation to be a text annotation.

Returns

None

Examples

If annotation A is represented by Annotation object sA, the MATLAB® command statement sA.setImage('myfolder/annotation_images/converter.png') inserts the converter.png image in annotation A.

Introduced in R2014a