Shutterfly said it agreed to buy privately held card design company Tiny Prints in a $333 million cash-and-stock deal, as the photo-sharing service tries to win back customers in a market increasingly dominated by social networking sites like Facebook.

People have been flocking to popular social networking sites to share images with friends and family, prompting established players such as Flickr, Snapfish, Photobucket, Shutterfly and Picasa to expand their offerings into prints and personalized services.

Tiny Prints has a strong following. It is very well integrated into Facebook ... that will help Shutterfly penetrate into the social media platform, Sidoti & Co analyst James Cakmak said.

The deal comes at a time when greeting cards business is increasingly going online, and Shutterfly is all set to pick up customers from photo printing rival PhotoWorks, which is being shut down by owner American Greetings Corp .

(PhotoWorks) will add to Shutterfly's market share. And when you now bring Tiny Prints too, it makes the company more formidable, Cakmak said.

Shutterfly said the Tiny Prints deal would help it to penetrate the $12 billion market for social expression products such as greeting cards and wedding announcements.

Less than 5 percent of this market is currently being transacted online. We believe that with today's announcement, we can significantly increase that percentage, Chief Executive Jeffrey Housenbold said on a conference call with analysts.

Tiny Prints will accelerate Shutterfly's cards and stationery revenue to above $210 million in calendar 2011, Housenbold said.

Shutterfly's had reported revenue of $307.7 million for full-year 2010.

Redwood City, California-based Shutterfly said it would acquire all of the outstanding stock of Tiny Prints Inc in exchange for about $141 million in cash and about 3.9 million shares of Shutterfly common stock.

Sunnyvale, California-based Tiny Prints operates tinyprints.com and weddingpaperdivas.com, two ecommerce brands offering cards, invitations, personalized stationery and photo books.

Evercore Partners was the financial adviser to Shutterfly in the deal.

Shares of Shutterfly, which gained 19 percent of their value in the last three months, closed at $43.03 Monday on Nasdaq.

(Reporting by Bijoy Koyitty in Bangalore; Editing by Vyas Mohan)