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);
|
||||
|
||||
// Get image information using getimagesize
|
||||
$imageInfo = getimagesize($file);
|
||||
if (!$imageInfo) {
|
||||
echo "Error: Unable to get image information.\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
// Get the image type
|
||||
$type = exif_imagetype($file);
|
||||
$type = $imageInfo[2];
|
||||
|
||||
// Load the image based on its type
|
||||
switch ($type) {
|
||||
|
@ -68,3 +75,4 @@ function analyzeImageBrightness($file) {
|
|||
return 'light';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue