Changes

Jump to navigation Jump to search

image.copy

55 bytes added, 12:55, 11 June 2011
no edit summary
Line 1: Line 1:  +
__NOTOC__
 
image.'''copy''' is a function that is part of [[:Category:image|image]].
 
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 function returns a copy of the input image scaled to fit the specified pixel width and height. <br />
The width and height default to the size of the input image.
+
The width and height default to the size of the input image.<br />
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.
+
The routine raises an error if the new width or height are less than or equal to 0 or greater than 25000.<br />
 +
The routine raises an error if there is insufficient memory to create the new image.
      Line 17: Line 19:  
|-
 
|-
   −
| <u>image</u> || [[TI.Image]] || The original image.
+
| <u><center>image</center></u> || [[TI.Image]] || The original image.
 
|-
 
|-
| <u>width</u> || number || The width of the new image
+
| <u><center>width</center></u> || number || The width of the new image
 
|-
 
|-
| <u>height</u> || number || The height of the new image
+
| <u><center>height</center></u> || number || The height of the new image
 
|}
 
|}
    
== Example  ==
 
== Example  ==
<syntaxhighlight>newImage = image.copy(oldImage, h * normal, h * normal)</syntaxhighlight>
+
<syntaxhighlight>newImage = image.copy(oldImage, 10, 15)</syntaxhighlight>
    
== Good to know ==
 
== Good to know ==
   −
To make a relative scale, use <syntaxhighlight>'''image.copy'''(image, scaleX * image.width(image), scaleY * image.height(image))</syntaxhighlight>
+
To make a relative scale, use <syntaxhighlight>image.copy(image, scaleX * image.width(image), scaleY * image.height(image))</syntaxhighlight>
 
      
== See also  ==
 
== See also  ==

Navigation menu