Создаю svg
:
<svg width="400" height="400" viewBox="-30 -40 336.6666666666667 296.6666666666667" id="maker-svg" style="padding: 10px;" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"><g id="svgGroup" stroke-linecap="round" fill-rule="evenodd" font-size="13.333333333333334" stroke="#03a9f4" stroke-width="0.5mm" fill="rgba(3, 169, 244, 0.1)" style="stroke:#03a9f4;stroke-width:0.5mm;fill:rgba(3, 169, 244, 0.1)"><g id="0"><g id="0"><g id="trapeze"><line id="ab" data-route="["models","0","models","trapeze","paths","ab"]" x1="23.333" y1="0" x2="223.333" y2="100" vector-effect="non-scaling-stroke"></line><line id="bc" data-route="["models","0","models","trapeze","paths","bc"]" x1="223.333" y1="100" x2="223.333" y2="200" vector-effect="non-scaling-stroke"></line><line id="cd" data-route="["models","0","models","trapeze","paths","cd"]" x1="223.333" y1="200" x2="173.333" y2="200" vector-effect="non-scaling-stroke"></line><line id="da" data-route="["models","0","models","trapeze","paths","da"]" x1="173.333" y1="200" x2="23.333" y2="0" vector-effect="non-scaling-stroke"></line></g></g><g id="gray" stroke="gray" style="stroke: gray; fill: none;"><g id="LineL_lp"><line id="line_L" data-route="["models","LineL_lp","paths","line_L"]" x1="23.333" y1="235" x2="223.333" y2="235" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="LineL1_lp"><line id="line_L1" data-route="["models","LineL1_lp","paths","line_L1"]" x1="173.333" y1="210" x2="223.333" y2="210" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="LineH_lp"><line id="line_H" data-route="["models","LineH_lp","paths","line_H"]" x1="13.333" y1="200" x2="13.333" y2="0" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="LineH1_lp"><line id="line_H1" data-route="["models","LineH1_lp","paths","line_H1"]" x1="233.333" y1="200" x2="233.333" y2="100" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line0_hl"><line id="line_0" data-route="["models","Line0_hl","paths","line_0"]" x1="23.333" y1="0" x2="23.333" y2="235" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line1_hl"><line id="line_1" data-route="["models","Line1_hl","paths","line_1"]" x1="223.333" y1="200" x2="223.333" y2="235" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line2_hl"><line id="line_2" data-route="["models","Line2_hl","paths","line_2"]" x1="173.333" y1="200" x2="13.333" y2="200" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line3_hl"><line id="line_3" data-route="["models","Line3_hl","paths","line_3"]" x1="23.333" y1="0" x2="13.333" y2="0" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line4_hl"><line id="line_4" data-route="["models","Line4_hl","paths","line_4"]" x1="173.333" y1="200" x2="173.333" y2="210" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line5_hl"><line id="line_5" data-route="["models","Line5_hl","paths","line_5"]" x1="223.333" y1="200" x2="223.333" y2="210" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line6_hl"><line id="line_6" data-route="["models","Line6_hl","paths","line_6"]" x1="223.333" y1="200" x2="233.333" y2="200" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g><g id="Line7_hl"><line id="line_7" data-route="["models","Line7_hl","paths","line_7"]" x1="223.333" y1="100" x2="233.333" y2="100" stroke="gray" style="stroke:gray" vector-effect="non-scaling-stroke"></line></g></g><g id="captions"><text alignment-baseline="middle" text-anchor="middle" transform="rotate(0,123.333,248.333)" x="123.333" y="248.333" style="stroke: none; fill: black;">L: 200</text><text alignment-baseline="middle" text-anchor="middle" transform="rotate(0,198.333,223.333)" x="198.333" y="223.333" style="stroke: none; fill: black;">L1: 50</text><text alignment-baseline="middle" text-anchor="middle" transform="rotate(270,0,100)" x="0" y="100" style="stroke: none; fill: black;">H: 200</text><text alignment-baseline="middle" text-anchor="middle" transform="rotate(270,246.667,150)" x="246.667" y="150" style="stroke: none; fill: black;">H1: 100</text></g></g></g></svg>
Конвертирую:
$imagick = new \Imagick();
$svg = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' . (ShapeController::getShapeParametersOnObject($shape->parameters))->svg->value;
$imagick->readImageBlob($svg);
$imagick->setImageFormat("png");
$imagick->adaptiveResizeImage(400, 400);
$jpeg = $imagick->getImagesBlob();
На выходе:
Что за я забыл или не правильно указал? Или чего-то не понимает Imagick?
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Подскажите пожалуйста, есть такой код авторизации на сайте
День добрыйОбновляю Laravel и ловлю эту ошибку (ErrorException in helpers
Есть ли вариант функции array_change_key_case(), работающий со вложенными массивами?