Changes

Jump to navigation Jump to search

image.copy

1,132 bytes added, 21:40, 24 May 2011
Created page with "image.'''copy''' is a function that is part of image. The function returns a copy of the input image scaled to fit the specified pixel width and height. Th..."
image.'''copy''' is a function that is part of [[:Category:image|image]].


The function returns a copy of the input image scaled to fit the specified pixel width and height.
The width and height default to the size of the input image.
The routine raises an error if the new width or height are less than or equal to 0 or greater than 25000. This routine raises an error if there is insufficient memory to create the new image.


{{Since|3.0}}

== Syntax ==
image.'''copy'''(image, width, height)

{| class="wikitable"
|-
! Parameter !! Type !! Description
|-

| <u>image</u> || [[TI.Image]] || The original image.
|-
| <u>width</u> || number || The width of the new image
|-
| <u>height</u> || number || The height of the new image
|}

== Example ==
<syntaxhighlight>newImage = image.copy(oldImage, h * normal, h * normal)</syntaxhighlight>

== Good to know ==

To make a relative scale, use <syntaxhighlight>'''image.copy'''(image, scaleX * image.width(image), scaleY * image.height(image))</syntaxhighlight>


== See also ==
*[[TI.Image]]
*[[:Category:image|image functions]]
*[[image.new]]

<br /><br />

[[Category:image]]

Navigation menu