DreamWorks Animation has entered an agreement to buy Classic Media, owner of many of the best-known and most-enduring franchises in all of family entertainment.