Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.0

Bug #2832 GD always outputs PNG
Submitted: 2004-11-25 23:21 UTC
From: oliver at burtchen dot com Assigned: nosey
Status: Closed Package: Image_Graph
PHP Version: 5.0.2 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 10 - 8 = ?

 
 [2004-11-25 23:21 UTC] oliver at burtchen dot com
Description: ------------ Using Image_Graph-0.3.0dev2-pre: The GD-driver always outputs PNG to the browser, if you don't set a file name. The only way to get JPG-output is to set a filename ending with '.jpg', even if you don't need the file.

Comments

 [2004-11-26 07:19 UTC] pear dot nosey at veggerby dot dk
True it does, I'll add an option, so that you can specify output format, i.e. something like: $Graph->done(array('output' => 'jpg'));
 [2004-11-26 16:22 UTC] oliver at burtchen dot com
Well, thanks for your reply. I saw in CVS (driver.php) there is a $param['format'] for the driver-factory methode to distinguish between PNG and JPG. But it's not used by GD at the end. So what's with it? Second I saw a typo in gd.php where function done($param = false) { parent::done($param); if (($param === false) or (!isset($param['filename']))) { $output = 'png'; if (($param !== false) and (isset($param['output']))) { -----> $outout = $param['output']; } should be -----> $output = $param['output']; Third, I like Image_Graph very much!!! ;-)