You think bmp is ok It's enough to have more channels than needed
And maybe the mistake is in something completely different. We can't know until you leave the details of everything

Be precise, concise and detailed in the future, otherwise such posts are deleted without warning
Besides, you missed the section - explanation of how to work with files is elsewhere, this topic is not for that