Hi I am using this code to print out a graph and it seems to print out garbage and I get the error message
Warning: Cannot add header information - headers already sent by (output started at /export/elections/viewvotes.php:3) in /export/elections/drawImg.php on line 3 (Header)
Header("Content-Type: image/jpeg");
// set up image and colours
$im = ImageCreateFromJPEG("graph.jpg");
$blue = ImageColorAllocate($im, 8, 63, 206);
// fill with colour up to specific length
// length of colour bar depends on percentage of votes
ImageFilledRectangle($im, 0, 3, ($perc_votes*2), 9, $blue);
// output to browser
ImageJPEG($im);