Re: Bug #2832 [Opn]: GD always outputs PNG

From: Date: Fri, 26 Nov 2004 18:24:44 +0000
Subject: Re: Bug #2832 [Opn]: GD always outputs PNG
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-34586@lists.php.net to get a copy of this message
That is so true... I have implemented support for the use of the format specifier in the factory method. I have also change the 'output' parameter in the done() method to 'format' as well. Will upload to SF CVS ASAP. regards Jesper oliver at burtchen dot com wrote:
Edit report at http://pear.php.net/bugs/bug.php?id=2832&edit=1
 ID:              2832
User updated by: oliver at burtchen dot com
 Reported By:     oliver at burtchen dot com
 Status:          Open
 Type:            Bug
 Package:         Image_Graph
 PHP Version:     5.0.2
New Comment: 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!!! ;-) Previous Comments: ------------------------------------------------------------------------ [2004-11-26 02:19:14] 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-25 18:21:12] 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. ------------------------------------------------------------------------


« previous php.pear.dev (#34586) next »