imagecreatefrombmp(1) and imagebmp(2) are now polyfills for PHP < 7.2

This commit is contained in:
Daniel Saunders 2018-05-14 03:12:27 -04:00
parent 39739de7c5
commit 583a58288a

View File

@ -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);