I am looking for a script that will automate the process of creating images from a background image in jpg format and placing an illustrator file on top within a specific area based on criteria from the illustrator file name and a text file that contains information about the background jpg file.
I have a folder that contains hundreds of sub-folders that contain an .ai file. Each of these files is named using the convention 11460-H6-0339 [url removed, login to view] where 11460 is the folder name H6-0339 is the Height of the vector in cm and W10 is the Width of the file in cm. All of the vectors are on 10x10cm artboards and are aligned to the top left. No vector has a side larger than 10cm
I also have a folder that contains a number of .jpg files that are all 1600x1600px,
Currently i have to manually open one of the jpg files, the place one of the vector file on it, resize the vector to fit in the free space of the image (all of the images are of rooms and the vectors are designs of wall stickers that we sell) use a color overlay on the vector to change its colour to a colour to suit the background and then save it for web in the vectors folder. I have to do this for around 6-10 background images for each vector.
I am wanting to automate this process by finding a way to specify the free space in the background file and then automatically placing, resizing, positioning and color overlaying the vector based on preset information. I would need the ability to add new background images along with its preset info as well as specify which folder to select the vectors from and background images from.
Ideally this would run as a batch operation looping through all the vectors and creating 10 images for each vector and then starting again with the next vector.
I have included 4 files to help illustrate the challenge.
[url removed, login to view] is the basic background file.
[url removed, login to view] is to illustrate the area of the background image that the vector could placed
[url removed, login to view] is to illustrate how a completed image should look
11460-H6-0339 [url removed, login to view] is an example illustrator file
Another possible way i thought could work if you think more appropriate would be to make all of the background images psd files and to draw a rectangle layer where the free space is in the colour i would want the vector to be, then the vector would just have to be imported resized to fit and positioned in the centre of the rectangle and then a clipping mask could be used to could the image and then save for web.
I hope this given you some idea as to what I am trying to achieve. Please let me know if you want further clarity on any of the points