Image Paste

tomni.img_paste.img_paste(big_img: numpy.ndarray, small_img: numpy.ndarray, x: int, y: int) None[source]

Paste a smaller image onto a larger image at a specified position (image coordinates).

Parameters
  • big_img (np.ndarray) – The larger image to which the smaller image will be added.

  • small_img (np.ndarray) – The smaller image to be pasted onto the larger image.

  • x (int) – The x-coordinate position in the larger image where the top-left corner of the smaller image will be placed.

  • y (int) – The y-coordinate position in the larger image where the top-left corner of the smaller image will be placed.

Returns

None

Note

The function checks if the smaller image can fit within the boundaries of the larger image at the specified position (x, y). If it can fit, the smaller image is pasted onto the larger image.