Rather than using -resize and +profile you can use -thumbnail instead whcih does both and more.
In my own case I needed to resize my own avartar image for the forum (just yeasterday) and this was the line I used...
convert avatar.gif -trim +repage \
-bordercolor white -border 2 \
-thumbnail 60x60 -gravity center -extent 60x60 \
avatar_60x60.png
This uses trim to remove extra space, add a little space, resize (thumbnail) the image, then pad to exactly 60x60 pixels.
For more details of this see ImageMagick Examples, Thumbnails, Padding
http://www.imagemagick.org/Usage/thumbnails/#pad
Lots of other information is also present too, so enjoy! 
WARNING: In newer Imagemagicks. -size is no longer used as a coder hint. This was removed as it was confusing, as -size is more commonly used to specify the size of internally generated images, such as canvases and gradients.
The hint for the JPEG library (the only one that takes a size hint) is now -define jpeg:size={w}x{h} But remember this is only a hint as to the final size of the image, the actual image read in will be up to twice this size (but always larger), as such a resize is still needed. Its real use is more for saving memory when reading in LOTS of large images.
Note also that the size hint only sizes the JPEG by column and row removal, as such it use better to use a hint that is twice the size of the final image, so you can use a proper filtered image resize, rather than a sampled resize the hint provides. But for heavy shrinking of images it is still a very useful 'hint' to use.
For details see...
Profiles, Stripping, and JPEG Handling
http://www.imagemagick.org/Usage/thumbnails/#profiles
and Controls for Reading JPEG images
http://www.imagemagick.org/Usage/formats/#jpg_read
PS: I am the webmaster and maintainer for ImageMagick Examples 
Last edited by anthony (2011-09-24 10:37:55)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/