SINEKT Posted March 22, 2013 Share Posted March 22, 2013 Hello!First thing to say, the code is not written by me, it's a complex statistics module for a game server (Counter Strike Source). But, of course, if necessary, I can provide any code/files needed. I don't even know if the code is the problem. This is weird. The situation is as follows: for each player, there is a page of information and statistics, and on this page, there's a graph showing the evolution of the player. Generating this graph requires PHP with GD with Freetype support. So you need PHP compiled with GD, which is in turn compiled with Freetype support. I did this thing already, because I'm keeping the site on my own server on Linux and I can play with it any way that I want. And anyway, if everything is not compiled as it should, the graph doesn't show at all.The problem is that while the graph looks ok, the text has some black spots, as if there's something overlayed over it. The interesting part is that when I right-click on the image and choose "view image", the black spots disappear and the text shows up perfectly. Even more strange is that the same thing happens locally, on the system that I work on. I download the image from the server and open it with various programs. If you open it with IrfanView, the spots are there, if you open it with Paint or Photoshop, the spots disappear ... Does anyone have any idea what's going on? I initially thought it's the code, but when I clicked View Image, I got confused. LINK : http://www.happycs.ro/stats/hlstats.php?mode=players&game=css - Here is the player list, click on each one until you find one with a graphic (some say "Not enough data")I'll also upload two images, the first a screenshot where you can see what it looks like when the graph is broken, and the second, the image itself, which I said it shows up differently on different viewers. Quote Link to comment https://forums.phpfreaks.com/topic/276027-weird-problem-generating-graph-and-text/ Share on other sites More sharing options...
SINEKT Posted March 23, 2013 Author Share Posted March 23, 2013 I went one step ahead into solving this, I figured out that the graph image is a PNG, and the dark areas in the text is actually transparent area. But I still have absolutely no idea why this happens. Quote Link to comment https://forums.phpfreaks.com/topic/276027-weird-problem-generating-graph-and-text/#findComment-1420411 Share on other sites More sharing options...
Solution SINEKT Posted March 23, 2013 Author Solution Share Posted March 23, 2013 Solved it. It turns out I don't even have to worry about the transparency (though it would be interesting to see what causes the issue), I can just match the background color of the div with the text color, and it looks fine. Quote Link to comment https://forums.phpfreaks.com/topic/276027-weird-problem-generating-graph-and-text/#findComment-1420413 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.