Jump to content

entity_azirius

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by entity_azirius

  1. I've been working with PHP's GD Library for a few weeks now and I've found something that maybe able to be helpful to certain aspects of my site. This is the imagecopymerge() function.I've succesfully merged two images together.http://entitys-arena.co.uk/images/RoE/GD.phpNow, what I am trying to build here is a battle scene, but as it is, I've hit a wall when trying to merge more than two items together, so I could have more than one monster/thing on the image at once. Is there anyway I could merge more than two images together?Here is the current code:

    <? header('content-type: image/jpeg'); 	$max_monsters = 3; 	$monster_img = array('01', '02', '03', '04'); 	$monster_base_url = "/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/"; 	$monster_back_url = "back/"; 	$monsters_url = "monsters/"; 	$count = count($monster_img); 	$select = rand(0, ($count - 1));	$mons_src = $monster_img[$select];		$monster = imagecreatefrompng("/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/monsters/$mons_src.png");	$monster_width = imagesx($monster);  	$monster_height = imagesy($monster);  	$image = imagecreatetruecolor($monster_width, $monster_height);  	$image = imagecreatefromjpeg("/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/back/01.jpg");	$size = getimagesize("/home/.flirt/entity_azirius/entitys-arena.co.uk/images/RoE/back/01.jpg");  	$dest_x = $size[0] / 8;  	$dest_y = $size[1] / 4;	        imagecopymerge($image, $monster, $dest_x, $dest_y, 0, 0, $monster_width, $monster_height, 100);            imagejpeg($image);  	imagedestroy($image);  	imagedestroy($monster);?>

    If there is someone who thinks they can help me, I'll be very greatful :)

  2. Heh, well it seems that the problem has been sorted. A function that was used before was messing around with the arrays. Here is what was messing things about!

    <?php// Clean up MySQL - By Zulumonkeyfunction cleanall() {	foreach($_POST as $key => $val) {	$_POST[$key] = stripslashes(strip_tags($val, ENT_QUOTES));	$$key = stripslashes(strip_tags($val, ENT_QUOTES));	}	foreach($_GET as $key => $val) {	$_GET[$key] = stripslashes(strip_tags($val, ENT_QUOTES));	$$key = stripslashes(strip_tags($val, ENT_QUOTES));	}}cleanall();?>

    But I am not entirely sure why it is not working because of this code, though.Well thank you for all your help on this. It has been much appriciated.:)

  3. The file is included through another file containing only switches, so no problem there.No Javascript at all, appart from a little on a marquee but nothing that should affect the form.I've even changed the list to PMLIST to make sure, it still considers it as "Array"I don't understand this, its completely stupid! Lol

  4. Ah that must be a recent addition, because they were just attempts at getting things working, I've also tried imploding and exploding as well, and attempting it without counting and exploding/splitting results in the following error (imploding gives an error message also, but a different one):Warning: Invalid argument supplied for foreach() in PMinbox.php on line 265Which I don't understand, it doesn't seem to read the Array correctly or something... :SREMOVEDThat is how it should look by the way!It should all work, but for some reason it doesn't. Its probably something quite simple, but it has me well and truely baffled!

  5. I do hate to double post, but I've still not been able to solve my problem, I've even tried modifying it slightly, tried exploding and imploding the results, but still to no avail!Help would of course be appriciated!Oh, and I'm working with MySQL version 5.0.24 if that makes any difference on the way the MySQL code is written! :)

  6. I've recently been making myself a user system for my website, and while making improvements on the current PM system I decided to change the single PM deletion to Single deletion and multiple deletion, now I've got the form worked out and I've got the general gist of what to do, but I still seem to recieve errors, I was just wondering if some one could help me out?REMOVEDAny help on this will be a great help and I will be very greatful for any information/help etc.Thanks :)

×
×
  • Create New...