This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathimport.xml
More file actions
54 lines (54 loc) · 5.43 KB
/
Copy pathimport.xml
File metadata and controls
54 lines (54 loc) · 5.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<doc>
<legacy_id>1526</legacy_id>
<name>import</name>
<type>command</type>
<syntax>
<example>import <i>type</i> from file <i>filePath</i> [with mask <i>maskFilePath</i>]</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Images Multimedia</category>
<category>Files, Folders, Resources</category>
</classification>
<references>
<command tag="play">play Command</command>
<property tag="defaultStack">defaultStack Property</property>
<command tag="export">export Command</command>
<command tag="import snapshot">import snapshot Command</command>
<keyword tag="paint">paint Keyword</keyword>
<property tag="paintCompression">paintCompression Property</property>
<property tag="JPEGQuality">JPEGQuality Property</property>
<property tag="filename">filename Property</property>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<web/>
<mobile/>
</classes>
<security>
<disk access="???"/>
</security>
<summary>Creates an <keyword tag="image">image</keyword>, <object tag="EPS">EPS</object>, <glossary tag="audio clip">audio clip</glossary>, or <glossary tag="video clip">video clip</glossary> and copies the contents of a <keyword tag="file">file</keyword> into the <glossary tag="object">object</glossary>.</summary>
<examples>
<example>import paint from file "flowers.jpeg"</example>
<example>import audioClip from file "/sounds/temp/bugsounds.wav"</example>
<example>import paint from file it with mask "/etc/res/oval.pbm"</example>
</examples>
<description>
<p>Use the <b>import</b> <glossary tag="command">command</glossary> to place a sound, movie, or <keyword tag="image">image</keyword> in a <object tag="stack">stack</object>, instead of creating a <glossary tag="referenced control">referenced control</glossary> that uses an external file.</p><p></p><p><b>Parameters:</b></p><p>The <i>type</i> is one of paint, EPS, audioClip, or videoClip.</p><p>The <i>filePath</i> specifies the <glossary tag="file path">name and location</glossary> of the <keyword tag="file">file</keyword> you want to import from. If you specify a name but not a location, LiveCode assumes the <keyword tag="file">file</keyword> is in the <property tag="defaultFolder">defaultFolder</property>.</p><p>The <i>maskFilePath</i> specifies the <glossary tag="file path">name and location</glossary> of a one-bit <glossary tag="mask">mask</glossary> <keyword tag="file">file</keyword> for an <keyword tag="image">image</keyword>. You can use a <glossary tag="mask">mask</glossary> <keyword tag="file">file</keyword> only if the <keyword tag="file">file</keyword> being <glossary tag="import">imported</glossary> is in the <glossary tag="PBM">PBM</glossary> <function tag="format">format</function>.</p><p></p><p><b>Comments:</b></p><p>The imported object is placed in the current stack. To change the current stack before importing, set the <b>defaultStack</b> <glossary tag="property">property</glossary> to the stack you want to import into, then import the <keyword tag="file">file</keyword>.</p><p>Importing a paint file creates an image object on the current card. The <b>import</b> command can import <glossary tag="GIF">GIF</glossary>, <glossary tag="JPEG">JPEG</glossary>, <glossary tag="PNG">PNG</glossary>, <glossary tag="BMP">BMP</glossary>, <glossary tag="XWD">XWD</glossary>, <glossary tag="XBM">XBM</glossary>, <glossary tag="XPM">XPM</glossary>, or <glossary tag="PBM">PBM</glossary>, <href tag="glossary/Images_and/255.xml">PGM</href>, or <glossary tag="PPM">PPM</glossary> <function tag="files">files</function>. On <glossary tag="Mac OS">Mac OS systems</glossary>, <glossary tag="PICT">PICT</glossary> <function tag="files">files</function> can also be <glossary tag="import">imported</glossary> (but they cannot be displayed on <glossary tag="Unix">Unix</glossary> or <glossary tag="Windows">Windows systems</glossary>).</p><p>Importing an EPS file creates an EPS object on the current card.</p><p>Importing an audioClip or videoClip file creates an audio clip or video clip in the current stack. Audio files can be in WAV, AIFF, or AU format. Video files can be in <glossary tag="QuickTime">QuickTime</glossary>, <glossary tag="AVI">AVI</glossary>, or <glossary tag="MPEG">MPEG</glossary> <function tag="format">format</function>.</p><p></p><p><b>Note:</b> The <b>import</b> <glossary tag="command">command</glossary> places the data in the <glossary tag="stack file">stack file</glossary> itself. This assures that the information stays with the <object tag="stack">stack</object> if it's moved, but it also increases the <glossary tag="stack">stack's</glossary> size and the amount of memory used by the <object tag="stack">stack</object>. If you prefer to keep the data outside the <glossary tag="stack file">stack file</glossary>, you can display a picture file without importing it by creating an <keyword tag="image">image</keyword> and setting its <property tag="filename">filenameproperty</property>, or by choosing File menu<img src="202656"/>New Referenced Control<img src="202656"/>Image File. To allow playing a sound or movie without importing it, create a pl and set its filename prop, or choose File menu<img src="202656"/>New Referenced Control<img src="202656"/>QuickTime-Supported File.</p>
</description>
</doc>