I think it is more tradition than a specific command. I certainly don't remember Allah saying anything about it in the Book.
http://www.usc.edu/schools/college/crcc/engagement/resources/texts/muslim/hadith/bukhari/093.sbt.htmlVolume 9, Book 93, Number 647: Narrated Ibn 'Umar:
The Prophet said, "The painters of these pictures will be punished on the Day of Resurrection, and it will be said to them, 'Make alive what you have created."
Volume 9, Book 93, Number 648: Narrated Abu Huraira:
I heard the Prophet saying, "Allah said, 'Who are most unjust than those who try to create something like My creation? I challenge them to create even a smallest ant, a wheat grain or a barley grain.' "
http://www.usc.edu/schools/college/crcc/engagement/resources/texts/muslim/hadith/muslim/024.smt.htmlBook 024, Number 5270:
'Abdullah reported Allah's Messenger (may peace be upon him) as saying: Verity the most grievously tormented people on the Day of Resurrection would be the painters of pictures. Ashajj (one of the narrators) in the hadith narrated by him did not make mention of the word" verity".
Book 024, Number 5271: This haditli has been reported on the authority of Abu Mu'awiya through another chain of tranmitters (and the words are):" Verity, the most grievously tormented people amongest the denizens of Hall on the Day of Resurrection would be the painters of pictures. The rest of the hadith is the same.
Book 024, Number 5272: Muslim b. Subaih reported: I was with Masriuq in the house which had the portrayals of Mary (hadrat Maryan). Thereupon Masriuq said: These are portraits of Kisra. I said: No, these are of Mary. Masruq said: I heard Abdullah b, Mas'ud as saying Allah's Messenger (may peace be upon him) had said: The most grievously tormented people on the Day of Resurrection would be the painters of pictures. (Muslim said): I read this before Nasr b. 'Ali at-Jahdami and he read it before other narrators, the last one being Ibn Sa'id b Abl at Hasan that a person came to Ibn 'Abbas and said: I am the person who paints pictures; give me a religious verdict about them. He (Ibn 'Abbas) said to him: Come near me (still further). He came near him so much so that he placed his hand upon his head and said: I am going to narrate to yor what I heard from Allah's Messenger (may peace be upon him). I heard him say: All the painters who make pictures would be in the fire of Hell. The soul will be breathed in every picture prepared by him and it shall punish him in the Hell, and he (Ibn 'Abbas) said: If you have to do it at all, then paint the pictures of trees and lifeless things; and Nasr b. 'Ali confirmed it.
Book 024, Number 5273: Anas b. Malik said: I was sitting with Ibn Ahbas when he gave religious verdicts but he did not say that it was Allah's Messenger (may peace be upon him) who had said that. However when a man said to him (Ibn 'Abbas): I am the painter of these pictures. Ibn 'Abbas said: I heard Allah's Messenger (may peace be upon him) as saying: He who painted pictures in the world would be compelled to breathe soal in them on the Day of Resurrection, but he would not be able to breathe soul (in them).