Welcome Guest, Not a member yet? Register   Sign In
Create thumbnail on canvas?


I am wondering if it's possible to create a thumbnail on a blank fixed-sized canvas. I need this to get a perfect image with vertical centering too. So for example I want a thumbnail that has a fixed width and height of 200 x 200px. I wan't to create that blank canvas using GD and then 'place' an image in the center/center of that canvas. Is this possible using the image_lib? I looked around, but can't find a solution here in this forums. Now I hope you can help me.

Thanks for your help.

I already solved this problem with PHP in combination with CSS margin-top. I used PHPs getimagesize() to get the image height, then use a negative top margin from half the height. Also you have to position the image relative with set css top at 50%.

I hope I gave someone an idea with sort-a-like problem...

Theme © iAndrew 2016 - Forum software by © MyBB