Revision history for Perl extension GD::SecurityImage.

Time zone is GMT+2.

1.54 Fri Apr  8 23:11:32 2005
	=> Updated pods.
	=> If anyone adds a back-end, one must define a method
	   to deal with colors: 'backend_cconvert'. cconvert()
	   will forward all calls to backend_cconvert() if 
	   $BACKEND is different than /^(GD|Magick)$/. Note that
	   this method must be capable of handling both HEX and RGB.
	=> Finally documented this. See BACKEND_AUTHORS section in
	   the pod (If you have a HTML version, probably you can not
	   see this).
	=> Removed gdbox_empty from GD::SecurityImage::Magick
	=> The module now has an AUTOLOAD method.
	=> Added a check for gdbox_empty in AUTOLOAD for non-GD 
	   backends.
	=> Ooops! ellipse() added in GD 2.07 :p Thanks to ActiveState
	   build logs. I missed that one (looks like all CPAN Testers 
	   are using recent GDs).
	   Added a global mechanism to check this and any incompatibilities.
	   If GD < 2.07 and you call ellipse() it will fall-back to default()
	   style. If you call ec() style, it'll disable ellipse() call and only
	   draw circles.
	=> Updated GD::SecurityImage::Styles.
	=> Updated demo program. Also, changed default type to 'png' after 
	   a little conversation with Eric Gorr. :) (some installations may 
	   have gif() method but don't have gif support enabled. This results
	   with an empty image. Cause: old libgd).
	=> Default image type in GD::SecurityImage::GD::out() changed to 'png'.

1.53 Wed Jan  5 18:21:59 2005
	=> Added a new option 'backend' to import(). With this
	   option you can now include other back-ends:

	   	use GD::SecurityImage backend => 'Magick';

	   will load the GD::SecurityImage::Magick for example.
	   If you wrote a backend for GD::SecurityImage, you can 
	   now combine your back-end with GD::SecurityImage. Like, 
	   if you created a Imager back-end named 'GD::SecurityImage::Imager',
	   you can load it like this:

	   	use GD::SecurityImage backend => 'Imager';

	   No one requested this kind of functionality (yet), but I'm 
	   adding it anyway. And *NO* I will not create an Imager or 
	   any other backend myself (at least not in the near future). 
	   I' m already supporting two different interfaces.

	   Probably cconvert() also needs a fix to support such a thing.
	   I'll deal with that later.
	=> If you have loaded Image::Magick outside and then you call 
	   GD::SecurityImage with the GD backend (or simply use it)
	   your code dies with a weird error. Since it setups the 
	   interface for Image::Magick, but you didn't select Image::Magick 
	   as the backend. For example, this simple code dies if you are using
	   1.52 and below:

		   use Image::Magick;
		   use GD::SecurityImage;
		   GD::SecurityImage->new->create;

	   This bug cought by Dave Rolsky.
	=> New class variable $BACKEND added to deal with this bug.
	   The backend is now completely checked and set in import().
	=> Also, the module is now checking whether you called import()
	   or not. If you didn't, it'll die (it actually checks if $BACKEND
	   has a value).
	=> Added a new test 'backend.t' to check these.

1.52 Tue Dec 21 15:07:37 2004
	=> After implementing HEX colors with cconvert, I forgot to 
	   set default colors in create() which will throw an exception
	   without the default color values. 
	   Reported by Billy Vierra.
	=> Updated pod.

1.51 Sun Dec 19 00:02:13 2004
	=> Updated demo program code.
	=> Updated Makefile.PL.
	=> New private method cconvert for transparent GD/Image::Magick 
	   color conversion.
	=> Removed GD::SecurityImage::Magick::rgbx().
	=> The module now supports hex color codes like "#ffffff".
	=> Updated pod.

	=> [NOT DOCUMENTED] New private method add_strip.
	=> [NOT DOCUMENTED] New method set_tl.
	=> [NOT DOCUMENTED] New method change_random.
	=> [NOT DOCUMENTED] New parameter 'text_location' added to new.
	=> [NOT DOCUMENTED] With text_location option, you can now add info boxes to 
	   the 4 corners of the image (or you can use this for something else).
	=> [NOT DOCUMENTED] Behavior of out() changed. If set_tl is used and
	   you change the random code (text option) several times, it may 
	   be an array.

1.5 Sat Oct 30 17:11:53 2004
	=> Fixed pod.
	=> Minor fixes.
	=> rndmax option to new, now controls the minimum random character
	   length, when you supply your own random string.
	=> Updated tests.
	=> Added a demo program to "eg/demo.pl".
	   It needs DBI, DBD::mysql (and a MySQL server), Apache::Session, 
	   String::Random and some CORE modules to run.
	=> GD still needs an absolute path. Fixed pod.

1.4_03 Mon Oct 11 21:55:37 2004
	=> Older GDs do not have setThickness. 
	   "setThickness" added in "GD 2.07 @ 24 Apr 2003". 
	   Fixed thickness option in new. 
	   Updated test api for this.
	   Added this to Pod.
	=> Added "compress" argument to out() for "jpeg" and "png". 
	=> But GD *again* has a problem here. Compression argument for 
	   png is implemented in "GD 2.07". out() silently ignores 
	   compression parameter, if you have an older GD and set output 
	   format to png.
	   Added this to Pod.
	=> Also, jpeg method and quality level for jpeg added 
	   in "GD 1.26 @ 18 Mar 2000". But currently, I didn't add 
	   any controls to detect that and I don't know who can 
	   use that pre-historic versions (other than sf.net!).
        => It's too hard to stay compatible with older versions!

