It was definitely a war crime. How can anyone honestly argue that detonating an atomic bomb over a city filled with civilians (twice!), condemning many of them to a slow agonizing death as their badly irradiated flesh dripped from their bones, was a justified act and not a war crime? How can deliberately killing tens of thousands of civilians not be a war crime? There is no justification for this.
Had this act been done by Hitler or any other country at war with the US it would most certainly be called a heinous war crime. But when the US does horrible things in war while fighting the "bad guys" their horrible actions is given special treatment.
A bomb could have been detonated over an uninhabited nearby atol to demonstrate to the Japanese that they were out-gunned and needed to surrender. The war was already winding down. I don't buy the explanation that it saved more lives by cutting the war short.
Had the bombs not been dropped, the war would not have continued for much longer anyway. Also, in conventional war the lives lost are mostly soldiers who go out to fight knowing the risk to their lives. It would have been mostly soldiers who would have died had the war been allowed to run out its last few days and not the tens of thousands of innocent civilians that were killed by the atomic bombs. There is a difference between killing soldiers and killing civilians.
I think the motive for dropping the bombs were more about testing their capability and effects than about ending the war.