Robert Gibb RSA (28 October 1845 – 11 February 1932) was a Scottish painter who was Keeper of the National Gallery of Scotland from 1895 to 1907 and was Painter and Limner to the King from 1908 until his death. He built his reputation on romantic, historical and particularly military paintings but was also a significant portrait artist.Gibb was born in Lauriston, the son of a builder, he studied art at evening classes at the Board of Manufacturers in Edinburgh and at the life school of the Royal Scottish Academy, and began exhibiting at the RSA in 1867 showing an Arran landscape; this would be the first of no fewer than 143 paintings exhibited at the academy. By the end of the next decade he had begun to establish his reputation as a painter of battles. Following Comrades, his first foray into the military genre, he was elected an Associate of the Royal Scottish Academy. The theme of this painting, a group of three soldiers, one of whom has fallen in the snow, was taken from his painting showing the retreat from Moscow which was shown the following year. He was made a full member following the enormous success of his 1881 painting The Thin Red Line which was inspired by his reading of Alexander Kinglake's book The Invasion of the Crimea. Three years later came Schoolmates depicting two highland officers in the heat of battle, one falling wounded into the arms of the other. He continued painting military scenes throughout the Great War, and his last military painting Backs to the Wall appeared in 1929.Gibb was also sought after also as a portrait painter and among his subjects were Henry M. Stanley, the African explorer, the Rev. Joseph Parker, D.D., Sir Arthur Halkett, Bart., and the artist's wife, the former Margaret Shennan, second daughter of the Lord Dean of the Guild, whom he married in 1885.The artist died at his residence in Bruntsfield Crescent, Edinburgh in 1932, and he was given a full military funeral with honour guard at his funeral in Warriston Cemetery in Edinburgh on February 15.