How to create an image from scratch?
Posted: 2013-08-08T08:35:11-07:00
Hello wizards,
I just tried this one:
When I uncomment the line with the Read() method, I get the expected result. But without reading in the file, I get those error messages:
I guess this is closely related to viewtopic.php?f=7&t=23871 but I just can't find any information on how to handle this.
I just tried this one:
Code: Select all
#! /usr/bin/perl
use strict;
use warnings;
use Image::Magick;
my $e;
my $DPI = 300; # 600;
my $image = Image::Magick->new(density => $DPI,
width=>100, height=>100,
);
# $e = $image->Read ("labels4.ps");
warn $e if $e;
$e = $image->Draw (fill=>"red",
stroke=>"none", strokewidth=>0,
primitive=>"roundrectangle",
points=>"10,10 90,90, 5,5");
warn $e if $e;
$e = $image->Display(); warn $e if $e;
Code: Select all
jw@raven:/m$ ./t.pl
Exception 410: no images defined `Draw' @ error/Magick.xs/XS_Image__Magick_Mogrify/7403 at ./t.pl line 22.
Exception 410: no images defined `Image::Magick' @ error/Magick.xs/XS_Image__Magick_Display/3564 at ./t.pl line 24.
jw@raven:/m$