I’m not asking for the code, unless you have it 😉 All I’m asking for is a point in the right direction.
Basically I’m trying to rewrite my ‘football kit generator’ Currently I use a template with 2 colours, they are changed using the imagecolorset function.
But now I want to start using better looking kits with shading and such (IE http://img829.imageshack.us/img829/3450/aspireblackwhite.gif)
I would be very grateful if somebody could give me some advice on how to do this.
Server-side please
Your question is unclear as to whether or not you are trying to accomplish this on the server-side or the client side. Either way using 24 bit PNGs with alpha transparency will be probably be the best way to accomplish this.
If you want to generate the images on the server side, begin with the jersey as a partially transparent png with the white-parts transparent, then use a solid color as a mask behind it.
Some info here about alpha transparency and the GD library: How to merge transparent PNG with image using PHP?
If this is con the client you could layer solid color shirt images behind the same alpha-transparent PNG with absolutely positioned element and some changing of the z-index.
EDIT: For multiple colored jersey stripes you could layer three images: Two solid color jerseys with alternating stripes + 1 alpha grayscale image to go over the top for shading.