two things come to mind here
1) Why are yiu storing the image in the db? Just a question / i never store the images in a db it makes db management/ backup a nightmare
Anyway back to the question you asked.
You can do one of the following
a) use the gd library and its functions to do the resizing
or
b) Simply use html to specifiy the height / width of the image to the size that you want.
HTH
GM