Richard Kidder Meade Jr. (between Davis & Talbot) resigned his commission on May 1, 1861 and headed south so the photo wouldn't have come after Foster was promoted.
It wouldn't have come after Foster's promotion
to brigadier in October, 1861. But would they really have jumped him
four ranks, from captain all the way to brigadier, in one swell foop? Perhaps, but officers with ranks as low as major wore double breasted frock coats.
Major Robert Anderson, seated two persons to Foster's right (i.e., the viewer's left), was promoted to Brigadier on May 15, 1861. But in the picture, his frock coat is that of a field officer, not a brigadier, which would have had the buttons arranged in four pairs on each side, rather than being evenly spaced. This fact agrees with your information about Meade. So I think we can establish that the photo was taken before May 1, 1861. This strengthens the possibility that Foster might have received a more immediate promotion, to major or some grade of colonel, before that photo was taken.
Aha! A few mouse clicks have turned up the following, from:
http://www.ohiocivilwarcentral.com/entry.php?rec=1294
"The beginning of the Civil War found Foster engaged in strengthening the fortifications in Charleston Harbor. Anticipating a Confederate assault, Foster participated in transporting the Federal garrison at Fort Moultrie to the more defensible Fort Sumter on December 26, 1860.
For his leadership during the transfer, Foster was brevetted to major, effective December 26, 1860. When hostilities eventually erupted, Foster served throughout the bombardment of Fort Sumter from April 12 through April 14, 1861."
The photo corroborates that some time before May, 1861, Foster held a rank above captain but below brigadier - and was presumably, a major.