ImageFile.translate_limits

ImageFile.translate_limits(translation, reverse=False)

Find the limits of an image after a translation.

Parameters:
  • im (ImargeArray,ImageFile) – Image data to be worked with.

  • 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

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