ImageFile.translate_limits

ImageFile.translate_limits(translation, reverse=False)

Find the limits of an image after a translation.

After using ImageArray.translate some areas will be black, this finds the max area that still has original pixels in

Parameters:

translation – 2-tuple the (x,y) translation applied to the image

Keyword Arguments:

reverse (bool) – whether to reverse the translation vector (default False, no)

Returns:

limits

4-tuple

(xmin,xmax,ymin,ymax) the maximum coordinates of the image with original information