One of my favorite iPhone apps is CardStar, which lets you put the cards for all those loyalty programs (like the local supermarket) in your phone rather than have to carry around bits of plastic. It displays the barcodes, and the store can scan them. (Most of the time with the hand scanner they use for large items, though you can hand them your phone to pass over the surface scanner.)
It also works with library cards. For the Seattle Public Library, use Codabar AA.