how to resize image programatically with theme image
You need to use theme_image_style() for that one:

$image = theme('image_style', array(
  'style_name'=&gt; 'small', 
  'path' =&gt; $file-&gt;uri, 
  'alt' =&gt; 'user picture'
));