Gilbert Stuart is known for his portraits, especially of prominent American figures. He is most famous for his portraits of George Washington. If you are referring to a specific painting of Commodore Thomas Macdonough, it would be a formal image of a soldier, as Stuart often portrayed his subjects in a dignified and formal manner, highlighting their status and character.
So, in the context of your question, the correct answer would be a formal image of a soldier.