View Issue Details

IDProjectCategoryView StatusLast Update
0009167mantisbtreportspublic2012-11-29 02:47
ReporterSneakyWho_am_i Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
PlatformPCOSLinuxOS VersionUbuntu Hardy
Product Version1.1.1 
Fixed in Version1.2.0rc1 
Summary0009167: GD Should check for antialiasing in JPGraph
Description

Ubuntu Hardy does not use the default compiled-in version of GD. I'm not sure about other versions or other distributions. This will not affect shared hosts, I think...

Sadly, without compiled-in gd, you don't have access to some of the specialist functions like antialising, and it can (and does) cause mantis's graphs to not render at all.

Steps To Reproduce

1: in ubuntu, issue
sudo apt-get install php5-gd
2: install Mantis by whatever method tickles your fancy
3: Install the JPGraph script and plug it into Mantis
4: Visit /mantis/summary_graph_bystatus.php

actual result:

  • graph cannot be created because there is no function for antialiasing in your php implementation

expected result:
a miracle happens

Additional Information

There are a bunch of ways to fix this, due to some impressive foresight shown in Mantis's development.

In the file

--------------------------------------------------------

# $Id: graph_api.php,v 1.36.2.1 2007-10-13 22:35:29 giallu Exp $
# --------------------------------------------------------</b>

I found the error in here on line 70:
if ( ON == config_get_global( 'jpgraph_antialias' ) ) {
$graph->img->SetAntiAliasing();
}

  • The first possible fix might be to use a function_exists(), but I think that it would be slow and wasteful?
  • Another way might be to have antialiasing OFF by default, and make the user turn it ON
  • I turned it off explicitly in my config.inc.php with
    $g_jpgraph_antialias = OFF;
    ...
    and it looks fine to me

I have attached a file, it shows how pretty my graphs look without antialiasing. What do they look like with it?

TagsNo tags attached.
Attached Files
summary_graph_bystatus.png (3,044 bytes)   
summary_graph_bystatus.png (3,044 bytes)   

Relationships

related to 0015246 closedvboctor JPGraph 3.5.x anti aliasing error in Ubuntu 

Activities

giallu

giallu

2008-05-19 02:47

reporter   ~0017869

Thanks for the comprehensive bug report!

So, I think the safest and easiest fix it to turn on anti-aliasing and let the user switch it on when he's sure about anti-aliasing support.

grangeway

grangeway

2009-02-15 07:23

reporter   ~0020847

Added an admin check to test for this case.