Jump to content

imagefilledellipse() renders as a square on my server, not on my XAMPP


inzania

Recommended Posts

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]

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.

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  :wtf:)

 

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 =\

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.