Your shopping cart is empty.
Last call for Christmas delivery: use code ARTGIFT when placing your order to get 20% off. Ends tomorrow.
Oct 06, 2023
I've set up another simple python program to produce an image made of four others. This is a step to fancy animations. Apparently panels of four things are more eye-catching than panels of one thing. It's even more pronounced if only one panel is animated. That'll take OpenCV to do automatically.
For what it's worth, if you aren't familiar with programming note how I've used a function to simplify the code. Once I read the documentation for OpenCV I'll add a function to generate each frame. This function will look like main() but without any hard-wired constants.
# (c) 2023 Treadco
import numpy as np
from PIL import Image
# return an image scaled to fit into xw,yw with background color
# defaults are for a 2048,2048 instagram image of 4 quadrants
def fitted_image( an_image,xw=1024,yw=1024, background=(255,255,255)):
iarray = np.array( an_image.convert("RGB") )
nx = iarray.shape
ny = iarray.shape
inew = Image.new( "RGB", [xw,yw], (255,255,255))
if nx > ny :
simage = an_image.resize([ int((xw*ny)/nx),yw ])
inew.paste( simage, [int((xw-int((xw*ny)/nx))/2),0])
simage = an_image.resize([xw, int((yw*nx)/ny) ])
inew.paste( simage, [0,int((yw-int((yw*nx)/ny))/2)])
if len( sys.argv) < 5:
print("Could not open the input \nUsage to_quad ul ur ll lr outputname")
if len( sys.argv) < 6:
outputfilename = "output.jpg"
outputfilename = sys.argv
inew = Image.new( "RGB", [2048,2048], (255,255,255))
inew.paste( fitted_image(Image.open(sys.argv)), [0,0])
inew.paste( fitted_image(Image.open(sys.argv)), [1024,0])
inew.paste( fitted_image(Image.open(sys.argv)), [0,1024])
inew.paste( fitted_image(Image.open(sys.argv)), [1024,1024])
The presence of this badge signifies that this business has officially registered with the Art Storefronts Organization and has an established track record of selling art.
It also means that buyers can trust that they are buying from a legitimate business. Art sellers that conduct fraudulent activity or that receive numerous complaints from buyers will have this badge revoked. If you would like to file a complaint about this seller, please do so here.
This website provides a secure checkout with SSL encryption.
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.
Click on any Image to continue
Below, select which favorite lists you would like to save this product into.
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!