1.4_02 Sat Oct  9 14:48:18 2004
	=> Fixed a bug in new for the angle parameter.
	=> New private method setThickness.
	=> New option 'thickness' added to new.
	=> Replaced buggy/silly "_charw" with "ttf_info" in GD backend. 
	   Hopefully, this fixes the "scramble" implementation for GD.
	=> Updated test suite. Now, there is a single test api and two
	   test files.
	=> Changed Makefile.PL. "GD" is now hardcoded as a prerequisite.
	   Removed user input codes. The presence of "Image::Magick"
	   is now tested inside the test file and magick test will
	   be skipped if there is no "Image::Magick" 
	   (request from Barbie -- not exactly this, but similar).

1.4_01 Mon Sep 20 16:46:13 2004
	=> It looks like newer versions of GD does not have the path 
	   bug, but I do not know the exact version that this was 
	   fixed. Anyway, it looks like v2.16 does not have that bug. 
	   Also added this to Pod.
	=> The module now automatically drops to 'normal' mode if
	   you are using GD and your GD version is smaller than 1.20
	   and you have selected 'ttf' method.
	   Q: Why?
	   A: v1.19 and below does not have ttf support. (As mentioned
	      in earlier releases) -- also: sf.net has GD v1.19 :).
	   Module does this silently, so you'll not get any warnings about
	   that.
	=> New parameters scramble and angle added to new(). If you enable 
	   scramble, you have to generate a bigger image, since characters 
	   have three spaces between them.
	=> I've decided to change the description of the module. Now it
	   has the word "captcha" in it (for search engines).
	=> Added some new constants to both backends.
	=> Module now requires Math::Trig (which is a CORE module) for 
	   degree to radian calculation.
	=> New tests for scramble.
	=> New private method random_angle.

1.33 Sun Aug 22 16:50:42 2004
	=> Because of libgd's path bug, in some cases,
	   GD::SecurityImage::GD::insert_text() can not get the 
	   boundary list. I've added a workaround there. If we don't 
	   get the list, then we'll use width/2 and height/2 which 
	   will generate wrong values (since the image will not
	   include any string and because the underlying library can not 
	   find the ttf font, that's not the problem), but I can not do 
	   anything about it.
	   GD wants an *exact* path with no spaces in it for TTF Fonts.
	   Just don't put your codes/fonts in paths that have spaces in it.
	   And don't try to "make test" from a location like this.
	   You can blame windowz and/or libgd for this.
	   Also, if Cwd::getcwd() can not get the exact path, we will have
	   the same problem, but after this version, you'll probably not 
	   get "Use of uninitialized value" warnings.
	=> New method gdbox_empty() added to GD::SecurityImage::GD.
	   Also added a fake gdbox_empty() method to 
	   GD::SecurityImage::Magick for compatibility.
	   Under GD::SecurityImage::Magick, this method always returns 
	   false.
	=> Minor fix in create().
	=> Updated Pods. Sub modules have definiton of what they are now.

1.321 Wed Jul 28 21:52:04 2004
	=> Updated tests. Code didn't change.

1.32 Wed Jul 28 15:49:12 2004
	=> Minimal fix in create().
	=> There is a bug in PerlMagicks older than 6.0.4.
	   From <http://www.imagemagick.org/www/Changelog.html>:
	   "PerlMagick's QueryFontMetrics() incorrectly reports 
	   `unrecognized attribute'` for the `font' attribute".
	   Image::Magick test is now skipped if your 
	   $Image::Magick::VERSION is smaller than 6.0.4.
	   Please upgrade to 6.0.4, if you want to use Image::Magick
	   as the backend.
	=> Added this bug to Pod.

1.31 Sun Jun 27 00:08:49 2004
	=> Updated Pod.
	=> send_ctobg is disabled automatically if style is 
	   set to 'box'.
	=> All styles can put a frame around the image now.
	   And this feature is enabled by default.
	=> New option 'frame' added to new().
	=> Renamed constants in GD::SecurityImage::GD.
	=> Changed tests.

1.3 Mon Jun 21 19:11:13 2004
	=> New method particle().
	=> Private method r2h().
	=> Fixed color conversion for Image::Magick.
	=> out() now accepts arguments.
	=> Updated pod.

1.2 Fri Jun 18 21:39:08 2004
	=> Added raw() method.
	=> Fixed gd_font object key.
	=> new style "ec".
	=> Adapted Image::Magick compatibility (request from Mark Fuller).
	   I may add Image::Magick spesific styles in future releases.
	=> New modules added: 
	      GD::SecurityImage::GD
	      GD::SecurityImage::Magick
	      GD::SecurityImage::Styles
	   and GD::SecurityImage is smaller now ;)
	=> Renamed old tests to (added 'gd_' to names):
	      t/gd_01_use.t
	      t/gd_02_normal.t
	      t/gd_03_ttf.t
	=> Added new tests:
              t/im_01_use.t
              t/im_02_ttf.t
        => Altered Makefile.PL and test files to skip tests if the user selects to do so.

1.1 Fri May 14 22:08:39 2004
	=> Added 'send_ctobg' option to new().
	=> After testing the code with a *really* old GD 
	   (1.19 -- which has no ttf support), I've realized 
	   that stringFT was implemented in GD 1.31. 
	   So, the ttf test now has a skip option.
	=> Also added stringTTF check for backward compatibility.
	   stringTTF => (GD 1.20 @ 30 Aug 1999 )
	   stringFT  => (GD 1.31 @ 26 Sep 2001 )
	=> Fixed pod. There was an '=item' instead of '=head'.
	=> Added new styles 'circle' and 'ellipse'.
	=> Updated 03_ttf.t

1.0 Mon Apr 26 21:40:45 2004
	=> First release.
