How do I make image editing software?

I’m new to coding and I want to make image manipulation software, more specifically, digital painting, photo editing, layout, typography, and later on, animation. I don’t really know where to start. I’ve been using Photoshop, Illustrator, InDesign, and a little bit of After Effects and I’ve done some research into computer science and file types, and into the math behind image software (the short answer: a lot of subtraction, a lot of averages, and a lot of splines!) but I still haven’t written my first line of code for the project (I’m still very new to code as well but have an understanding of the logic of OOP, C++, HTML, CSS, JavaScript, etc.). I’ve been researching everything I’m asking for over a year and I’ve about had it with trying to find a broad general answer so I’m just going to ask what is probably a broader question than is typical for Stack Overflow. Please excuse the intrusion.

So first of all, how much code is out there already that I wouldn’t have to get from GNU or other CopyLeft sources? How expensive is it?

Second, is there any textbooks or online courses you would recommend? What math should I learn?

Third, how do you get permission to import and export things like PSDs and Word documents?

Finally, what timeline should I keep in mind? How long does this stuff take to make? I’m not trying to make Adobe level stuff. The software is supposed to be pretty basic, at least for the start.

Give me the 101!

Source: Windows Questions C++