The best way I have found to tell the gender difference is by the slope of the belly. Females have a more rounded belly while males do not. It's a bit hard to describe, but the male's belly slopes down from the breeding tube to the anal fin. The female's belly slopes up from the breeding tube to the anal fin. Also, the breeding tube of the females is larger and rounder while the male's is more pointed and smaller. I have seen a bit of variation among females though, so I use that as a secondary characteristic for sexing.
This method has worked for me so far (when looking at fish in person, its much harder in photos), but I should note that its much harder to tell even these differences apart in young fish.
Two roads diverged in a yellow wood, but thankfully they both led to fish stores.