Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-10 Thread tedd
At 7:23 AM -0800 1/9/09, Brian Dunning wrote: I'm trying a stripped down test just to try to get this work. I have a valid jpeg on disk: -snip- Try this: http://webbytedd.com/b/thumb/index.php All the code is there -- and it works. Cheers, tedd -- --- http://sperling.com

[PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
I'm trying a stripped down test just to try to get this work. I have a valid jpeg on disk: 3.jpg- 3316x2220, 3.6 MB And am trying either of the following: // This does nothing at all imagejpeg('3.jpg'); // This displays failed $im = imagecreatefromjpeg('3.jpg'); if(!$im) echo 'failed';

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Zechim
try, header('Content-type: image/jpeg'); $image = imagecreatefromjpeg($your_file); imagejpeg($image,, 100); imagedestroy($image); zechim Brian Dunning escreveu: I'm trying a stripped down test just to try to get this work. I have a valid jpeg on disk: 3.jpg- 3316x2220, 3.6

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Brian Dunning
Same thing, no output at all. I can access the image directly in my browser and it's fine. On Jan 9, 2009, at 7:52 AM, Zechim wrote: try, header('Content-type: image/jpeg'); $image = imagecreatefromjpeg($your_file); imagejpeg($image,, 100); imagedestroy($image); zechim -- PHP

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread ceo
Do other images work? Open and re-save the image. Strip out comments and EXIF data while you are at it -- Some versions of GD had problems with EXIF/comments as I recall. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread ceo
The browser cheerfully rendering a badly-broken JPEG is quite common, if it can figure out what the JPEG was supposed to have been. (Think bad HTML and quirks mode.) So you really want to validate it with something more strict than a browser. -- PHP General Mailing List

Re: [PHP] imagejpeg, imagecreatefromjpeg both choke

2009-01-09 Thread Ashley Sheridan
On Fri, 2009-01-09 at 09:25 -0800, Brian Dunning wrote: Same thing, no output at all. I can access the image directly in my browser and it's fine. On Jan 9, 2009, at 7:52 AM, Zechim wrote: try, header('Content-type: image/jpeg'); $image = imagecreatefromjpeg($your_file);