For most cases, unless you REALLY want to be 99% secure,
there are very simple solutions:
1. Using any graphical editor, generate off-line a set of
images. Dependently on your security issues make it large enough.
Again in most cases 20-50 images will be more than enough. DIsplay
them randomly.
2. Generate set of atomic images, using an editor. Let's say
digits and/or letters. Generate a random number. Use every digit
(or group of digits) of this number, as index into your atomic set.
Display a combined image. For example, if random number is 12345,
you would display five images "1", "2", "3", "4", "5", which look
like a single image.
(1) is simpler. (2) requires more programming, but can yeild
practically unlimited number of different images.