| 1 |
<html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 2 |
<title>Insert picture from file...</title> |
| 3 |
<style> |
| 4 |
td { padding-left: 5pt; padding-right: 5pt; } |
| 5 |
th { padding-left: 5pt; padding-right: 5pt; } |
| 6 |
code { white-space: pre-wrap; } |
| 7 |
dd { white-space: pre-wrap; } |
| 8 |
</style> |
| 9 |
</head><body bgcolor="#FFFFFF"> |
| 10 |
|
| 11 |
<table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b> |
| 12 |
Insert picture from file... |
| 13 |
</b></font></table></table> |
| 14 |
<p>A command in the <b>World</b> menu of the <a href="Picture_window.html">Picture window</a>.</p> |
| 15 |
<h2>Purpose</h2> |
| 16 |
<p>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).</p> |
| 17 |
<h2>Settings</h2> |
| 18 |
<dl> |
| 19 |
<dt><b>File name</b> |
| 20 |
<dd>the name of the picture file. If you use this command in a script, you can use a relative path name such as <code><font size=+1>pictures/myface.png</font></code> or <code><font size=+1>~/Desktop/hello.png</font></code>.</dd> |
| 21 |
<dt><b>From x</b> |
| 22 |
<dt><b>To x</b> |
| 23 |
<dd>The horizontal location (in world coordinates) where the picture will appear. Use the <a href="Axes___.html">Axes...</a> command to set world coordinates if they have not been set implicitly by an earlier <b>Draw</b> or <b>Paint</b> command. If you set <b>From x</b> and <b>To x</b> to the same value, the picture will be horizontally centred around this <i>x</i> value and obtain a width that preserves the aspect ratio (width-to-height ratio) of the original picture.</dd> |
| 24 |
<dt><b>From y</b> |
| 25 |
<dt><b>To y</b> |
| 26 |
<dd>The vertical location (in world coordinates) where the picture will appear. Use the <a href="Axes___.html">Axes...</a> command to set world coordinates if they have not been set implicitly by an earlier <b>Draw</b> or <b>Paint</b> command. If you set <b>From y</b> and <b>To y</b> to the same value, the picture will be vertically centred around this <i>y</i> value and obtain a height that preserves the aspect ratio (width-to-height ratio) of the original picture.</dd> |
| 27 |
</dl> |
| 28 |
<h2>Behaviour</h2> |
| 29 |
<p>From the description above, you see that if <b>From x</b> is unequal to <b>To x</b> and <b>From y</b> is unequal to <b>To y</b>, the picture will probably obtain an aspect ratio different from the original picture. To preserve the aspect ratio, either make <b>To x</b> equal to <b>From x</b> or make <b>To y</b> equal to <b>From y</b>.</p> |
| 30 |
<p>To show the picture on the same number of pixels as the original, make <b>To x</b> equal to <b>From x</b> and <b>To y</b> equal to <b>From y</b>. Praat will then show the picture with the original width and height (in pixels), centred around the given <i>x</i> and <i>y</i> values.</p> |
| 31 |
<h2>Usage</h2> |
| 32 |
<p>You will usually use this in a script, and often in a script that runs the <a href="Demo_window.html">Demo window</a>.</p> |
| 33 |
<h3>Links to this page</h3> |
| 34 |
<ul> |
| 35 |
<li><a href="What_was_new_in_5_2_.html">What was new in 5.2?</a> |
| 36 |
<li><a href="What_was_new_in_5_3_.html">What was new in 5.3?</a> |
| 37 |
<li><a href="What_was_new_in_5_4_.html">What was new in 5.4?</a> |
| 38 |
<li><a href="What_s_new_.html">What's new?</a> |
| 39 |
</ul> |
| 40 |
<hr> |
| 41 |
<address> |
| 42 |
<p>© ppgb 20140608</p> |
| 43 |
</address> |
| 44 |
</body> |
| 45 |
</html> |