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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.