Add missing size checking code for JPEG.
Add missing size checking code for PSD.
Use /MT.