* This is consistent with the 'thumb' option now:
** Unchanged: [[Image:xyz.jpg|thumb]], [[Image:xyz.jpg|thumb|200px]] do not blow up an image larger than the source
** Unchanged: [[Image:xyz.jpg|frameless]] does not blow up an image
** New: [[Image:xyz.jpg|frameless|200px]] does not blow up an image
** Unchanged: [[Image:xyz.jpg|200px]] still blows up an image
* Ensure that rate-limiting is applied to rollbacks.
* Make a better rate-limiting error message (i.e. a normal MW error,
rather than an "Internal Server Error").
+* Do not present an image bigger than the source when 'frameless' option is used
+ (to be consistent with the 'thumb' option now)
== Parser changes in 1.12 ==
return $prefix.$this->makeThumbLink2( $title, $file, $fp, $hp ).$postfix;
}
+ if ( $file && isset( $fp['frameless'] ) ) {
+ $srcWidth = $file->getWidth( $page );
+ # For "frameless" option: do not present an image bigger than the source (for bitmap-style images)
+ # This is the same behaviour as the "thumb" option does it already.
+ if ( $srcWidth && !$file->mustRender() && $hp['width'] > $srcWidth ) {
+ $hp['width'] = $srcWidth;
+ }
+ }
+
if ( $file && $hp['width'] ) {
# Create a resized image, without the additional thumbnail features
$thumb = $file->transform( $hp );
return $out;
}
}
-
-
-
-