Looking cleaner code of Python Combining Image with PIL
You can simplify the checks that find the smallest image. If you assume that if the image is smaller in one dimension, it will be smaller in both (which you seem to be already), you can find the smallest image using min's key parameter:
small_image = min(image1, image2, key=lambda image: image.size[0])
large_image = image1 if image2 == small_image else image2

canvas = large_image.load()
insert = small_image.load()

The key function is applied to each image before they're compared. In this case, I'm comparing each of the image's size[0] values. To get the larger image, you could get creative with sets if images are hashable, but I think a conditional expression is probably easiest.
This also reduces your check at the bottom to just
large_image.show()


This part:
r, g, b = insert[col, row]

if r &lt; 250 and g&lt; 250 and b&lt; 250:
        canvas[col, row + 130] = r, g, b

Can be simplified a bit if you use all with a generator expression:
color = insert[col, row]

if all(c &lt; 250 for c in color):
    canvas[col, row + 130] = color

This frees you up from needing to create, compare, then recombine three separate variables.

Final code:
from PIL import Image

image1 = Image.open(&quot;lady_tiny.jpg&quot;)
image2 = Image.open(&quot;eiffel.jpg&quot;)

small_image = min(image1, image2, key=lambda image: image.size[0])
large_image = image1 if image2 == small_image else image2

canvas = large_image.load()
insert = small_image.load()

for col in range(width):
    for row in range(length):
        color = insert[col, row]

        if all(c &lt; 250 for c in color):
            canvas[col, row + 130] = color
            
large_image.show()