>       use GD;
>       use Image::GD::Thumbnail;

Aren't you extended the GD class? The client shouldn't have to include
it. Naming the class Image::Thumbnail would allow the freedom to use
Image::Magick for the thumbnails if GD was not installed. Image::Magick
supports a much broader range of file formats. I would be more inclined
to use that instead ( probably slower though ).

>       # Load your source image
>       open IN, 'E:/Images/test.jpg'  or die "Could not open.";
>       my $srcImage = GD::Image->newFromJpeg(*IN);
>       close IN;

 my $srcImage2 = GD::Image->new( $blob );

Maybe make a feature that reads an image already loaded into memory. The
user should only have to pass in the file handler and not actually
open() and close() it.

>       # Create the thumbnail from it, where the biggest side is 50 px
>       my $thumb = create($srcImage,50);

Since the GD class does everything as an object ( as far as I know )
wouldn't it be better to call 

 my $thumb = $objGD->create($srcImage,50);

It seems odd that the base class uses an OOP approach while the class
that extends it uses functions.

>       # Save your thumbnail
>       open OUT, ">E:/Images/thumb_test.jpg" or die "Could not save ";
>       binmode OUT;
>       print OUT $thumb->jpeg;
>       close OUT;

The end user shouldn't need to worry about things like binmode. A simple
call to writefile() should do what the user expects.

My two cents,
Ron
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to