Leading image-sensor maker OmniVision (Nasdaq: OVTI), whose fortunes soared with those of Apple, is coming to terms with reality as it posted a fall in second-quarter earnings. And the fact that the company lowered its third-quarter outlook did not do a great deal for investor confidence.

I think the big question now is, will OmniVision outrun its rivals in the long term? Let us a take a Foolish look to find out.

What the numbers say
OmniVision's revenues went southward by 9%, coming in at $217.9 million for the second quarter as compared to $239.5 million in the year-ago quarter, as a result of fewer orders for some projects and increased competition in its areas of expertise.

While obviously a cut-down in orders placed meant lower sales, it led to a more worrying inventory pile-up. OmniVision's second-quarter inventories rose to $250.6 million from $143.8 million in the first quarter, a jaw-dropping 74.3% increase. So, has the company already lost some very important customers from its portfolio that it's not revealing at this moment? Now, that's a scary thought!

And in a chain reaction, shrinking orders meant that the company's net income also went down to $21.1 million from $28.9 million in the year-ago period.

The smartphone factor
The main line of business that OmniVision is in -- developing image sensors for mobile devices -- means that the stunning pickup in sales of smartphones, laptops, and now tablets has left the company laughing all the way to the bank over the past few years. Business reached a new high, courtesy of its association with Apple, whose iPhone was one of the most revolutionary products in its category.

Then came the bad news when it was discovered that the new iPhone 4S had image sensors provided by rival Sony (NYSE: SNE) as well. Sony has proven to be a major competitor in the realm of this technology, as it has realized the benefits of latching onto soaring smartphone demand.

The Foolish bottom line
Even with the company's $100 million share buyback program to create shareholder value, I still feel it's a temporary shot in the arm. OmniVision should realize that it is losing customers to rivals such as Sony in an area where constant technological upgrade is the key factor for dominance. That and effective supply-chain management to lower rising inventories are the challenges the company has to cope with. While I'm not writing it off completely, Fools would do well to adopt a watch-and-wait approach for now.

In the meantime, The Motley Fool can help you keep track of this company for the latest news and analysis. All you need to do is add it to your watchlist; it's free.