Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com > PHP converting coordinates

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 05-08-2009, 06:53 PM PM User | #1 Pandabeer New Coder   Join Date: Mar 2009 Posts: 43 Thanks: 2 Thanked 0 Times in 0 Posts converting coordinates im not pro @ maths, but this is what i want, i have some coordinates from a game (account info) and those are going from -9999.9999 till 9999.9999 so how to convert them to something that'll fit in a picture of 1536x1536 pixels (with imagecopy because ill put an icon over it)
 05-08-2009, 07:05 PM PM User | #2 mlseim Master Coder     Join Date: Jun 2003 Location: Cottage Grove, Minnesota Posts: 9,249 Thanks: 8 Thanked 1,055 Times in 1,046 Posts So the exact center is 0,0 ? And the upper-left corner is -9999, 9999?
05-08-2009, 07:07 PM   PM User | #3
Pandabeer
New Coder

Join Date: Mar 2009
Posts: 43
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by mlseim So the exact center is 0,0 ? And the upper-left corner is -9999, 9999?
center = 0,0 down-left corner = -9999,9999 ( dunno exact ) and upper right corner = 9999,9999 ( same )

 05-08-2009, 09:11 PM PM User | #4 mlseim Master Coder     Join Date: Jun 2003 Location: Cottage Grove, Minnesota Posts: 9,249 Thanks: 8 Thanked 1,055 Times in 1,046 Posts See image attached ... So, if I'm correct, you're placing your image (in red) onto the graph (in black). Let us know if that is the correct idea of what you're doing. EDIT: Here's what I came up with ... PHP Code: ``` 0){ \$py = \$imageCenterHeight - abs(round(\$y * \$divy)); } // Do your pixel or ttf (text) thing here. // Set the text or pixels at \$px,\$py // Output & Free Memory  header("Content-type: image/jpeg");  imagejpeg(\$image);  imagedestroy(\$image);  ?> ``` Attached Thumbnails   Last edited by mlseim; 05-09-2009 at 04:22 AM..

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 08:38 PM.