Jump to content

Recommended Posts

Dear Friends,

 

I src a jpg file, I noted it gets distored, there are not many paramerters to play.

So I conclude, if the image width and height does not equal to src width and height, the image will be bad. Am I right?

 

If so how can i get arround, because it is sick to walk at pixel level. :'(

Link to comment
https://forums.phpfreaks.com/topic/53830-solved-disrorted-image/
Share on other sites

If you distort an image (by setting width or height to incorrect values or an incorrect ratio) then yes it gets distorted. What else would you expect??? That's it. There's no way around it.

 

Quite what 'walk at the pixel level' means beats me.

 

I wonder if getimagesize() has anything to do with a solution - if that's what you need.

ha ha ha ha, you are funny, really I am laughing  :D  :D, I was typing fast earlier, also had a bit more serious thing in my mind while typing this issue.

 

Later I noted, if the proportion ratio is maintained thing are slightly ok, but i am doing an image upload from clients, they have all sort of sizes, yes i can mention i only accept this size, ya by the way can i get the width and height of an image, that way i can force the client to crop to my size, may be your getimagesize() will help me

getimagesize() wil give you the width and height of any image.

You could use it in whatever upload form you have for clients to check that the image is a ertain size..

or you could use it wherever you display the image and set the images width and height to whatever it actually is, instead of having to guess

Dear Dragen,

 

I tried it is not giving me a value,

 

I use this to validate a potential upload file size $_FILES["file"]["size"],

 

I want to validate width & height how can I,

 

I tried getimagesize(["file"]), it is not working, I am unsure how can a function retuen 2 values?

 

error I got

"

Warning: getimagesize(Array) [function.getimagesize]: failed to open stream: No such file or directory

"

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.