<doc>
	<legacy_id>1886</legacy_id>
	<name>crop</name>
	<type>command</type>

	<syntax>
		<example>crop <i>image</i> to <i>left</i>,<i>top</i>,<i>right</i>,<i>bottom</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Trims an <keyword tag="image">image</keyword>.</summary>

	<examples>
<example>crop image 1 to 100,100,200,200</example>
<example>crop image "photo" to the rect of graphic "Overlay"</example>
	</examples>

	<history>
		<introduced version="2.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Images &amp; Multimedia</category>
		<category>Appearance &amp; Positioning</category>
	</classification>

	<references>
		<command tag="flip">flip Command</command>
		<command tag="rotate">rotate Command</command>
		<property tag="imageData">imageData Property</property>
		<property tag="rectangle">rectangle Property</property>
	</references>

	<description>Use the <b>crop</b> <glossary tag="command">command</glossary> to remove parts of an image, or to extend the image's edges.<p></p><p><b>Parameters:</b></p><p>The <i>image</i> is any image reference.</p><p></p><p>The <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i> describe the new <keyword tag="rectangle">rectangle</keyword> of the <keyword tag="image">image</keyword>.</p><p></p><p><b>Comments:</b></p><p>The <b>crop</b> <glossary tag="command">command</glossary> changes the <glossary tag="image">image's</glossary> <keyword tag="rectangle">rectangle</keyword> <glossary tag="property">property</glossary> to the new rectangle. Unlike changing the <keyword tag="rectangle">rectangle</keyword> directly, the <b>crop</b> <glossary tag="command">command</glossary> removes image data outside the new <keyword tag="rectangle">rectangle</keyword>, instead of scaling the <keyword tag="image">image</keyword> to fit.</p><p></p><p>If the <b>crop</b> rectangle is smaller than the <glossary tag="image">image's</glossary> original <keyword tag="rectangle">rectangle</keyword>, the parts of the <keyword tag="image">image</keyword> outside the <b>crop</b> rectangle are removed. This is a permanent operation; the cropped portions do not reappear if you use the <b>crop</b> <glossary tag="command">command</glossary> to change the <glossary tag="image">image's</glossary> <keyword tag="rectangle">rectangle</keyword> back to the original size.</p><p></p><p>If the <b>crop</b> rectangle is larger than the <glossary tag="image">image's</glossary> original <keyword tag="rectangle">rectangle</keyword>, blank <property tag="pixels">pixels</property> are added to one or more edges of the <keyword tag="image">image</keyword>.</p><p></p><p></p><p></p><important>The <b>crop</b><glossary tag="command">command</glossary> cannot be used on a <glossary tag="referenced control">referenced image</glossary>. Doing so will cause an <glossary tag="execution error">execution error</glossary>.</important></description>
</doc>