pingwyn.square_pixels

pingwyn.square_pixels(image)

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.

Parameters:

image (pingwyn.Image) – The image which needs to be squared.

Returns:

The image with its pixels squared.

Return type:

pingwyn.Image