must have a width/height in order to set width/height
Failing to give a proper width/height will cause ImageMagick to die with an assertion error
This commit is contained in:
parent
40805cee48
commit
7389128d99
2 changed files with 5 additions and 0 deletions
|
|
@ -250,6 +250,7 @@ The height of the image in pixels.
|
|||
sub setImageHeight {
|
||||
my $self = shift;
|
||||
my $height = shift;
|
||||
die "Must have a height" unless $height;
|
||||
$self->image->Extent(height => $height);
|
||||
$self->image->Colorize(fill => $self->getBackgroundColor);
|
||||
$self->{_properties}->{height} = $height;
|
||||
|
|
@ -270,6 +271,7 @@ Teh width of the image in pixels.
|
|||
sub setImageWidth {
|
||||
my $self = shift;
|
||||
my $width = shift;
|
||||
die "Must have a width" unless $width;
|
||||
$self->image->Extent(width => $width);
|
||||
$self->image->Colorize(fill => $self->getBackgroundColor);
|
||||
$self->{_properties}->{width} = $width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue