Waifu2x is an open-source tool that can significantly enlarge an image to double its size quickly. If you want, you can sneak into its code and see how it works.
Waifu2X
Waifu2x is an online photo enhancer and image upscaler tool that enlarges images without losing quality. Also, get image noise reduction technology.