Thumbnails and PHP
Hi
Maybe I can get a hint from someone on this.
What I have in mind is to create the thumbnail from gif or jpeg images that I have in directories. All the gif and jpeg images are of different sizes and shapes, that is not a problem as I can run a few tests and then assign a percentage to either the width or height variable.
The problem is what to do with the rest of the space. What I mean by that is if say the original size was 500pix x 100pix and I want the thumb to be no more than 100pix, I can with no problem do that. But the thumb is only 20pix high now, there is a lot of empty space below it now.
What I want to do is build a container that is 100pix by 100pix and put the thumb into it, centered is the ideal, but left and top isn't a problem.
I think it has to do with transparent colors so that the image shows through.
Thanks in advance
Mike
|