How can I transform an image while maintaining its original size by cutting off some areas, and filling others (preferably with a specifiable background color), using Imagemagick on the windows command line:
Here is the basic idea.
Note: Please be sure the method is lossless if possible (besides the limitations of reading and writing from lossy formats).