mirror of
https://github.com/Circlepuller/Tinyboard.git
synced 2025-01-17 05:18:28 +01:00
imagecreatefrombmp(1) and imagebmp(2) are now polyfills for PHP < 7.2
This commit is contained in:
parent
39739de7c5
commit
583a58288a
@ -496,7 +496,7 @@ class ImageBMP extends ImageBase {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('imagecreatefrombmp')) {
|
||||
/*********************************************/
|
||||
/* Fonction: imagecreatefrombmp */
|
||||
/* Author: DHKold */
|
||||
@ -582,7 +582,9 @@ function imagecreatefrombmp($filename) {
|
||||
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('imagebmp')) {
|
||||
function imagebmp(&$img, $filename='') {
|
||||
$widthOrig = imagesx($img);
|
||||
$widthFloor = ((floor($widthOrig/16))*16);
|
||||
@ -655,6 +657,7 @@ function imagebmp(&$img, $filename='') {
|
||||
fclose($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
// imagebmp helpers
|
||||
function int_to_dword($n) {
|
||||
return chr($n & 255).chr(($n >> 8) & 255).chr(($n >> 16) & 255).chr(($n >> 24) & 255);
|
||||
|
Loading…
x
Reference in New Issue
Block a user