Results 1 to 2 of 2

Thread: Question about results graphs

  1. #1
    Join Date
    Apr 2008
    York, UK

    Default Question about results graphs

    I've noticed that the png files that are produced by pts-grapher are rather large (170Kb per file) and was wondering why you aren't applying any of png's compression to the images.

    It only needs a 1 character change in pts_Graph.php to reduce size of the generated images from 170Kb to 6Kb each. I suspect this would be useful to have on PTS Global to as it would significantly reduce the bandwidth of viewing test results.

    diff --git a/pts-core/objects/pts_Graph.php b/pts-core/objects/pts_Graph.php
    index 0c55ff2..f58b189 100644
    --- a/pts-core/objects/pts_Graph.php
    +++ b/pts-core/objects/pts_Graph.php
    @@ -438,7 +438,7 @@ class pts_Graph
            protected function return_graph_image()
    -               Imagepng($this->graph_image, $this->graph_output, 0);
    +               Imagepng($this->graph_image, $this->graph_output, 9);
            public function save_graph($file)

  2. #2


    Yeah, I really don't know why I hadn't enabled PNG compression earlier... Anyways, it's compressed now in git.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts