I was lead author for ebook/print book through Apress - _Hacking the Kinect_ - http://amzn.to/1aljFwQ
It was distributed in stores and online, as well as in ebook form. It has text, graphics, and code.
It generated not much past the initial upfront payment of ~$8000, spread across myself and 3 coauthors.
Reasons?
1) Niche topic, badly addressed. It was pretty hot at the time, but the number of people looking for a intermediate - advanced level text on 3D sensing was not as high as the number of people looking for "cool demo I can type in and make my SparkFun robot drive around a Coke can".
2) Published through agency. I appreciated Apress' work on marketing my book. Everything else I could have handled myself (and probably the marketing too). They also have tough terms - you have to be a knockout (4k+ units[1]) success in the technical book industry to really make money through publishers.
3) Bad print copy. The grayscale used for my book was too dark, blowing away some images. Apress did not want to fix this. I recommend the Kindle version to everyone I can.
Worth it? Yes. It is a great means to open doors and market yourself. Financially worth it? Not through a publisher.
[1] I can't cite this off the top of my head, but that's the number I recall from a few years ago.