The majority of scholars say that it is permissible to make pictures of inanimate objects such as trees, buildings, etc, and they quote several texts as evidence for that. Ibn ‘Abbaas (may Allaah be pleased with him) issued a fatwa regarding this:
Volume 3, Book 34, Number 428 :
Narrated by Said bin Abu Al-Hasan
While I was with Ibn ‘Abbas (radiallaahu `anhu) a man came and said, “O father of ‘Abbas! My sustenance is from my manual profession and I make these pictures.” Ibn ‘Abbas (radiallaahu `anhu) said, “I will tell you only what I heard from Allah’s Apostle (sallallaahu `alayhi wasallam). I heard him saying, ‘Whoever makes a picture will be punished by Allah till he puts life in it, and he will never be able to put life in it.‘ ” Hearing this, that man heaved a sigh and his face turned pale. Ibn ‘Abbas (radiallaahu `anhu) said to him, “What a pity! If you insist on making pictures I advise you to make pictures of trees and any other inanimate objects.”
This hadith indicates that the punishment has to do with images of animate beings, because the Prophet (peace and blessings of Allaah be upon him) said that they will be told, “Bring to life that which you have created!”
Read more on it here.
Hadith no. 1812 (below) is a repeat. Read it here.
Volume 3, Book 34, Number 317:
Narrated ‘Abdullah bin Umar (radiallaahu `anhu):
Once the Prophet (sallallaahu `alayhi wasallam) sent to ‘Umar (radiallaahu `anhu) a silken two-piece garment, and when he saw ‘Umar (radiallaahu `anhu) wearing it, he said to him, “I have not sent it to you to wear. It is worn by him who has no share in the Hereafter, and I have sent it to you so that you could benefit by it (i.e. sell it).”
Volume 3, Book 34, Number 318:
Narrated Aisha (radiallaahu `anhaa):
(mother of the faithful believers) I bought a cushion with pictures on it. When Allah’s Apostle (sallallaahu `alayhi wasallam) saw it, he kept standing at the door and did not enter the house. I noticed the sign of disgust on his face, so I said, “O Allah’s Apostle (sallallaahu `alayhi wasallam)! I repent to Allah and His Apostle (sallallaahu `alayhi wasallam). (Please let me know) what sin I have done.” Allah’s Apostle (sallallaahu `alayhi wasallam) said, “What about this cushion?” I replied, “I bought it for you to sit and recline on.” Allah’s Apostle (sallallaahu `alayhi wasallam) said, “The painters (i.e. owners) of these pictures will be punished on the Day of Resurrection. It will be said to them, ‘Put life in what you have created (i.e. painted).’ ” The Prophet (sallallaahu `alayhi wasallam) added, “The angels do not enter a house where there are pictures.”
It is clear that image-making is one of the blameworthy actions of the jaahiliyyah which Islam came to oppose. It is well established from clear, saheeh mutawaatir ahaadeeth that it is not allowed, and that the one who does this is cursed and is warned of torment in Hell.
This applies to all images of animate created beings, humans and others. There is no difference between three-dimensional and other images, whether they were taken with cameras or produced by painting, engraving or other methods, because of the general meaning of the ahaadeeth.
But if the image is originally incomplete, such as a head-and-shoulders picture, etc., and there is removed from the picture that without which is could not live, then it may be understood from the comments of many of the fuqahaa’ that this is permissible, especially if there is a need for such partial pictures. Whatever the case, one has to fear Allaah as much as one can, and avoid that which Allaah and His Messenger have forbidden.
“And whosoever fears Allaah and keeps his duty to Him, He will make a way for him to get out (from every difficulty). And He will provide him from (sources) he never could imagine.” [al-Talaaq 65:2-3 – interpretation of the meaning]
[Taken from IslamQA]
Also read: Pictures that Lead to Shirk