Fixed error
Call to undefined function exif_imagetype() (View: /htdocs/resources/views/littlelink.blade.php)
This commit is contained in:
parent
dd722620cb
commit
d727455e96
|
@ -26,8 +26,15 @@ function analyzeImageBrightness($file) {
|
||||||
|
|
||||||
$file = base_path('/img/background-img/'.$file);
|
$file = base_path('/img/background-img/'.$file);
|
||||||
|
|
||||||
|
// Get image information using getimagesize
|
||||||
|
$imageInfo = getimagesize($file);
|
||||||
|
if (!$imageInfo) {
|
||||||
|
echo "Error: Unable to get image information.\n";
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
// Get the image type
|
// Get the image type
|
||||||
$type = exif_imagetype($file);
|
$type = $imageInfo[2];
|
||||||
|
|
||||||
// Load the image based on its type
|
// Load the image based on its type
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
@ -67,4 +74,5 @@ function analyzeImageBrightness($file) {
|
||||||
} else {
|
} else {
|
||||||
return 'light';
|
return 'light';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue