We have a t-shirt company with designs, we want to merge our design on t-shirt and generate thumbnail. These designs are raw images that we need to apply into image templates to generate product photos.
This task is create a complete script that generates product images on when requested. This is not a manual task, this is just a sample, we have thousands, so don't do this by hand. You can use ImageMagick, GD+ PHP, Flash or any such similar libraries. I want result in PNG format.
Filling Images have two properties: Fit or Fill. Fit means to fit image borders inside the space allotted. Fill means to stretch the image so that all borders of the alloted area are covered with the image. I have given 4 product templates. The yellow area is the area that we will replace/ put on depending on the fit/or/fill.
Fit means, that image borders only have to touch the outline of yellow area either horizontally or vertically. It does not matter to fill all yellow area. as long as its touching, its fine. Also , image will be center placed according to the 4 outlines of the yellow area.
Fill means: that image has to fill the complete yellow area. It has to completely fill 100% of yellow area, without distorting ratio of width and height. image will also be center aligned to the yellow area we have assigned.
There is an excel that has which products to generate for the image. I have done sample for image 1 and 2, Image 1 is done with fit, and image 2 is done with fill. I have attached a zip file with all the samples, sample result, and some more images to do as DEMO.
There are two ways to do this, we can either identify yellow color ( i can even change color to any that you want), or we can set the height and width along with x and y location of the boundaries. I prefer we do with boundaries, but if easier, won't mind color either, but then we will also replace the remaining yellow color in fill with another color.
I have 5 more projects very similar to this, so i am looking for a long term relation.