I'd set
```php
    $width = (int) $info[0];
    $height = (int) $Info[1];
}
else if ($this->isLoaded)
{
    $width = $this->getWidth();
    $height = $this->getHeight();
}
else
{
    return null;
}

// Determine format
switch (true)
//...
```
so we are not repeating logic