mirror of https://github.com/BOINC/boinc.git
Automatically detect >=GD2
svn path=/trunk/boinc/; revision=5564
This commit is contained in:
parent
a910b038c6
commit
ffe9fa69e7
|
@ -25515,10 +25515,13 @@ Janus 4 Mar 2005
|
|||
project directory.
|
||||
In the future you won't have to manually patch the CVS to edit
|
||||
these pages - simply add stuff to these callback functions.
|
||||
- Automatically detect image library to use with profiles
|
||||
(from Christian Beer)
|
||||
|
||||
/html/
|
||||
inc/
|
||||
home.php
|
||||
user.inc
|
||||
profiles.inc
|
||||
user/
|
||||
show_user.php
|
||||
home.php
|
||||
|
|
|
@ -318,7 +318,9 @@ function scale_image($image, $origWidth, $origHeight, $targetWidth, $targetHeigh
|
|||
$destHeight = $origHeight;
|
||||
}
|
||||
|
||||
if (1) {
|
||||
$gd_info = gd_info();
|
||||
$newGD = (strstr($gd_info["GD Version"], "2.0")!="");
|
||||
if ($newGD) {
|
||||
// If you are using a modern PHP/GD installation that does 'truecolor' images, this is what's needed.
|
||||
$newImage = ImageCreateTrueColor($destWidth, $destHeight);
|
||||
ImageCopyResampled($newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $origWidth, $origHeight);
|
||||
|
|
Loading…
Reference in New Issue