mirror of https://github.com/BOINC/boinc.git
Web: fix GD detection
This broke when 2.1.0 was released.
This commit is contained in:
parent
94b7591d4b
commit
8c325112f0
|
@ -21,7 +21,9 @@
|
||||||
//
|
//
|
||||||
function intelligently_scale_image($sourcefile, $fw, $fh) {
|
function intelligently_scale_image($sourcefile, $fw, $fh) {
|
||||||
$gd_info = gd_info();
|
$gd_info = gd_info();
|
||||||
$newGD = (strstr($gd_info["GD Version"], "2.0")!="");
|
// libgd version numbers seem to be always three numbers
|
||||||
|
preg_match('/(\d).(\d).(\d)/', $gd_info['GD Version'], $match);
|
||||||
|
$newGD = ($match[1]>=2);
|
||||||
|
|
||||||
list($ow, $oh, $from_type) = getimagesize($sourcefile);
|
list($ow, $oh, $from_type) = getimagesize($sourcefile);
|
||||||
switch($from_type) {
|
switch($from_type) {
|
||||||
|
|
Loading…
Reference in New Issue