diff --git a/docs/example/img/img1.jpg b/docs/example/img/img1.jpg new file mode 100644 index 000000000..7eed977a6 Binary files /dev/null and b/docs/example/img/img1.jpg differ diff --git a/docs/example/img/img2.jpg b/docs/example/img/img2.jpg new file mode 100644 index 000000000..cd52d9df3 Binary files /dev/null and b/docs/example/img/img2.jpg differ diff --git a/docs/example/img/merged_image.jpg b/docs/example/img/merged_image.jpg new file mode 100644 index 000000000..e79864095 Binary files /dev/null and b/docs/example/img/merged_image.jpg differ diff --git a/docs/example/img_merge.py b/docs/example/img_merge.py new file mode 100644 index 000000000..785f06879 --- /dev/null +++ b/docs/example/img_merge.py @@ -0,0 +1,15 @@ +from PIL import Image + +#Read the two images +image1 = Image.open('img/img1.jpg') +image2 = Image.open('img/img2.jpg') + +#resize, first image +image1 = image1.resize((426, 240)) +image1_size = image1.size +image2_size = image2.size +new_image = Image.new('RGB',(2*image1_size[0], image1_size[1]), (250,250,250)) +new_image.paste(image1,(0,0)) +new_image.paste(image2,(image1_size[0],0)) +new_image.save("img/merged_image.jpg","JPEG") +new_image.show()