Reply to imagejpeg() changes with in the new php

imagejpeg() changes with in the new php new!
by burak, 11 years, 11 months ago
PHP 5.4.1 (cli) (built: May 1 2012 10:10:18)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies



when we need to send the output to the browser straight, we need to use NULL instead of an empty string ''

From documentation:
filename
The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.
To skip this argument in order to provide the quality parameter, use NULL.


$result = @imagejpeg($image_dst, '', $this->jpeg_quality);

and some others - replace with
$result = @imagejpeg($image_dst, NULL, $this->jpeg_quality);

hope this will solve the issues some might be facing now.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important