Hello,
I tested some graphic-processing with Image::Magick the quick'n dirty way.
When I was satisfied with the result, I did some code-cleanup and
reorganization and now I'm trapped between the lines.
I have use::strict and I cleaned the script with perl -w and currently there's
no warning, but...
Starting the script, I get these errors:
Exception 410: no images defined `Resize' at testIM.pl line 178.
Can't locate object method "Composite" via package "Exception 410: no images
defined `Image::Magick'" (perhaps you forgot to load "Exception 410: no
images defined `Image::Magick'"?) at testIM.pl line 180.
The code-snippet around line 178 is this:
173 my $imgOrg = Image::Magick->new;
174 my $x = $imgOrg->Read($fnImage);
175 warn "$x" if "$x";
176
177 $x = $imgOrg->Resize(width=>720,height=>576);
178 warn "$x" if "$x";
179 my $image = $imgOrg->Clone();
180 $image->Composite(image=>$imgOrg, compose=>'clear');
As I can't locate the real error, I tried to rewrite the script to use Imlib2.
But with imlib, I get this error:
***** Imlib2 Developer Warning ***** :
This program is calling the Imlib call:
imlib_text_draw_with_return_metrics();
With the parameter:
font
being NULL. Please fix your program.
The code-snippet for Imlib2 is this (I removed the comment lines):
37 my $image = $imgTmp->create_scaled_image(720,576);
39
40 $image->has_alpha(1);
41 $image->add_font_path($config);
44 $image->set_color($colShadow[0], $colShadwo[1], $colShadow[2],
$colShadow[3]);
45 $image->fill_rectangle(68, 52, 615, 42);
46 $image->fill_rectangle(68, 118, 486, 360);
47
48 $image->load_font("Eklektic/100");
49 $image->draw_text(683, 478, $txt, TEXT_TO_UP, 270);
Any help is very appreciated.
Kind regards
Geronimo
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>