Imation Corp.’s earnings rose in the fourth quarter despite a revenue decline linked to aging consumer electronics products.

The news sent Imation’s stock up 14.6 percent, or 63 cents, to $4.96 on Friday.

Adjusted earnings at the Oakdale-based electronics firm rose to 25 cents a share in the fourth quarter after a loss of 16 cents a year ago. Net earnings rose to 41 cents a share from a year-ago loss of $8.34.

Revenue declined 12.7 percent to $232.8 million, though that was above the $224 million forecast by the two analysts who follow the company.

Imation’s rising storage and security sales have not yet made up for declines in its older consumer optical-storage disk business, CEO Mark Lucas said in a statement.

The company also “benefited from lower-than-anticipated revenue declines in our legacy [consumer] business, solid working capital and cost management, and several one-time gains,” Lucas said.

While the consumer business is not expected to return to revenue growth anytime soon, “it is expected to continue to be an important contributor of earnings and cash flow,” Lucas said.

The company saw a one-time gain of $9.8 million from the sale of land at a previously closed facility and a $9.5 million gain from a favorable French court ruling on copyright issues.

Imation ended 2013 “with some of our lowest inventories ever and $132.6 million in cash,” which will fund the company’s continued restructuring, Lucas said.