View Issue Details

IDProjectCategoryView StatusLast Update
0015246mantisbtreportspublic2016-07-19 04:19
ReporterdregadAssigned Tovboctor 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.12 
Target Version2.0.0-beta.1Fixed in Version2.0.0-beta.1 
Summary0015246: JPGraph 3.5.x anti aliasing error in Ubuntu
Description

With the latest available version of JPGraph library (3.5.0b1) and the addition of the Theme system, the default 'Universal' theme forcefully calls $graph->img->SetAntiAliasing() in the SetupGraph method.

In Ubuntu (tested up to 12.10), this results in the graph not being drawn, due to an exception thrown (see attached screenshot for error 25128) because they do not use the php-bundled GD library [1], and the imageantialias() function does not exist.

It's worth noting that in the other available themes, this function call is commented out so the problem does not exist.

[1] https://launchpad.net/ubuntu/+source/php5/+bug/74647

Additional Information

This is really a jpgraph issue which should be fixed upstream. However, it would appear that Asial Corporation (owner of JPGraph), is not actively maintaining the product - last release was in Oct 2010 and there are no communication channels to report issues.

TagsNo tags attached.

Relationships

related to 0009167 closedgrangeway GD Should check for antialiasing in JPGraph 

Activities

dregad

dregad

2012-11-28 13:48

developer  

jpgraph_error_25128.png (3,165 bytes)
jpgraph_error_25128.png (3,165 bytes)
dregad

dregad

2012-11-28 14:01

developer   ~0034417

Last edited: 2012-11-28 14:02

View 2 revisions

There are several possible workarounds for this issue.

  1. Use a modified version of the Universal Theme
  • edit /path/to/jpgraph-3.5/themes/UniversalTheme.class.php
  • locate and comment out line 85:

    // $graph->img->SetAntiAliasing();
  1. Use another theme as default
  • edit /path/to/jpgraph-3.5/jpg-config.inc.php
  • locate line defining DEFAULT_THEME_CLASS
  • change it to your preferred theme (see ./themes for a list of available options)
  1. Define a dummy imageantialias() function

This will effectively disable antialiasing, and can be done in several places, e.g.

  • in /path/to/jpgraph-3.5/jpg-config.inc.php - add the following code in the file

    // Workaround for JPGraph 3.5 on Ubuntu per 0015246
    if( !function_exists('imageantialias') ) {
    function imageantialias( $image, $enabled ) {
    return false;
    }
    }
  • in /path/to/mantisbt/plugins/MantisGraph/core/graph_api.php


    diff --git a/plugins/MantisGraph/core/graph_api.php b/plugins/MantisGraph/core/graph_api.php
    index a1597a7..e3b0174 100644
    --- a/plugins/MantisGraph/core/graph_api.php
    +++ b/plugins/MantisGraph/core/graph_api.php
    @@ -24,6 +24,14 @@

    if( OFF == plugin_config_get( 'eczlibrary' ) ) {

  • Workaround for JPGraph 3.5 on Ubuntu per 0015246

  • if( !function_exists('imageantialias') ) {
  • function imageantialias( $image, $enabled ) {
  • return false;
  • }
  • }
  • $t_font_path = get_font_path();
    if( $t_font_path !== '' && !defined('TTF_DIR') ) {
    define( 'TTF_DIR', $t_font_path );

Issue History

Date Modified Username Field Change
2012-11-28 13:48 dregad New Issue
2012-11-28 13:48 dregad File Added: jpgraph_error_25128.png
2012-11-28 14:01 dregad Note Added: 0034417
2012-11-28 14:01 dregad Status new => confirmed
2012-11-28 14:02 dregad Note Edited: 0034417 View Revisions
2012-11-29 02:47 dregad Relationship added related to 0009167
2014-11-25 11:04 vboctor Category graphs => reports
2016-07-09 16:57 vboctor Assigned To => vboctor
2016-07-09 16:57 vboctor Status confirmed => resolved
2016-07-09 16:57 vboctor Resolution open => fixed
2016-07-09 16:57 vboctor Fixed in Version => 2.0.0-beta.1
2016-07-09 16:57 vboctor Target Version => 2.0.0-beta.1
2016-07-19 04:19 vboctor Status resolved => closed