Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1226
ThumbnailPatch3.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 6:45 PM
2014-11-21 18:45:24 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
ThumbnailPatch3.diff
View Options
Index: includes/Image.php
===================================================================
RCS file: /cvsroot/wikipedia/phase3/includes/Image.php,v
retrieving revision 1.19
diff -u -r1.19 Image.php
--- includes/Image.php 24 Aug 2004 08:11:45 -0000 1.19
+++ includes/Image.php 28 Aug 2004 02:22:09 -0000
@@ -200,14 +200,24 @@
break;
}
$height = floor( $this->height * ( $width/$this->width ) );
- if ( $truecolor ) {
+ if( $truecolor ) {
$dst_image = imagecreatetruecolor( $width, $height );
+ imagealphablending( $dst_image, false );
+ imagesavealpha( $dst_image, true );
+ imagecopyresampled( $dst_image, $src_image,
+ 0,0,0,0,
+ $width, $height, $this->width, $this->height );
} else {
- $dst_image = imagecreate( $width, $height );
+ $cmd = $wgImageMagickConvertCommand .
+ " -quality 85 -geometry {$width} ".
+ escapeshellarg($this->imagePath) . " " .
+ escapeshellarg($thumbPath);
+ $conv = shell_exec( $cmd );
+ $dst_image = imagecreatefrompng( $thumbPath );
+ $tmp_image = imagecreatefrompng( $thumbPath );
+ imagetruecolortopalette( $dst_image, 0, 255 );
+ imagecolormatch( $tmp_image, $dst_image );
}
- imagecopyresampled( $dst_image, $src_image,
- 0,0,0,0,
- $width, $height, $this->width, $this->height );
switch( $this->type ) {
case 1: # GIF
case 3: # PNG
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1137
Default Alt Text
ThumbnailPatch3.diff (1 KB)
Attached To
Mode
T2234: PNG thumbnails change binary transparency to alpha transparency, causing IE6 problems
Attached
Detach File
Event Timeline
Log In to Comment