Insert picture from file...

A command in the World menu of the Picture window.

## Purpose

To draw a picture file (PNG; on Mac and Windows also JPEG or TIFF; other picture formats may also work) into the Picture window (or into the Demo window).

## Settings

File name
  the name of the picture file. If you use this command in a script, you can use a relative path name such as `pictures/myface.png` or `~/Desktop/hello.png`.
From x
To x
  The horizontal location (in world coordinates) where the picture will appear. Use the Axes... command to set world coordinates if they have not been set implicitly by an earlier Draw or Paint command. If you set From x and To x to the same value, the picture will be horizontally centred around this x value and obtain a width that preserves the aspect ratio (width-to-height ratio) of the original picture.
From y
To y
  The vertical location (in world coordinates) where the picture will appear. Use the Axes... command to set world coordinates if they have not been set implicitly by an earlier Draw or Paint command. If you set From y and To y to the same value, the picture will be vertically centred around this y value and obtain a height that preserves the aspect ratio (width-to-height ratio) of the original picture.

## Behaviour

From the description above, you see that if From x is unequal to To x and From y is unequal to To y, the picture will probably obtain an aspect ratio different from the original picture. To preserve the aspect ratio, either make To x equal to From x or make To y equal to From y.

To show the picture on the same number of pixels as the original, make To x equal to From x and To y equal to From y. Praat will then show the picture with the original width and height (in pixels), centred around the given x and y values.

## Usage

You will usually use this in a script, and often in a script that runs the Demo window.

### Links to this page

- What was new in 5.2?
- What was new in 5.3?
- What was new in 5.4?
- What's new?