ID: 35265 Updated by: [EMAIL PROTECTED] Reported By: hyperila at hotmail dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: windows xp PHP Version: 5.0.5 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Try to read imagejpeg() docs? http://php.net/imagejpeg Previous Comments: ------------------------------------------------------------------------ [2005-11-17 17:05:19] hyperila at hotmail dot com Description: ------------ Hi i have started using imagejpeg function from GD. However, when i produce the following code: <see below> It did not give save and overwrite my working image to a new image with a new size. please help me in this. Thanks Reproduce code: --------------- <?php // The file $filename = 'wew.jpg'; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width, $height) = getimagesize($filename); $new_width = 10; $new_height = 10; // Resample $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); // Output imagejpeg($image_p); ?> Expected result: ---------------- I expected to see my file : "wew.jpg" to be of size 10 x 10 pixels. I realised that after trying my script for many times, i managed to get the file overwritten. It became a file of the same filename but of a new assigned size (10 x 10). Please help as i don't seem to make it work again. Actual result: -------------- Actual result is that the browser did show me the small (10x10) picture but the real wew.jpeg is still untouched. I want it to be affected by the php code. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35265&edit=1