The following Attila Pergel wrote. Feel free to use...

c++ function
This procedure resizes the image proportionally. The ratio of image width is adjusted.
Boolean JpegResizeWithScale(const UnicodeString SrcFileNamem, const UnicodeString DestFileName,int NewWidth);
SrcFileNamem: Souce file name
DestFileName: Destenation file name
NewWidth: New file width size
Boolean : if it succeeds in scaling the result is true otherwise false