| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public static function info($ltxsource, $type="png") |
||
| 11 | { |
||
| 12 | if(!in_array($type,['png','svg'])) return []; |
||
| 13 | $url=route("latex.$type", ['ltxsource' => $ltxsource]); |
||
| 14 | $image = new Imagick(); |
||
| 15 | $image->readImageBlob(Storage::get('latex-svg/'.urlencode($ltxsource).'.svg')); |
||
|
|
|||
| 16 | $width = $image->getImageWidth(); |
||
| 17 | $height = $image->getImageHeight(); |
||
| 18 | return [$url,$width/5,$height/5]; |
||
| 19 | } |
||
| 21 |