I would follow your conscience. The fact that it occurred to you to ask, suggests you think you should buy the book? If you really do think you should, it will probably niggle at you if you don't.
Personally, I see nothing wrong with being inspired by a picture of something and adapting the idea for your own use.