I'm trying to read an image with Imagick, I'm using this code on PHP:
<?php
if(extension_loaded('imagick')) {
echo "Imagick Loaded <br>";
}
else {
echo "Imagick Not Loaded <br>";
}
function scaleImage()
{
$realpath = "D:\Tentacle1.png";
$imagick = new \Imagick($realpath);
var_dump($imagick);
}
scaleImage();
?>
The output is this:
Imagick Loaded
object(Imagick)#1 (0) { }
Basically, it does not read the image, it just loads an empty object.
It does not give me any errors or warnings.
PHP log doesn't show any errors or warnings either.
I have tried reading the file contents with this (https://stackoverflow.com/a/16091295/2724978) - no success
This test works: https://stackoverflow.com/a/22438898/2724978
Image is on the right path, the file name casing is correct
I'm on Windows
Tried with another file and different extension (JPG), no success either
ImageMagick extension shows normally on php_info():
This is incredibly frustrating, I ran out of options to fix it. Could someone help a brother out?