homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
What would affect imagecopy()?
ahmedtheking




msg:3661911
 2:45 pm on May 29, 2008 (gmt 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()?

 

eelixduppy




msg:3662041
 4:56 pm on May 29, 2008 (gmt 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?

ahmedtheking




msg:3662129
 6:02 pm on May 29, 2008 (gmt 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)

eelixduppy




msg:3665846
 3:58 pm on Jun 3, 2008 (gmt 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.

ahmedtheking




msg:3665852
 4:03 pm on Jun 3, 2008 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved