i have got same issue and the problem is Graphic card. The solution have simple if u have a little electronic skills. teardown imac and remove the graphic card. and also remove gpu coller. your graphic card must be like this [http://zive.v.mfstatic.cz/GetThumbNail.aspx?id_file=329388545&width=500&height=5000&q=100|picture of gpu] after that u must be very carefull this proses. first u clean gently with alcohol and toothbrush. after that u bake in oven like this [https://www.youtube.com/watch?v=Xvdcq6WbX1g|video] after that your graphic card work.
this solution is riskly and get your own risk.
your gpu has died also, maybe u can take it life back again