Are you using exact same algorithm as GIMP ?