def get_cropped_centered_img_coords(options, tile_size, center_vector, crop, t):
 (x, y) = get_tile_coords_from_tuple(options, t)
 new_tile_x = ((x - crop[0]) - center_vector[0])
 new_tile_y = ((y - crop[1]) - center_vector[1])
 new_img_x = (new_tile_x * tile_size[0])
 new_img_y = (new_tile_y * tile_size[1])
 return (new_img_x, new_img_y)

def get_cropped_centered_img_coords ( options , tile_size , center_vector , crop , t ) : ( x , y ) = get_tile_coords_from_tuple ( options , t ) new_tile_x = ( ( x - crop [ 0 ] ) - center_vector [ 0 ] ) new_tile_y = ( ( y - crop [ 1 ] ) - center_vector [ 1 ] ) new_img_x = ( new_tile_x * tile_size [ 0 ] ) new_img_y = ( new_tile_y * tile_size [ 1 ] ) return ( new_img_x , new_img_y )
returns the new image coords used to paste tiles in the big image .