The order was made by Judge Jose Maria Vazquez Honrubia of the National Court after a brief trial attended by the two suspects, who work for satirical magazine El Jueves, which has a circulation of 70,000.
The drawing appeared on the magazine's front page in July. At the time, a judge ordered it confiscated from newsstands on the grounds that it insulted the Spanish royal family.
The vignette depicted Crown Prince Felipe having sex with his wife, Princess Letizia. The caption alluded to a new government measure designed to boost Spain's low birth rate by offering Ђ2,500 (US$3,640) to Spanish families for each new child born or adopted.
In the cartoon the prince says to the princess: "Do you realize if you get pregnant this'll be the closest to real work I've ever done?"
Of the two defendants, Manel Fontedevila wrote the caption and Guillermo Torres did the drawing.
They have said they did not mean to offend the royal family, and went into the trial saying they would draw the cartoon again and in fact have penned others since then poking fun at Spain's royals.
But the judge said that, while trying to ridicule a government measure, the two men "had vilified the crown in the most gratuitous and unnecessary way."