| Extracted from Pike v7.8 release 700 at 2013-06-08.

[Top]
Image
Image.Image

# Method Image.Image()->scale()

Method scale

  `object scale(float factor)`
  `object scale(0.5)`
  `object scale(float xfactor, float yfactor)`

Description

  scales the image with a factor, 0.5 is an optimized case.

Parameter `factor`

  factor to use for both x and y

Parameter `xfactor`
Parameter `yfactor`

  separate factors for x and y

Returns

  the new image object

Method scale

  `object scale(int newxsize, int newysize)`
  `object scale(0, int newysize)`
  `object scale(int newxsize, 0)`

Description

  scales the image to a specified new size, if one of newxsize or newysize is 0, the image aspect ratio is preserved.

Parameter `newxsize`
Parameter `newysize`

  new image size in pixels

Returns

  the new image object

Note

  resulting image will be 1x1 pixels, at least