I am exporting some images from flash and then resizing them in php. I am using the GD library to do this. However, I am having some difficulty getting the sizes right... some are landscape, some are portrait and I have even sized divs that they need to be put into.
So, when I resize them to a certain height there are some that are (for example) 150px x 30px and some that are 30px x 150px. The problem is with vertical alignment in the css.
I figure the solution is to just put whitespace around the images so that they all measure the same width and height but with the image centered in the middle vertically and horizontally.
What is the best way to do this with the GD library?