DreamWorks Animation SKG Inc. on Tuesday reported it generated a profit in its most recent quarter, although Wall Street had expected a loss.

The Glendale animation studio reported net income of $5.6 million (7 cents a share) on revenue of $135 million for the quarter ended March 31. Analysts forecasted a loss of 3 cents a share.

It was a reversal of fortune for DreamWorks, which in its previous quarter lost $82.7 million dollars and subsequently laid off 350 employees.

The biggest share of revenue came from sales and licensing content from the studio’s library.

DreamWorks’ most recent movie, “The Croods,” was released to theaters just a week prior to the close of the quarter and generated only $4 million towards the quarter, although it’s a box office hit.

Chief Executive Jeffrey Katzenberg was optimistic about the studio’s prospects. It will release its next movie, “Turbo,” about a racing snail, in July.

“This year is off to an outstanding start,” he said in a statement. “The Croods has reached a blockbuster level of nearly $480 million at the worldwide box office and is well on its way to becoming the number one movie released during the first four months of 2013.”