| Extracted from Pike v7.8 release 866 at 2018-02-09.

[Top]
Image
Image.Image

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

Method dct

  `object dct(int newx, int newy)`

Description

  Scales the image to a new size.

  Method for scaling is rather complex; the image is transformed via a cosine transform, and then resampled back.

  This gives a quality-conserving upscale, but the algorithm used is n*n+n*m, where n and m is pixels in the original and new image.

  Recommended wrapping algorithm is to scale overlapping parts of the image-to-be-scaled.

  This functionality is actually added as an true experiment, but works...

Parameter `newx`
Parameter `newy`

  new image size in pixels

Returns

  the new image object

Note

  Do NOT use this function if you don't know what you're dealing with! Read some signal theory first...

  It doesn't use any fct (compare: fft) algorithms.