Hi All,
I have a site which displays the lots in an auction using php/mysql and tables. Where a photo exists, it displays a thumbnail link to a larger picture which opens in it's own window.
In common with many others, I want to move to a CSS model for layout and I have come across a great technique that displays large images when a thumbnail is hovered over.
However, this technique requires the image dimensions to be set in CSS. Since this cannot be done dynamically AFAIAA, I want to resize all of my large images to a maximum size which can be set in CSS. The problem arises where the image is landscape or portrait and therefore needs to be filled out with a background colour to match the dimensions set in the CSS.
Is there any way to do this in PHP? The resizing is no problem, but I don't know how to fit a rectangular image into a square background.
Any ideas would be welcome.
Thanks,
Brendan