img: Fill in missing height or width when scaling image.
parent
eff7fac985
commit
0ccf21daaf
|
@ -115,9 +115,6 @@ sub preprocess (@) {
|
||||||
$im = Image::Magick->new;
|
$im = Image::Magick->new;
|
||||||
$r = $im->Read($outfile);
|
$r = $im->Read($outfile);
|
||||||
error sprintf(gettext("failed to read %s: %s"), $outfile, $r) if $r;
|
error sprintf(gettext("failed to read %s: %s"), $outfile, $r) if $r;
|
||||||
|
|
||||||
$dwidth = $im->Get("width");
|
|
||||||
$dheight = $im->Get("height");
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
($dwidth, $dheight)=($w, $h);
|
($dwidth, $dheight)=($w, $h);
|
||||||
|
@ -133,6 +130,9 @@ sub preprocess (@) {
|
||||||
$imglink = $file;
|
$imglink = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dwidth = $im->Get("width") unless defined $dwidth;
|
||||||
|
$dheight = $im->Get("height") unless defined $dheight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -2,6 +2,7 @@ ikiwiki (3.20100518.3) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* creation_day() etc use local time, not gmtime. To match calendars, which
|
* creation_day() etc use local time, not gmtime. To match calendars, which
|
||||||
use local time.
|
use local time.
|
||||||
|
* img: Fill in missing height or width when scaling image.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Mon, 31 May 2010 20:44:17 -0400
|
-- Joey Hess <joeyh@debian.org> Mon, 31 May 2010 20:44:17 -0400
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
When I set up my picture page with `\[[!img defaults size=300x]]` then the html validator complains that the value for height is missing and the IE browsers won't show the pictures up at all; no problems with ff tho. If I set up my picture page with `\[[!img defaults size=300x300]]` then all the images are funny stretched. What am I doing wrong?
|
When I set up my picture page with `\[[!img defaults size=300x]]` then the html validator complains that the value for height is missing and the IE browsers won't show the pictures up at all; no problems with ff tho. If I set up my picture page with `\[[!img defaults size=300x300]]` then all the images are funny stretched. What am I doing wrong?
|
||||||
|
|
||||||
> This is a bug. --[[Joey]]
|
> This is a bug. --[[Joey]]
|
||||||
|
|
||||||
|
> And .. [[fixed|done]] --[[Joey]]
|
||||||
|
|
Loading…
Reference in New Issue