[wdvltalk] Re: php image size
Quoting Steve Miller [EMAIL PROTECTED]: I have been trying to upload gifs and jpgs, determine their width/height, and display them. I am using $size=GetImageSize($broker_logo); $logo_w=$size[0]; $logo_h=$size[1]; and storing in a database, but am getting wrong values which distort the image (usually width too small). http://www.php.net/getimagesize says that if you use $size[3], it will output the height=yyy width=xxx that can be used directly into an image tag. Maybe it's worth storing the [3] instead of [0] and [1]? HTH, Matt The WDVL Discussion List from WDVL.COM To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: set WDVLTALK pw=yourpassword in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub http://www.wdvl.com ___ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
[wdvltalk] Re: php image size
Hi Matt. Was thinking of that, but I am storing H and W now, and would have to alter the db tables...but might be worth it! steve From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Tue, 18 Nov 2003 16:46:43 + To: [EMAIL PROTECTED] Subject: [wdvltalk] Re: php image size Quoting Steve Miller [EMAIL PROTECTED]: I have been trying to upload gifs and jpgs, determine their width/height, and display them. I am using $size=GetImageSize($broker_logo); $logo_w=$size[0]; $logo_h=$size[1]; and storing in a database, but am getting wrong values which distort the image (usually width too small). http://www.php.net/getimagesize says that if you use $size[3], it will output the height=yyy width=xxx that can be used directly into an image tag. Maybe it's worth storing the [3] instead of [0] and [1]? HTH, Matt The WDVL Discussion List from WDVL.COM To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: set WDVLTALK pw=yourpassword in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub http://www.wdvl.com ___ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
[wdvltalk] Re: php image size
Quoting Steve Miller [EMAIL PROTECTED]: Hi Matt. Was thinking of that, but I am storing H and W now, and would have to alter the db tables...but might be worth it! Steve, The only other thing I can think of would be to check your code and make sure that you're not writing the height variable into the widt was well as the height. Apart from that, I'm stumped! :D Matt The WDVL Discussion List from WDVL.COM To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: set WDVLTALK pw=yourpassword in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub http://www.wdvl.com ___ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
[wdvltalk] Re: php image size
Steve Miller wrote: Actually, I already made (and corrected) that mistake! Must be something obvious, but I don't see it. Last gif I uploaded was w=242 h=50 but what was stored in the db was w=127 h=50 ??? steve What's the datatype for the width column? Some datatypes will only store up to 127 -- By-Tor.com It's all about the Rush http://www.by-tor.com The WDVL Discussion List from WDVL.COM To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: set WDVLTALK pw=yourpassword in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub http://www.wdvl.com ___ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
[wdvltalk] Re: php image size
Jon Haworth wrote: Hi Steve, [...] storing in a database, but am getting wrong values which distort the image (usually width too small). Check which column type you're using in your database - if it's a tinyint in MySQL, for example, anything over 127 won't be stored correctly (unsigned smallint is limited to 65535 and would probably be a better bet). Cheers Jon Beat me to it. ;) -- By-Tor.com It's all about the Rush http://www.by-tor.com The WDVL Discussion List from WDVL.COM To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To set a personal password send an email to [EMAIL PROTECTED] with the words: set WDVLTALK pw=yourpassword in the body of the email. To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub http://www.wdvl.com ___ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]