On Thu, Apr 11, 2002 at 08:58:43PM +1000, Brian Havard wrote: > Well, actually, that's quite possible (I only just upgraded my GD library > to support JPEG). Inside the GD library (gd_jpeg.c:702 in GD 1.8.4) it > compares the return value of gdPutBuf() to the requested write size & > aborts if it doesn't match. This value is ultimately the return value of > php_apache_sapi_ub_write() which tells me that it should be returning the > number of bytes written. The call stack actually looks like this: > > [...] > empty_output_buffer > gdPutBuf > _php_image_output_putbuf > php_write > php_body_write > php_ub_body_write > php_ub_body_write_no_header > php_apache_sapi_ub_write > > When I change php_apache_sapi_ub_write() to return str_length instead of 0 > (after the new patch so str_length is the full write size) the JPEG is > written in full rather than just the first 4k.
Yes, after looking at other modules it appears you are correct and it was just broken before. I'll change it to return the number of consumed bytes. -aaron -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php