Richzilla Posted July 29, 2007 Share Posted July 29, 2007 Hey all, I'm uisng PHP to upload image files to my site through a form. The filename is added to my database so i can refference the image. I now need to be able to keep this file and also resize it to a uniform size. I have been looking around for hours trying to find a script that works, but no luck yet. I don't have access to my server so I can't install GD. I can see that there are other tools in PHP that allows me to do what I want to do. Anyone got any good scripts that I can use please? Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/ Share on other sites More sharing options...
AndyB Posted July 29, 2007 Share Posted July 29, 2007 If you don't have GD it's probably because your host has a tragically old version of php installed. Apart from GD (and its functions) only ImageMagick can resize images as far as I know. Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310270 Share on other sites More sharing options...
cooldude832 Posted July 29, 2007 Share Posted July 29, 2007 Let me explain why you can't (logically not with php) In order to "resize" you need some starting "size" to work off of. Otherwise you can not apply scalar multiplication to the image to "resize" because it will be in the form of s = a scalar value s(WxH) where WxH are arbitrary unknown variable values for width and height. This in turn results a net infinite number of possibilities because WxH are assumed to be real numbers with limits of 0 and infinity. Make sense? Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310272 Share on other sites More sharing options...
Richzilla Posted July 29, 2007 Author Share Posted July 29, 2007 I have MySql version 5.0 How do i find out if GD has been installed? Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310275 Share on other sites More sharing options...
cooldude832 Posted July 29, 2007 Share Posted July 29, 2007 <?php phpinfo(); ?> send us a link to this page and we can help you see what you have Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310277 Share on other sites More sharing options...
Richzilla Posted July 29, 2007 Author Share Posted July 29, 2007 http://www.jungletekno.co.uk/phpinfo.php Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310279 Share on other sites More sharing options...
zq29 Posted July 29, 2007 Share Posted July 29, 2007 Let me explain why you can't (logically not with php) In order to "resize" you need some starting "size" to work off of. Otherwise you can not apply scalar multiplication to the image to "resize" because it will be in the form of s = a scalar value s(WxH) where WxH are arbitrary unknown variable values for width and height. This in turn results a net infinite number of possibilities because WxH are assumed to be real numbers with limits of 0 and infinity. Make sense? The GDLib offers functions for retrieving the dimensions of an image, or have I missed what you're saying? Also, to resize something, you do not need to know its original dimensions as it is not a relative calculation. To rescale is something different. If I am totaly off the mark, please educate me (crap at maths here)! Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310280 Share on other sites More sharing options...
AndyB Posted July 29, 2007 Share Posted July 29, 2007 Yes, you have GD installed. http://phparadise.de/php-code/image-handling/image-upload-and-resize/ will allow you to resize images without any trouble (and save to a write-enabled folder) Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310282 Share on other sites More sharing options...
Richzilla Posted July 29, 2007 Author Share Posted July 29, 2007 I do have GSD installed after all!! SO the questions is what's the best way to resize my images? ANy good sites with tutorials? Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310283 Share on other sites More sharing options...
AndyB Posted July 29, 2007 Share Posted July 29, 2007 Read my post Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310284 Share on other sites More sharing options...
cooldude832 Posted July 29, 2007 Share Posted July 29, 2007 I was explaining it in a mathmatical idea where you can't resize a number if you don't have an inital value it be like saying final size = scale(width x height) 3 variables in 1 equation doesn't work. Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-310285 Share on other sites More sharing options...
448191 Posted September 21, 2007 Share Posted September 21, 2007 Make sense? No. Quote Link to comment https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/#findComment-352651 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.