Your shopping cart is empty.

Sep 28, 2023
This is a short python program which uses PIL (Python imaging library or Pillow) to perform its magic. Cut and paste or email me for the source (Or even better sign up for my page and I'll use that email).
It takes an input image and places it in a 2048x2048 square with a white background.
#!/usr/bin/python3
#
# (c) 2023 Treadco
#
import numpy as np
import sys
from PIL import Image
def main():
try:
image = Image.open(sys.argv[1])
except IndexError:
print("Could not open the input \nUsage to_instagram inputfile outputname")
sys.exit()
if len( sys.argv) < 3:
outputfilename = "output.jpg"
else:
outputfilename = sys.argv[2]
iarray = np.array(image.convert("RGB"))
nx = iarray.shape[0]
ny = iarray.shape[1]
inew = Image.new( "RGB", [2048,2048], (255,255,255))
if nx > ny :
simage = image.resize([ int((2048.*ny)/nx),2048 ])
inew.paste( simage, [int((2048-int((2048.*ny)/nx))/2),0])
else:
simage = image.resize([2048, int((2048.*nx)/ny) ])
inew.paste( simage, [0,int((2048-int((2048.*nx)/ny))/2)])
inew.save(outputfilename)
main()
This is only visible to you because you are logged in and are authorized to manage this website. This message is not visible to other website visitors.
This means you can use the camera on your phone or tablet and superimpose any piece of art onto a wall inside of your home or business.
To use this feature, Just look for the "Live Preview AR" button when viewing any piece of art on this website!
SAVE 20% ON YOUR FIRST ORDER!
Enter your email below and we'll email you a 20% OFF Coupon right now!
This offer is valid for NEW CUSTOMERS only!