Given a number of pixels, determines the largest width and height that define a
      rectangle with such an area

def _determine_dimensions(num_of_pixels):
    """
    Given a number of pixels, determines the largest width and height that define a
      rectangle with such an area
    """
    for x in xrange(int(math.sqrt(num_of_pixels)) + 1, 1, -1):
        if num_of_pixels % x == 0:
            return num_of_pixels // x, x
    return 1, num_of_pixels