83. Creating verification text PNG images

Write a program that can create Captcha-like PNG images for verifying human users to a system. Such an image should have:

  • A gradient-colored background
  • A series of random letters displayed at different angles both to the right and left
  • Several random lines of different colors across the image (on top of the text)

Here is an example of such an image:

Get The Modern C++ Challenge now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.