hi guys! I have a question.I have an image upload source (all types jpg, gif,bmp) wich i want to put a function that generate on the fly the image size and copythe image in a folder. Anyone knows how i can do that? 😃
There is a standard php function for finding the image size:
http://www.php.net/manual/en/function.getimagesize.php
I've never actually tried to move an image but I guess you will have to open the file as a byte stream and feed that in to a new file with the same extension. You must mind that you can set the permission on the folders on your webserver so you can write files to it. On Linux/Unix this is usually not a problem.
Yep; use [man]getimagesize[/man] and either [man]move_uploaded_file[/man] or just [man]copy[/man]
tnx guys i get the image size but i have another problem how i can change width and height and copy the image to another folder?
Er... I supplied you a couple of URLs.... it's not that difficult to find that information if you follow them and have a read what's there...