Use output buffer:
ob_start();
ImageJPEG($im);
$imagestring=ob_get_contents();
ob_end_clean();
Oliver Witt wrote:
"1lt John W. Holmes" schrieb:
After calling to the function ImageCreateFromJPEG() and before outputing
the image with ImageJPEG, is there a way to determine the images size in
bytes?
I want to reduce the quality more and more until it has reached a
certain level.
Thanks,
Olli
You have the image data in a string, right? Could you relate the length of
that string to the resulting size of the file, somehow?
---John Holmes...
After calling the funtion ImageCreateFromJPEG like this:
$im = ImageCreateFromJPEG(pic.jpg);
then $im is not a string but a resource. I don't know how to get it into a
string....
Olli
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php