More refactoring. Add shrinkImage func in convSource