pingwyn.core.func.square_pixels

Resize an image such that the width and height of a pixel are equal (i.e. square).

This function can be used if the physical dimensions of an image are equal (i.e. a square image), but one of the two axis contains more data points than the other (e.g. 300 rows with 600 data points).

Note: Images will only be scaled up, achieved by repeating pixel rows/columns.

param image:

The image which needs to be squared.

type image:

pingwyn.Image

returns:

The image with its pixels squared.

rtype:

pingwyn.Image