problem with background-color (win7 / activeperl)

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
jan99
Posts: 5
Joined: 2011-06-23T01:01:45-07:00
Authentication code: 8675308

problem with background-color (win7 / activeperl)

Post by jan99 »

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:

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');
Post Reply