summaryrefslogtreecommitdiffstats
path: root/pts-core/objects/pts_Graph
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-28 20:53:53 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-28 20:53:53 -0500
commit09ed23bf37c87617628c394bd7aff1bd54f73213 (patch)
tree3aa604345d169b4b531fc0f32632fd42a944af63 /pts-core/objects/pts_Graph
parent5ad3fac14d691c2d5a025b19e92929283c6d6d6a (diff)
downloadphoronix-test-suite-upstream-09ed23bf37c87617628c394bd7aff1bd54f73213.tar.gz
phoronix-test-suite-upstream-09ed23bf37c87617628c394bd7aff1bd54f73213.tar.xz
phoronix-test-suite-upstream-09ed23bf37c87617628c394bd7aff1bd54f73213.zip
bilde_renderer: Add a JPEG renderer using the GD library
Diffstat (limited to 'pts-core/objects/pts_Graph')
-rw-r--r--pts-core/objects/pts_Graph/pts_Graph.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/pts-core/objects/pts_Graph/pts_Graph.php b/pts-core/objects/pts_Graph/pts_Graph.php
index dd843a3..2e23710 100644
--- a/pts-core/objects/pts_Graph/pts_Graph.php
+++ b/pts-core/objects/pts_Graph/pts_Graph.php
@@ -133,7 +133,14 @@ abstract class pts_Graph
}
else if($gd_available && getenv("SVG_DEBUG") == false)
{
- $this->setRenderer("PNG");
+ if(getenv("JPG_DEBUG") !== false)
+ {
+ $this->setRenderer("JPG");
+ }
+ else
+ {
+ $this->setRenderer("PNG");
+ }
}
else
{
@@ -151,6 +158,10 @@ abstract class pts_Graph
{
$this->graph_renderer = "SWF";
}
+ else if($renderer == "JPG")
+ {
+ $this->graph_renderer = "JPG";
+ }
else
{
$this->graph_renderer = "PNG";
@@ -392,6 +403,10 @@ abstract class pts_Graph
{
$this->graph_image = new bilde_svg_renderer($this->graph_attr_width, $this->graph_attr_height, $this->graph_internal_identifiers);
}
+ else if($this->graph_renderer == "JPG")
+ {
+ $this->graph_image = new bilde_jpg_renderer($this->graph_attr_width, $this->graph_attr_height, $this->graph_internal_identifiers);
+ }
else if($this->graph_renderer == "SWF")
{
$this->graph_image = new bilde_swf_renderer($this->graph_attr_width, $this->graph_attr_height, $this->graph_internal_identifiers);