Skip to content Skip to sidebar Skip to footer

Add Small Image To The Canvas As Numpy Arrays

I have two black and white images as 2d numpy arrays. One of which is a canvas (non-zero) of size 500x500 and the second one is of size 80x80. I would like to set up x and y offset

Solution 1:

The following should do what you want:

canvas[y:y+image.shape[0],x:x+image.shape[1]] = image

EDIT:fixed ordering

Post a Comment for "Add Small Image To The Canvas As Numpy Arrays"