{
    "content": [
        {
            "type": "text",
            "text": "# GD::SecurityImage (perldoc)\n\n## NAME\n\nGD::SecurityImage - Security image (captcha) generator.\n\n## SYNOPSIS\n\nuse GD::SecurityImage;\n# Create a normal image\nmy $image = GD::SecurityImage->new(\nwidth   => 80,\nheight  => 30,\nlines   => 10,\ngdfont => 'giant',\n);\n$image->random( $yourrandomstr );\n$image->create( normal => 'rect' );\nmy($imagedata, $mimetype, $randomnumber) = $image->out;\nor\n# use external ttf font\nmy $image = GD::SecurityImage->new(\nwidth    => 100,\nheight   => 40,\nlines    => 10,\nfont     => \"/absolute/path/to/your.ttf\",\nscramble => 1,\n);\n$image->random( $yourrandomstr );\n$image->create( ttf => 'default' );\n$image->particle;\nmy($imagedata, $mimetype, $randomnumber) = $image->out;\nor you can just say (most of the public methods can be chained)\nmy($image, $type, $rnd) = GD::SecurityImage->new->random->create->particle->out;\nto create a security image with the default settings. But that may not be useful. If you\n\"require\" the module, you must import it:\nrequire GD::SecurityImage;\nGD::SecurityImage->import;\nThe module also supports \"Image::Magick\", but the default interface uses the \"GD\" module. To\nenable \"Image::Magick\" support, you must call the module with the \"usemagick\" option:\nuse GD::SecurityImage usemagick => 1;\nIf you \"require\" the module, you must import it:\nrequire GD::SecurityImage;\nGD::SecurityImage->import(usemagick => 1);\nThe module does not *export* anything actually. But \"import\" loads the necessary sub modules. If\nyou don' t \"import\", the required modules will not be loaded and probably, you'll \"die()\".\n\n## DESCRIPTION\n\nThe (so called) *\"Security Images\"* are so popular. Most internet software use these in their\nregistration screens to block robot programs (which may register tons of fake member accounts).\nSecurity images are basicaly, graphical CAPTCHAs (Completely Automated Public Turing Test to\nTell Computers and Humans Apart). This module gives you a basic interface to create such an\nimage. The final output is the actual graphic data, the mime type of the graphic and the created\nrandom string. The module also has some *\"styles\"* that are used to create the background (or\nforeground) of the image.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **COLOR PARAMETERS**\n- **METHODS** (1 subsections)\n- **UTILITY METHODS**\n- **EXAMPLES**\n- **ERROR HANDLING**\n- **TIPS**\n- **BUGS**\n- **COMMON ERRORS** (1 subsections)\n- **CAVEAT EMPTOR**\n- **SEE ALSO**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "GD::SecurityImage",
        "section": "",
        "mode": "perldoc",
        "summary": "GD::SecurityImage - Security image (captcha) generator.",
        "synopsis": "use GD::SecurityImage;\n# Create a normal image\nmy $image = GD::SecurityImage->new(\nwidth   => 80,\nheight  => 30,\nlines   => 10,\ngdfont => 'giant',\n);\n$image->random( $yourrandomstr );\n$image->create( normal => 'rect' );\nmy($imagedata, $mimetype, $randomnumber) = $image->out;\nor\n# use external ttf font\nmy $image = GD::SecurityImage->new(\nwidth    => 100,\nheight   => 40,\nlines    => 10,\nfont     => \"/absolute/path/to/your.ttf\",\nscramble => 1,\n);\n$image->random( $yourrandomstr );\n$image->create( ttf => 'default' );\n$image->particle;\nmy($imagedata, $mimetype, $randomnumber) = $image->out;\nor you can just say (most of the public methods can be chained)\nmy($image, $type, $rnd) = GD::SecurityImage->new->random->create->particle->out;\nto create a security image with the default settings. But that may not be useful. If you\n\"require\" the module, you must import it:\nrequire GD::SecurityImage;\nGD::SecurityImage->import;\nThe module also supports \"Image::Magick\", but the default interface uses the \"GD\" module. To\nenable \"Image::Magick\" support, you must call the module with the \"usemagick\" option:\nuse GD::SecurityImage usemagick => 1;\nIf you \"require\" the module, you must import it:\nrequire GD::SecurityImage;\nGD::SecurityImage->import(usemagick => 1);\nThe module does not *export* anything actually. But \"import\" loads the necessary sub modules. If\nyou don' t \"import\", the required modules will not be loaded and probably, you'll \"die()\".",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "See the tests in the distribution. Also see the demo program \"eg/demo.pl\" for an",
            "\"Apache::Session\" implementation of \"GD::SecurityImage\".",
            "Download the distribution from a CPAN mirror near you, if you don't have the files.",
            "Running the test suite will also create some sample images.",
            "OTHER USE CASES",
            "\"GD::SecurityImage\" drawing capabilities can also be used for *counter image* generation or",
            "displaying arbitrary messages:",
            "use CGI qw(header);",
            "use GD::SecurityImage 1.64; # we need the \"blank\" style",
            "my $font  = \"StayPuft.ttf\";",
            "my $rnd   = \"10.257\"; # counter data",
            "my $image = GD::SecurityImage->new(",
            "width  =>   140,",
            "height =>    75,",
            "ptsize =>    30,",
            "rndmax =>     1, # keeping this low helps to display short strings",
            "frame  =>     0, # disable borders",
            "font   => $font,",
            ");",
            "$image->random( $rnd );",
            "# use the blank style, so that nothing will be drawn",
            "# to distort the image.",
            "$image->create( ttf => 'blank', '#CC8A00' );",
            "$image->infotext(",
            "text   => 'You are visitor number',",
            "ptsize => 10,",
            "strip  =>  0,",
            "color  => '#0094CC',",
            ");",
            "$image->infotext(",
            "text   => '( c ) 2 0 0 7   m y s i t e',",
            "ptsize => 10,",
            "strip  =>  0,",
            "color  => '#d7d7d7',",
            "y      => 'down',",
            ");",
            "my($data, $mime, $random) = $image->out;",
            "binmode STDOUT;",
            "print header -type => \"image/$mime\";",
            "print $data;"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 51,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "COLOR PARAMETERS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 189,
                "subsections": [
                    {
                        "name": "number",
                        "lines": 65
                    }
                ]
            },
            {
                "name": "UTILITY METHODS",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 50,
                "subsections": []
            },
            {
                "name": "ERROR HANDLING",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "TIPS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "COMMON ERRORS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Wrong GD installation",
                        "lines": 45
                    }
                ]
            },
            {
                "name": "CAVEAT EMPTOR",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "GD::SecurityImage - Security image (captcha) generator.\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 1.75\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use GD::SecurityImage;\n\n# Create a normal image\nmy $image = GD::SecurityImage->new(\nwidth   => 80,\nheight  => 30,\nlines   => 10,\ngdfont => 'giant',\n);\n$image->random( $yourrandomstr );\n$image->create( normal => 'rect' );\nmy($imagedata, $mimetype, $randomnumber) = $image->out;\n\nor\n\n# use external ttf font\nmy $image = GD::SecurityImage->new(\nwidth    => 100,\nheight   => 40,\nlines    => 10,\nfont     => \"/absolute/path/to/your.ttf\",\nscramble => 1,\n);\n$image->random( $yourrandomstr );\n$image->create( ttf => 'default' );\n$image->particle;\nmy($imagedata, $mimetype, $randomnumber) = $image->out;\n\nor you can just say (most of the public methods can be chained)\n\nmy($image, $type, $rnd) = GD::SecurityImage->new->random->create->particle->out;\n\nto create a security image with the default settings. But that may not be useful. If you\n\"require\" the module, you must import it:\n\nrequire GD::SecurityImage;\nGD::SecurityImage->import;\n\nThe module also supports \"Image::Magick\", but the default interface uses the \"GD\" module. To\nenable \"Image::Magick\" support, you must call the module with the \"usemagick\" option:\n\nuse GD::SecurityImage usemagick => 1;\n\nIf you \"require\" the module, you must import it:\n\nrequire GD::SecurityImage;\nGD::SecurityImage->import(usemagick => 1);\n\nThe module does not *export* anything actually. But \"import\" loads the necessary sub modules. If\nyou don' t \"import\", the required modules will not be loaded and probably, you'll \"die()\".\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The (so called) *\"Security Images\"* are so popular. Most internet software use these in their\nregistration screens to block robot programs (which may register tons of fake member accounts).\nSecurity images are basicaly, graphical CAPTCHAs (Completely Automated Public Turing Test to\nTell Computers and Humans Apart). This module gives you a basic interface to create such an\nimage. The final output is the actual graphic data, the mime type of the graphic and the created\nrandom string. The module also has some *\"styles\"* that are used to create the background (or\nforeground) of the image.\n\nIf you are an \"Authen::Captcha\" user, see GD::SecurityImage::AC for migration from\n\"Authen::Captcha\" to \"GD::SecurityImage\".\n\nThis module is just an image generator. Not a *captcha handler*. The validation of the generated\ngraphic is left to your programming taste. But there are some *captcha handlers* for several\nPerl FrameWorks. If you are an user of one of these frameworks, see \"GD::SecurityImage\nImplementations\" in \"SEE ALSO\" section for information.\n",
                "subsections": []
            },
            "COLOR PARAMETERS": {
                "content": "This module can use both RGB and HEX values as the color parameters. HEX values are recommended,\nsince they are widely used and recognised.\n\n$color  = '#80C0F0';     # HEX\n$color2 = [15, 100, 75]; # RGB\n$i->create($meth, $style, $color, $color2)\n\n$i->create(ttf => 'box', '#80C0F0', '#0F644B')\n\nRGB values must be passed as an array reference including the three *Red*, *Green* and *Blue*\nvalues.\n\nColor conversion is transparent to the user. You can use hex values under both \"GD\" and\n\"Image::Magick\". They' ll be automagically converted to RGB if you are under \"GD\".\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new\nThe constructor. \"new()\" method takes several arguments. These arguments are listed below.\n\nwidth\nThe width of the image (in pixels).\n\nheight\nThe height of the image (in pixels).\n\nptsize\nNumerical value. The point size of the ttf character. Only necessarry if you want to use a\nttf font in the image.\n\nlines\nThe number of lines that you' ll see in the background of the image. The alignment of lines\ncan be vertical, horizontal or angled or all of them. If you increase this parameter' s\nvalue, the image will be more cryptic.\n\nfont\nThe absolute path to your TrueType (.ttf) font file. Be aware that relative font paths are\nnot recognized due to problems in the \"libgd\" library.\n\nIf you are sure that you've set this parameter to a correct value and you get warnings or\nyou get an empty image, be sure that your path does not include spaces in it. It looks like\nlibgd also have problems with this kind of paths (eg: '/Documents and Settings/user' under\nWindows).\n\nSet this parameter if you want to use ttf in your image.\n\ngdfont\nIf you want to use the default interface, set this parameter. The recognized values are\n\"Small\", \"Large\", \"MediumBold\", \"Tiny\", \"Giant\". The names are case-insensitive; you can\npass lower-cased parameters.\n\nbgcolor\nThe background color of the image.\n\nsendctobg\nIf has a true value, the random security code will be displayed in the background and the\nlines will pass over it. (sendctobg = send code to background)\n\nframe\nIf has a true value, a frame will be added around the image. This option is enabled by\ndefault.\n\nscramble\nIf set, the characters will be scrambled. If you enable this option, be sure to use a wider\nimage, since the characters will be separated with three spaces.\n\nangle\nSets the angle for scrambled/normal characters. Beware that, if you pass an \"angle\"\nparameter, the characters in your random string will have a fixed angle. If you do not set\nan \"angle\" parameter, the angle(s) will be random.\n\nWhen the scramble option is not enabled, this parameter still controls the angle of the\ntext. But, since the text will be centered inside the image, using this parameter without\nscramble option will require a taller image. Clipping will occur with smaller height values.\n\nUnlike the GD interface, \"angle\" is in \"degree\"s and can take values between 0 and 360.\n\nthickness\nSets the line drawing width. Can take numerical values. Default values are 1 for GD and 0.6\nfor Image:Magick.\n\nrndmax\nThe minimum length of the random string. Default value is 6.\n\nrnddata\nDefault character set used to create the random string is 0..9. But, if you want to use\nletters also, you can set this parameter. This parameter takes an array reference as the\nvalue.\n\nNot necessary and will not be used if you pass your own random string.\n\nrandom\nCreates the random security string or sets the random string to the value you have passed. If\nyou pass your own random string, be aware that it must be at least six (defined in \"rndmax\")\ncharacters long.\n\nrandomstr\nReturns the random string. Must be called after \"random()\".\n\ncreate\nThis method creates the actual image. It takes four arguments, but none are mandatory.\n\n$image->create($method, $style, $textcolor, $linecolor);\n\n$method can be \"normal\" or \"ttf\".\n\n$style can be one of the following:\n\ndefault\nThe default style. Draws horizontal, vertical and angular lines.\n\nrect\nDraws horizontal and vertical lines\n\nbox Draws two filled rectangles.\n\nThe \"lines\" option passed to new, controls the size of the inner rectangle for this style.\nIf you increase the \"lines\", you'll get a smaller internal rectangle. Using smaller values\nlike 5 can be better.\n\ncircle\nDraws circles.\n\nellipse\nDraws ellipses.\n\nec  This is the combination of ellipse and circle styles. Draws both ellipses and circles.\n\nblank\nDraws nothing. See \"OTHER USES\".\n\nYou can use this code to get all available style names:\n\nmy @styles = grep {s/^style//} keys %GD::SecurityImage::Styles::;\n\nThe last two arguments ($textcolor and $linecolor) are the colors used in the image (text and\nline color -- respectively):\n\n$image->create($method, $style, [0,0,0], [200,200,200]);\n$image->create($method, $style, '#000000', '#c8c8c8');\n\nparticle\nMust be called after create.\n\nAdds random dots to the image. They'll cover all over the surface. Accepts two parameters; the\ndensity (number) of the particles and the maximum number of dots around the main dot.\n\n$image->particle($density, $maxdots);\n\nDefault value of $density is dependent on your image' s width or height value. The greater value\nof width and height is taken and multiplied by twenty. So; if your width is 200 and height is\n70, $density is \"200 * 20 = 4000\" (unless you pass your own value). The default value of\n$density can be too much for smaller images.\n\n$maxdots defines the maximum number of dots near the default dot. Default value is 1. If you set\nit to 4, The selected pixel and 3 other pixels near it will be used and colored.\n\nThe color of the particles are the same as the color of your text (defined in create).\n\ninfotext\nThis method must be called after create. If you call it early, you'll die. \"infotext\" adds an\nextra text to the generated image. You can also put a strip under the text. The purpose of this\nmethod is to display additional information on the image. Copyright information can be an\nexample for that.\n\n$image->infotext(\nx      => 'right',\ny      => 'up',\ngd     => 1,\nstrip  => 1,\ncolor  => '#000000',\nscolor => '#FFFFFF',\ntext   => 'Generated by GD::SecurityImage',\n);\n\nOptions:\n\nx   Controls the horizontal location of the information text. Can be either \"left\" or \"right\".\n\ny   Controls the vertical location of the information text. Can be either \"up\" or \"down\".\n\nstrip\nIf has a true value, a strip will be added to the background of the information text.\n\ngd  This option can only be used under \"GD\". Has no effect under Image::Magick. If has a true\nvalue, the standard GD font \"Tiny\" will be used for the information text.\n\nIf this option is not present or has a false value, the TTF font parameter passed to \"new\"\nwill be used instead.\n\nptsize\nThe ptsize value of the information text to be used with the TTF font. TTF font parameter\ncan not be set with \"infotext()\". The value passed to \"new()\" will be used instead.\n\ncolor\nThe color of the information text.\n\nscolor\nThe color of the strip.\n\ntext\nThis parameter controls the displayed text. If you want to display long texts, be sure to\nadjust the image, or clipping will occur.\n\nout\nThis method finally returns the created image, the mime type of the image and the random",
                "subsections": [
                    {
                        "name": "number",
                        "content": "The returned mime type is \"png\" or \"gif\" or \"jpeg\" for \"GD\" and \"gif\" for \"Image::Magick\" (if\nyou do not \"force\" some other format).\n\n\"out\" method accepts arguments:\n\n@data = $image->out(%args);\n\nforce\nYou can set the output format with the \"force\" parameter:\n\n@data = $image->out(force => 'png');\n\nIf \"png\" is supported by the interface (via \"GD\" or \"Image::Magick\"); you'll get a png\nimage, if the interface does not support this format, \"out()\" method will use it's default\nconfiguration.\n\ncompress\nAnd with the \"compress\" parameter, you can define the compression for \"png\" and quality for\n\"jpeg\":\n\n@data = $image->out(force => 'png' , compress => 1);\n@data = $image->out(force => 'jpeg', compress => 100);\n\nWhen you use \"compress\" with \"png\" format, the value of \"compress\" is ignored and it is only\nchecked if it has a true value. With \"png\" the compression will always be 9 (maximum\ncompression). eg:\n\n@data = $image->out(force => 'png' , compress => 1);\n@data = $image->out(force => 'png' , compress => 3);\n@data = $image->out(force => 'png' , compress => 5);\n@data = $image->out(force => 'png' , compress => 1500);\n\nAll will default to 9. But this will disable compression:\n\n@data = $image->out(force => 'png' , compress => 0);\n\nBut the behaviour changes if the format is \"jpeg\"; the value of \"compress\" will be used for\n\"jpeg\" quality; which is in the range 1..100.\n\nCompression and quality operations are disabled by default.\n\nraw\nDepending on your usage of the module; returns the raw \"GD::Image\" object:\n\nmy $gd = $image->raw;\nprint $gd->png;\n\nor the raw \"Image::Magick\" object:\n\nmy $magick = $image->raw;\n$magick->Write(\"gif:-\");\n\nCan be useful, if you want to modify the graphic yourself. If you want to get an *image type*\nsee the \"force\" option in \"out\".\n\ngdboxempty\nSee \"path bug\" in \"GD bug\" for usage and other information on this method.\n\naddstrip\ncconvert\ngdf\nh2r\nishex\nr2h\nrandomangle"
                    }
                ]
            },
            "UTILITY METHODS": {
                "content": "backends\nReturns a list of available GD::SecurityImage back-ends.\n\nmy @be = GD::SecurityImage->backends;\n\nor\n\nmy @be = $image->backends;\n\nIf called in a void context, prints a verbose list of available GD::SecurityImage back-ends:\n\nAvailable back-ends in GD::SecurityImage v1.55 are:\nGD\nMagick\n\nSearch directories:\n/some/@INC/dir/containing/GDSI\n\nyou can see the output with this command:\n\nperl -MGD::SecurityImage -e 'GD::SecurityImage->backends'\n\nor under windows:\n\nperl -MGD::SecurityImage -e \"GD::SecurityImage->backends\"\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "See the tests in the distribution. Also see the demo program \"eg/demo.pl\" for an\n\"Apache::Session\" implementation of \"GD::SecurityImage\".\n\nDownload the distribution from a CPAN mirror near you, if you don't have the files.\n\nRunning the test suite will also create some sample images.\n\nOTHER USE CASES\n\"GD::SecurityImage\" drawing capabilities can also be used for *counter image* generation or\ndisplaying arbitrary messages:\n\nuse CGI qw(header);\nuse GD::SecurityImage 1.64; # we need the \"blank\" style\n\nmy $font  = \"StayPuft.ttf\";\nmy $rnd   = \"10.257\"; # counter data\n\nmy $image = GD::SecurityImage->new(\nwidth  =>   140,\nheight =>    75,\nptsize =>    30,\nrndmax =>     1, # keeping this low helps to display short strings\nframe  =>     0, # disable borders\nfont   => $font,\n);\n\n$image->random( $rnd );\n# use the blank style, so that nothing will be drawn\n# to distort the image.\n$image->create( ttf => 'blank', '#CC8A00' );\n$image->infotext(\ntext   => 'You are visitor number',\nptsize => 10,\nstrip  =>  0,\ncolor  => '#0094CC',\n);\n$image->infotext(\ntext   => '( c ) 2 0 0 7   m y s i t e',\nptsize => 10,\nstrip  =>  0,\ncolor  => '#d7d7d7',\ny      => 'down',\n);\n\nmy($data, $mime, $random) = $image->out;\n\nbinmode STDOUT;\nprint header -type => \"image/$mime\";\nprint $data;\n",
                "subsections": []
            },
            "ERROR HANDLING": {
                "content": "\"die\" is called in some methods if something fails. You may need to \"eval\" your code to catch\nexceptions.\n",
                "subsections": []
            },
            "TIPS": {
                "content": "If you look at the demo program (not just look at it, try to run it) you'll see that the random\ncode changes after every request (successful or not). If you do not change the random code after\na failed request and display the random code inside HTML (like *\"Wrong! It must be <random>\"*),\nthen you are doing a logical mistake, since the user (or robot) can now copy & paste the random\ncode into your validator without looking at the security image and will pass the test. Just\ndon't do that. Random code must change after every validation.\n\nIf you want to be a little more strict, you can also add a timeout key to the session (this\nfeature currently does not exits in the demo) and expire the related random code after the\ntimeout. Since robots can call the image generator directly (without requiring the HTML form),\nthey can examine the image for a while without changing it. A timeout implemetation may prevent\nthis.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "See the \"SUPPORT\" section if you have a bug or request to report.\n\nGD bug\npath bug\nlibgd and GD.pm don't like relative paths and paths that have spaces in them. If you pass a font\npath that is not an exact path or a path that have a space in it, you may get an empty image.\n\nTo check if the module failed to find the ttf font (when using \"GD\"), a new method added:\n\"gdboxempty()\". It must be called after \"create()\":\n\n$image->create;\ndie \"Error loading ttf font for GD: $@\" if $image->gdboxempty;\n\n\"gdboxempty()\" always returns false, if you are using \"Image::Magick\".\n",
                "subsections": []
            },
            "COMMON ERRORS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Wrong GD installation",
                        "content": "I got some error reports saying that GD::SecurityImage dies with this error:\n\nCan't locate object method \"new\" via package \"GD::Image\"\n(perhaps you forgot to load \"GD::Image\"?) at ...\n\nThis is due to a *wrong* installation of the GD module. GD includes \"XS\" code and it needs to be\ncompiled. You can't just copy/paste the *GD.pm* and expect it to work. It will not. If you are\nunder Windows and don't have a C compiler, you have to add new repositories to install *GD*,\nsince ActiveState' s own repositories don't include *GD*. Randy Kobes and J-L Morel have ppm\nrepositories for both 5.6.x and 5.8.x and they both have *GD*:\n\nhttp://www.bribes.org/perl/ppmdir.html\nhttp://theoryx5.uwinnipeg.ca/\n\n*bribes.org* also has a *GD::SecurityImage* ppd, so you can just install *GD::SecurityImage*\nfrom that repository.\n\nlibgd errors\nThere are some issues related to wrong/incomplete compiling of libgd and old/new version\nconflicts.\n\nlibgd without TTF support\nIf your libgd is compiled without TTF support, you'll get an *empty* image. The lines will be\ndrawn, but there will be no text. You can check it with \"gdboxempty\" method.\n\nGIF - Old libgd or libgd without GIF support enabled\nIf your GD has a \"gif\" method, but you get empty images with \"gif()\" method, you have to update\nyour libgd or compile it with GIF enabled.\n\nYou can test if \"gif\" is working from the command line:\n\nperl -MGD -e '$=GD::Image->new;$->colorAllocate(0,0,0);print$->gif'\n\nor under windows:\n\nperl -MGD -e \"$=GD::Image->new;$->colorAllocate(0,0,0);print$->gif\"\n\nConclusions:\n\n*   If it dies, your GD is very old.\n\n*   If it prints nothing, your libgd was compiled without GIF enabled (upgrade or re-compile).\n\n*   If it prints out a junk that starts with 'GIF87a', everything is OK.\n"
                    }
                ]
            },
            "CAVEAT EMPTOR": {
                "content": "*   Using the default library \"GD\" is a better choice. Since it is faster and does not use that\nmuch memory, while \"Image::Magick\" is slower and uses more memory.\n\n*   The internal random code generator is used only for demonstration purposes for this module.\nIt may not be *effective*. You must supply your own random code and use this module to\ndisplay it.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Other CAPTCHA Implementations & Perl Modules\n*   GD, Image::Magick\n\n*   ImagePwd, Authen::Captcha.\n\n*   \"ImageCode\" Perl Module (commercial): <http://www.progland.com/ImageCode.html>.\n\n*   The CAPTCHA project: <http://www.captcha.net/>.\n\n*   A definition of CAPTCHA (From Wikipedia, the free encyclopedia):\n<http://en.wikipedia.org/wiki/Captcha>.\n\n*   WebService::CaptchasDotNet: A Perl interface to *http://captchas.net* free captcha service.\n*captchas.net* also offers *audio* captchas.\n\nGD::SecurityImage Implementations\n*   GD::SecurityImage::AC: \"Authen::Captcha\" drop-in replacement module.\n\n*   Sledge::Plugin::Captcha\n\n*   Catalyst::Plugin::Captcha\n\n*   CGI::Application::Plugin::CAPTCHA\n\n*   Angerwhale::Controller::Captcha\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Burak Gursoy <burak@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2004 by Burak Gursoy.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
                "subsections": []
            }
        }
    }
}