inzania Posted January 14, 2011 Share Posted January 14, 2011 This is really strange and throwing me for a loop. I suspect there's a config setting somewhere in my PHP setup on my server which I am missing... I have a PHP script that renders a vector drawing (as a series of lines/points) into a png image. When I'm testing the script on my local machine (XAMPP + OSX) everything works great. When the script runs on my host (hostgator) the imagefilledellipse() function renders as a square instead of a circle. Screenshots below. Try the server version for yourself at http://sundrynotes.com/alpha/ (press "create new note" in the lower right then long-press on the note and select the "whiteboard" option, draw, then press "accept"). [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/ Share on other sites More sharing options...
BlueSkyIS Posted January 14, 2011 Share Posted January 14, 2011 compare your GD versions. you can get them using phpinfo(); <?php phpinfo(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/#findComment-1159496 Share on other sites More sharing options...
inzania Posted January 14, 2011 Author Share Posted January 14, 2011 Both XAMPP and hostgator are showing "GD Version bundled (2.0.34 compatible)" The libpng and freetype versions differ, but I assume that those don't sound relevant... Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/#findComment-1159529 Share on other sites More sharing options...
BlueSkyIS Posted January 14, 2011 Share Posted January 14, 2011 well, at least that helps rule out that issue. it looks like there is an issue with anti-aliasing on the hostgator server. in other words, pixels that should be semi-transparent are rendered as completely solid, causing the "jaggies". i guess I would hack around with anti-aliasing settings, file types (use png or gif), and transparent color settings. sorry I can't be more definite about the problem or solution. maybe someone else has more insight. Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/#findComment-1159532 Share on other sites More sharing options...
inzania Posted January 14, 2011 Author Share Posted January 14, 2011 Thanks for the help I'm contacting the hostgator support, hopefully they can identify the problem... Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/#findComment-1159537 Share on other sites More sharing options...
BlueSkyIS Posted January 14, 2011 Share Posted January 14, 2011 hate to rain on your parade, but they will most likely blame the code. Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/#findComment-1159545 Share on other sites More sharing options...
inzania Posted January 14, 2011 Author Share Posted January 14, 2011 Haha yeah - they of course will blame the code. I did figure it out though. For whatever reason, I needed to reset the thickness of the line (in the server version only ) So before I call imagefilledellipse(), I call imagesetthickness($img, 1) It seems the thickness of the line was acting as a 'stroke' around the circle. It makes sense, just seems strange to me that this would behave differently on the same GD version =\ Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/#findComment-1159549 Share on other sites More sharing options...
BlueSkyIS Posted January 14, 2011 Share Posted January 14, 2011 strange, but whatever. it would have taken longer for me to figure that out. Quote Link to comment https://forums.phpfreaks.com/topic/224454-imagefilledellipse-renders-as-a-square-on-my-server-not-on-my-xampp/#findComment-1159552 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.