Thank you very much for your reply.
Yes, I know that this forum is just about Paint.Net, and I have found a topic which may be the same as mine:
but I can not find any solution in that post except that he finally can handle large images over 2GB after your tips (you said: I use either CreateDIBSection() or VirtualAlloc() to allocate the memory), and I'm using CreateDIBSection, too, but still have this 2GB limitation.
I've installed Paint.Net of version 3.5.8, and found that I can use it to create an image of 20000*28000 which is over 2GB, then I have an idea to post the quesion here.