Page 1 of 1

GD stuff

Posted: Mon Nov 07, 2005 9:10 pm
by dcahrakos
Hey, im trying to create a horizontal bar like say an experience bar with GD and PHP, but im not sure how to go about it,

what I have is a 90x8 outline for the bar, and a 2x8 image to fill that outline, can someone help me with putting the 2x8 image in the 90x8 outline and stretch it inside the outline according to certain numbers? if so that would be great


hope that makes sense.

Posted: Mon Nov 07, 2005 9:41 pm
by feyd
imagecopyresampled() would be the typical function to use to stretch and place one image over another, however I prefer using a div with the background set to the under-layer and a standard image set correctly inside with the overlay.

Posted: Mon Nov 07, 2005 9:45 pm
by dcahrakos
thanks imagecopyresampled() sounds like what I need, ill try it out