The answer to about each phrase of your question can easily take tens of pages, most of which likely will be wasted.
For example:
- why do you want to write one? Learning experience, or do you think you can add a feature the competition doesn’t have? If so, what feature? That might affect architecture.
- target platform? Web browser, Windows 1.0, Raspberry Pi, Commodore 64, Altair? (On small systems, undo info may have to reside on disk, if you can afford it at all)
- target OS? Linux, Windows, Mac, Amiga, raw metal on a FPGA…
- “think pixels”: are you thinking about multi-megapixel or even gigapixel photos, icons for a modern OS, 32×32 monochrome Mac icons, MRI images…