I messed around with a composting test in Blender a while back, and while it was good I thought I’d go back and do it again.
This most recent model does cartoon shading based on the original colors in an image by setting the brightness to one of a small set of values, causing a cartoon look. It doesn’t do shading on the edges of models, because that is best handled outside the compositor (or with additional data set to the compositor) while this method simply looks at emulating the effect.
You can download the scene-it’s set up for Cycles (for a variety of reasons), namely that I like reflections, but the compositor will work with Blender Internal as well.
In addition, you can watch it on YouTube as well.