Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1225
ThumbnailPatch.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
ThumbnailPatch.diff
View Options
29c29
< $this->title = Title::makeTitleSafe( NS_IMAGE, $this->name );
---
> $this->title = Title::makeTitle( Namespace::getImage(), $this->name );
202a203
>
204a206,210
> imagealphablending( $dst_image, false );
> imagesavealpha( $dst_image, true );
> imagecopyresampled( $dst_image, $src_image,
> 0,0,0,0,
> $width, $height, $this->width, $this->height );
206c212,220
< $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 );
208,210c222
< imagecopyresampled( $dst_image, $src_image,
< 0,0,0,0,
< $width, $height, $this->width, $this->height );
---
>
380c392
< $descTitle = Title::makeTitleSafe( NS_IMAGE, $name );
---
> $descTitle = Title::makeTitle( NS_IMAGE, $name );
446,447c458,462
< $log = new LogPage( 'upload' );
< $log->addEntry( 'upload', $descTitle, $desc );
---
> $log = new LogPage( wfMsg( 'uploadlogpage' ), wfMsg( 'uploadlogpagetext' ) );
> $da = wfMsg( 'uploadedimage', '[[:' . $wgLang->getNsText(
> Namespace::getImage() ) . ":{$name}|{$name}]]" );
> $ta = wfMsg( 'uploadedimage', $name );
> $log->addEntry( $da, $desc, $ta );
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1136
Default Alt Text
ThumbnailPatch.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