I have a need to resize pictures on a website I'm making for my company. The pictures must be a very specific size, and if the proportions are not correct I must be able to pad the image with a border to make it 'fit'. I'm not sure what the best way to approach this problem is. My knee-jerk was to simply add Rectangles to the image on the fly as I needed, but I'm unable to find a way to make a composite image like that. Should I just make a suitable, blank Rectangle, and superimpose my image over it? Which libraries or functions should I be most heavily looking at?
The resizing and saving all work great - that is not the issue. Adding this padding is the only problem.