Jump to content

Recommended Posts

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?

 

 

Link to comment
https://forums.phpfreaks.com/topic/62349-php-imge-resizing-without-using-gd/
Share on other sites

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?

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)!

  • 1 month later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.