Welcome to WebmasterWorld Guest from 52.206.226.77

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

What would affect imagecopy()?

     
2:45 pm on May 29, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2004
posts: 789
votes: 0


I've created a function that's part of a class of image functions. The function in question replaces 'tiles' from a $source image on to a $dest image according to some $x, $y and $dimensions (it's a square so height and width are the same).

The weird thing is that if I run this function on one script, it runs fine. However, if I run the function on another script - bare in mind they're both getting the same variables - the output is different.

So what could affect imagecopy()?

4:56 pm on May 29, 2008 (gmt 0)

Senior Member

joined:Nov 12, 2005
posts:5967
votes: 0


Just for clarification, you are using the same $source, $dest, $x, $y, and $dimension values for both scripts and getting different output? What is the difference in output?
6:02 pm on May 29, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2004
posts: 789
votes: 0


Yep. The difference is that scriptA draws the write amount of 'tiles', whereas scriptB displays one randomly placed 'tile' (note: the location doesn't change on reload, it stays in the same place)
3:58 pm on June 3, 2008 (gmt 0)

Senior Member

joined:Nov 12, 2005
posts:5967
votes: 0


Have you sorted this yet? I cannot imagine what would make different images if the exact same data was passed to the function just the function is within different scripts on the same server. My guess is there is something small that you are overlooking. I also have a feeling that the input to the functions are slightly different giving you different output. there's something wrong with the logic somewhere it seems.
4:03 pm on June 3, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2004
posts: 789
votes: 0


It's really weird. I've resorted to disabling the function in scriptB and only allowing it to be rebuild in scriptA. Weird...