GD stuff

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dcahrakos
Forum Newbie
Posts: 11
Joined: Mon Sep 26, 2005 6:52 pm

GD stuff

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
dcahrakos
Forum Newbie
Posts: 11
Joined: Mon Sep 26, 2005 6:52 pm

Post by dcahrakos »

thanks imagecopyresampled() sounds like what I need, ill try it out
Post Reply