[SOLVED] JPGraph Image quality setting

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

[SOLVED] JPGraph Image quality setting

Post by Chris Corbyn »

Hi all,

I'm using JPGraph and it's all going great but the images I'm wanting to make are 700x500 pixels and the default size is about 800KB (Bitmap)....!!!!

So I checking in the documentation and I see you can change the format to JPEG and therefore apply a quality (in precentage %).

I've done:

Code: Select all

$graph->img->SetImgFormat('jpeg');
$graph->img->SetQuality(75);
To acheive this and I can visually see the lower quality but when right clicking and choosing "Save Image As" I still get a Bitmap of over 800KB.

Any clues? (Those are the only two lines I've added to alter the qulaity).

Thanks :-)
Last edited by Chris Corbyn on Sun Apr 24, 2005 1:32 pm, edited 1 time in total.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Solved: viewtopic.php?t=32668&highlight=jpgraph

*cough* - I shall tell myself off now....

"Search dammit!" :lol:
Post Reply