From dcf64ed83b64fb7cdf98063320d65043d8d23f3f Mon Sep 17 00:00:00 2001 From: Martin Kamerbeek Date: Fri, 20 Apr 2007 15:00:15 +0000 Subject: [PATCH] Fixed WebGUI::Image->new doesn't obey width and height settings --- docs/changelog/7.x.x.txt | 3 ++- lib/WebGUI/Image.pm | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index e6333190b..68aa6ceb8 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -12,7 +12,8 @@ - Added better error handling in asset instanciation. - fix: Image::Magick->Scale does nothing if given dimensions < 1, so make sure they are large enough when generating thumbnails in Storage/Image.pm - + - fix: WebGUI::Image->new doesn't obey width and height settings (Martin Kamerbeek /Oqapi) + http://www.plainblack.com/bugs/tracker/webguiimage-new-doesnt-obey-width-and-height-settings 7.3.14 - fix: a typo in DatabaseLink.pm diff --git a/lib/WebGUI/Image.pm b/lib/WebGUI/Image.pm index 7324d18c1..198103615 100644 --- a/lib/WebGUI/Image.pm +++ b/lib/WebGUI/Image.pm @@ -173,7 +173,10 @@ sub new { my $width = shift || 300; my $height = shift || 300; - my $img = Image::Magick->new; + my $img = Image::Magick->new( + size => $width.'x'.$height, + ); + $img->Read(filename => 'xc:white'); bless {_image => $img, _session => $session, _properties => {