Canvas to png or jpeg done right.