Apple Inc. has often displayed uncanny timing with its well-orchestrated end-of-year iPhone releases. But the leak of racy celebrity photos in the past few days put the company in the unusual position of having to mend its image just days before a highly anticipated product launch next Tuesday.