It seems like php_handle_jpeg() called by getimagetype() is always
returning null.  Here is a trace:

937             itype = php_getimagetype(stream, NULL TSRMLS_CC);
938             switch( itype) {

itype is 2 at this point (2 = jpeg)

943                             if (info) {
946                                     result = php_handle_jpeg(stream, NULL 
TSRMLS_CC);

Breakpoint 2, php_handle_jpeg (stream=0x83ff99c, info=0x0) at 
/home/rasmus/php4/ext/standard/image.c:479
479             struct gfxinfo *result = NULL;
480             unsigned int marker = M_PSEUDO;
481             unsigned short length, ff_read=1;
484                     marker = php_next_marker(stream, marker, 1, ff_read TSRMLS_CC);
485                     ff_read = 0;
486                     switch (marker) {
534                                     if (info) {
537                                             php_skip_variable(stream TSRMLS_CC);
539                                     break;
484                     marker = php_next_marker(stream, marker, 1, ff_read TSRMLS_CC);
485                     ff_read = 0;
486                     switch (marker) {
543                                     return result;  /* we're about to hit image 
data, or are at EOF. stop processing. */
0x0815e7ec      553     }

So result is never filled in as it doesn't think we hit any markers.  Yet
a "file foo.jpg" returns:

  foo.jpg: JPEG image data, JFIF standard 1.02, resolution (DPI), 72 x 72

I have tried it with a number of different jpegs.  My libjpeg is:

        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40557000)

Can someone recreate this in current CVS HEAD?

-Rasmus


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to