You probably should not be supplying both the height and width for the thumb size. Unless all your images are the same dimensions, that will not work. (And since you have some that are portrait and some that presumbaly are landscape, they will NOT be the same dimensions.)
Do you want your thumbnails to all be landscape? If so just set the height variable to NULL.