hy,
Let's say I want to convert an image to an exact size, eg: 400x300. The trick is, if the image, due to its aspect ratio, does not fit in 400x300, then place it in there with black borders.
A 900x1200 image would be converted down to 225x300 to retain its aspect ratio, and then given black borders left and right to make it 400x300.
original photo:
|||||||||||||||||||||||
|||||||||||||||||||||||
|||||||||||||||||||||||
|||||||||||||||||||||||
|||||||||||||||||||||||
|||||||||||||||||||||||
|||||||||||||||||||||||
|||||||||||||||||||||||
after resize i want to look something like this:
_______________________
|+++++++++++++++++++++|
|+++++++++++++++++++++|
|+++++++++++++++++++++|
|+++++++||||||||++++++|
|+++++++||||||||++++++|
|+++++++++++++++++++++|
|+++++++++++++++++++++|
|_____________________|
the: "+++++++" i want to be some color, and the "|||||||" are the image, in the middle!
unfortunately i don't have any code yet!
i want something like this: http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php#x22 thanks