Resizing and merging several images to one image
Posted: Wed Jun 30, 2010 10:17 am
Given n images of different height and width, but all of them are taller than 640px
Is there a way to first resize the images that are bigger than 640px to 640px while maintaining the aspect ratio
and then stitch all of those n images together in one long filmstrip of an image?
The new image obviously will be of height:640px but the total width will be the sum of the resized n images.
I want the user to upload n images and then have php create a really wide image of known height.
I'm looking at GD but I am open to other suggestions, this is my first venture into image manipulation in php.
if possible, i would also like to align them with a margin of x pixels, and make the margins black.
I guess one way would be to first resize, then estimate the total width, create a black canvas and paste them all onto the canvas.
But how?
Is there a way to first resize the images that are bigger than 640px to 640px while maintaining the aspect ratio
and then stitch all of those n images together in one long filmstrip of an image?
The new image obviously will be of height:640px but the total width will be the sum of the resized n images.
I want the user to upload n images and then have php create a really wide image of known height.
I'm looking at GD but I am open to other suggestions, this is my first venture into image manipulation in php.
if possible, i would also like to align them with a margin of x pixels, and make the margins black.
I guess one way would be to first resize, then estimate the total width, create a black canvas and paste them all onto the canvas.
But how?