Updated SVG detection for Giovanni
This commit is contained in:
parent
99614f4f27
commit
bba3c61297
1 changed files with 3 additions and 3 deletions
|
@ -2976,9 +2976,9 @@ class YellowToolbox {
|
|||
$dataBufferSizeMax = filesize($fileName);
|
||||
$dataBufferSize = min($dataBufferSizeMax, 4096);
|
||||
if ($dataBufferSize) $dataBuffer = fread($fileHandle, $dataBufferSize);
|
||||
if (!feof($fileHandle) && preg_match("/<svg (.*?)>/", $dataBuffer, $matches)) {
|
||||
if (preg_match("/ width=\"(\d+)\"/", $matches[1], $tokens)) $width = $tokens[1];
|
||||
if (preg_match("/ height=\"(\d+)\"/", $matches[1], $tokens)) $height = $tokens[1];
|
||||
if (!feof($fileHandle) && preg_match("/<svg\s(.*?)>/s", $dataBuffer, $matches)) {
|
||||
if (preg_match("/\swidth=\"(\d+)\"/s", $matches[1], $tokens)) $width = $tokens[1];
|
||||
if (preg_match("/\sheight=\"(\d+)\"/s", $matches[1], $tokens)) $height = $tokens[1];
|
||||
$type = $fileType;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue