fixed image resizing bug (aspect ratio was always preserved); added the --extend option.