Do you know how to resize the image, irrespective of the uploading part?
If yes, then where are you facing the problem of doing it before/after upload?
If no, then i feel you can get the answer by googling or in this post
Example: i am able to upload the image let think of the size passport into thumb folder and i want to resize the same image to stamp size and want to save into another folder ..