By default JpGraph automatically chooses the image format to use in the order PNG, JPEG and GIF. The exact format depends on what is available on your system. There are two ways you can influence the way the graphic format is chosen.
DEFINE ("DEFAULT_GFORMAT" ,"auto");
$graph-> img-> SetImgFormat( "jpeg")