Jump to content

advanced dynamic images


dzhax

Recommended Posts

I am working on a dynamic image script for someone and I need to have a background image and also load an avatar image also. Is this possible? All the documentation i can find only shows background images that cover the whole image. Also if this make any difference the avatar must be loaded on the fly from the database becasue it can change. It is basically a online "trading card" that displays the users avatar and their stats with a nice background image.

Link to comment
Share on other sites

Thanks for the suggestion SoltBeings but, unless i read it wrong you can't display multiple at the same time. That is more for like multiple sizes of the same image or displaying an image style button (on/off) look of the button. Correct me if im wrong.

Link to comment
Share on other sites

IS there no reason you cant load one image for the parent element background, and load avatar image as img child element or the background of another div child element, so that it overlaps the larger using css position relative and position: absolute and set its stack level using z-index, or am i getting what you require totally wrong?

Link to comment
Share on other sites

currently using GD to make the image. its so i can call an img tag and put a url in the src field to display it. @birbal ill take a look at GD2. Yes that is exactly what im looking to do also adding text here and there also I might need to add more than just the avatar image wise to it also.

Link to comment
Share on other sites

There is nothing as impossible in programing. gd have all the funtion to work with even in pixel level. the steps would be like1) first create a empty image resource using http://php.net/imagecreatetruecolor]imagecreatetruecolor() (consider it as blank canvas)2) create anothe resource for background image imagecreatefrom*() .3) use imagecopyresampled() to copy the image into the first image resource.4) same way do with the avatar and other image you msy like to add5) use image*() to display or save the filehttp://au2.php.net/manual/en/function.imagettftext.php for text manupulation in image(* will be the format of the file) also consider the way as dsonuk has said. if it is possible with just html css better option would be that. if it is not your option you can go with gd. if the image is not changing over and over it would be best to manupulate it at the time when user upload the avatar.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...