Re: imagejpeg() output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 15 Jan 2005 08:39:16 -0800, Steven Simmons <low@xxxxxxxxxxxxxxxx> wrote:
> I'm trying to write an object oriented system for saving my uploaded
> files to a blog.
> 
> I am using php to resize the original photos and save a thumbnail .
> 
> When I get all done, I want to do something like this:
> 
>        $tempImageData = imagejpeg( $imageResource, '', 75 );
>        $outputHandler -> save ( $tempImageData );
> 
> Where the $outputHandler is an object that knows how/where to save the file.
> However, I've noticed that imagejpeg() only returns a number 1.
> 
> This worked on my previous server, but I'm guessing my new server has a
> newer version of php.
> 
> What am I doing wrong? How can i pass the raw jpeg data to a function?

To resize the image you have to create a new image handler to write
the new jpeg data to.  You can create that image handler with
imagecreatetruecolor() for example.

imagejpeg() is for outputting the data to the browser.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux