How to add extra image information that doesn’t exist in the original?
How to make a square picture fit a rectangle for page banner?
Is there a program that can make extra background so my square image fits wordpress banners better?
Yes, the answer to these is ‘outpainting’.
It is possible to use Artificial Intelligence (AI) to add information to a picture that doesn’t exist in the original. So a square image can have it’s left and right borders extended with a relevant background. A seamless extension of the image that the original author never imagined. It sounds very science fiction but is ever so easy to use.
Example of outpainting
We use this image of this astronaut on our Awesome Free Images post. But we also wanted to use the spaceman as the wordpress banner. To achieve this the square image of 512 x 512 px needed a boost in resolution and more importantly it need to be wider not taller.
This is our astronaut:
He is a great piece of free AI generated artwork but is very tightly cropped and could do with some more image to the left and right that would create a rectangle of at least 1200px wide without making the visor bigger.
The solution is to get the AI art generator to add what it thinks would go well in this image. There are often 4 results and you can filp through each one until you see what you want. Not problem if none are any good, just try again but adjust the inpainting box.
From our spaceman closeup selfie to an image wide enough to call it a banner.
Also notice the outpainting has included above and below, anything not required can just be cropped out with a graphics app.
We did not supply the background. It was all the work of DALL.E2. The AI looked at the existing background and suggested something similar that would blend in perfectly with the image supplied.
One button to download the image and it’s yours to keep.
Use ‘Add a Generation Frame – F’ to place a blue rectangle overlapping the original image and some empty space on the page.
In the prompt just type ‘inpaint’ or ‘outpaint’ (they both seem to work) and click ‘Generate’.
You get a black label with 4 white dots, use this to flick through the suggestions, accept the one you want.
If you get odd results not to your liking, cancel and re-adjust the Generation frame position. More or less overlap can help.
Modifying the outpainting command with supplemental commands can give some interesting results.
To complete more outpainting, just add another generation frame and repeat the outpainting procedure.
For out astronaut we added left then right outpainting that overlapped the visor which gave some unwanted results. A re-run with less visor and more black space produced the results we were seeking.
If you want to see a video of an outpainting in progress, see out the timelapse of Vermeers Girl with a Pearl Earring on the Dall.E site. It really helps explain in pictures what is going on in the AI program to make these backgrounds appear from nowhere.
These are some of the AI results we rejected. Not because they were bad, they just didn’t fit with the idea at the time. A better control of the AI commands can produce more controlled results but this is art. Art at it’s digital finest, let the AI run free.
Leave a Reply