Thank you very much for your help on this issue. Working great now.
I do have another question. I seem to be getting a lot of distortion on my images even if I'm using contrain proportions. Do you know what could be causing that.
Example: the uploaded image is 1000 x 1000 pix and I resize to about 500 x 500 and it distorts the lines. Is there anything that could improve the quality?