PHP cut section out of image, possible?

Soldato
Joined
26 Aug 2006
Posts
9,726
Location
62.156684,-49.781113
Thought this deserved a separate thread to my other, even though it relates to my same page, it's something I could need to know in general.

I'm creating an image gallery: http://gumbald.co.uk/photos/, but after putting some portrait ones in there, I think they look silly. So I want all my thumbnails to be landscape.

For the portrait photos, I envisaged this would be a section cut from the middle of them. However, I can't find a way to do this automatically. I don't want to have to make the thumbnails myself, I've got a perfectly good upload page which puts entries into mysql also.

Can it be done? Something similar to "imagecopyresize"?
 
That didn't seem to work, I was getting black bars down the sides of the images. I do an imagecopyresampled to take the image to the correct width, then cut the section out of the middle of it...
 
Back
Top Bottom