Re: [PHP] Re: imagemagick and file size
The hard drive may be showing you the file's ALLOCATED size, which will be an even number. What does: ?php echo filesize('/path/to/new/file/');? give you? -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Ben-Nes Michael [EMAIL PROTECTED] To: Richard Lynch [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 3:03 AM Subject: Re: [PHP] Re: imagemagick and file size Hi Again Strange but same command to return the $data or to save it to the HD returned diffrent data length when the data returend to $data strlen($data) - output 4075 while the saved file is - 4252 Any one know why there is diffrence ? - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 2:01 AM Subject: [PHP] Re: imagemagick and file size function example() { $convert = cat $userfile | /usr/X11R6/bin/convert - $type:-; return `$convert`; } the returned binary value is uploaded to the DB. My main problem is that I don't know how to measure the decreased image size while its stored in the variable. Use http://php.net/strlen on your binary value. Use http://php.net/filesize on your input file. -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: imagemagick and file size
Yep, I know. I just wrote the function as a general description. thanks for the tip on strlen, thats what I need. - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 23, 2001 2:01 AM Subject: [PHP] Re: imagemagick and file size function example() { $convert = cat $userfile | /usr/X11R6/bin/convert - $type:-; return `$convert`; } the returned binary value is uploaded to the DB. My main problem is that I don't know how to measure the decreased image size while its stored in the variable. Use http://php.net/strlen on your binary value. Use http://php.net/filesize on your input file. Also, you either typed too fast, or you left out the global statement or something. The code as posted won't work, unless backtick operates in global space or something really weird... -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: imagemagick and file size
function example() { $convert = cat $userfile | /usr/X11R6/bin/convert - $type:-; return `$convert`; } the returned binary value is uploaded to the DB. My main problem is that I don't know how to measure the decreased image size while its stored in the variable. Use http://php.net/strlen on your binary value. Use http://php.net/filesize on your input file. Also, you either typed too fast, or you left out the global statement or something. The code as posted won't work, unless backtick operates in global space or something really weird... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]