How knowledgable are you with scripting? You are wanting to look at Gdip and GdipGetImageThumbnail which will allow you to resize the image in memory to be saved.
Try out some code because for us to just give you the code you will never learn.
Here are a good chunk of the functions you will need to complete such a task (in no particular order):
- GdiplusStartup
- GdiplusShutdown
- GdipLoadImageFromFile
- GdipCreateBitmapFromHBITMAP
- GdipGetImageThumbnail
- GdipCreateHBITMAPFromBitmap
- CLSIDFromString
- CLSIDFromString
- GdipSaveImageToFile
- DeleteObject
Best of luck!