I believe that to use MODI the image must be in .tiff format or Microsoft's proprietary .modi format. According to your code, it looks like you are trying to convert a jpg.
Check this link for an example in VB.NET for converting TIFF to JPEG and vice versa.
http://code.msdn.microsoft.com/windowsdesktop/VBTiffImageConverter-f8fdfd7f