problem with background-color (win7 / activeperl)
Posted: 2011-06-23T01:30:45-07:00
hi !
i have following sample code to create a simple icon with white background - but my background is black and the same script on linux by a friend is correct.
can anybody help me ?
regards Jan
Code:
i have following sample code to create a simple icon with white background - but my background is black and the same script on linux by a friend is correct.
can anybody help me ?
regards Jan
Code:
Code: Select all
#!/usr/bin/perl
use strict;
use warnings;
use Image::Magick;
# Objekt für Bilder erzeugen
my $img = Image::Magick->new();
# Bildgröße setzen
$img->Set(size=>'50x30');
# Bild mit weiß erzeugen
$img->ReadImage('xc:White');
# Grünen Rand malen
$img->Draw(primitive=>'rectangle', points=>'1,1 48,28', strokewidth=>3, stroke=>'Green');
# Text schreiben Zentriert 10px groß Schriftart Arial Farbe schwarz
$img->Annotate( text => 'XXX', gravity=>'Center', family => 'Arial', stroke => 'Black', pointsize => 10);
# Bild anzeigen
#$img->Display();
# Bild als "test.gif" schreiben
$img->Write('test.gif');