SVG to PNG -> IMagick 1px Bug?

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
bl5000
Posts: 5
Joined: 2012-03-16T04:08:23-07:00
Authentication code: 8675308

SVG to PNG -> IMagick 1px Bug?

Post by bl5000 »

Hello and greetings from Germany.

I have a problem with Imagick and wanted to ask whether this is a bug or if "I" am the above offender.

I am creating an SVG file with PHP which is structured like this:

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="6142px" height="1299px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<image x="0px" y="0px" xlink:href="L.png" width="561px" height="1299px" />
<image x="561px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="563px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="565px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="567px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="569px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="571px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="573px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="575px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="577px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="579px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="581px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="583px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="585px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="587px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="589px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="591px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="593px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="595px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="597px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="599px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="601px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="603px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="605px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="607px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="609px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="611px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="613px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="615px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="617px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="619px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="621px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="623px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="625px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="627px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="629px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="631px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="633px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="635px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="637px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="639px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="641px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="643px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="645px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="647px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="649px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="651px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="653px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="655px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="657px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="659px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="661px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="663px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="665px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="667px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="669px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="671px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="673px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="675px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="677px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="679px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="681px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="683px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="685px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="687px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="689px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="691px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="693px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="695px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="697px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="699px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="701px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="703px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="705px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="707px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="709px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="711px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="713px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="715px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="717px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="719px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="721px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="723px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="725px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="727px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="729px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="731px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="733px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="735px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="737px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="739px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="741px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="743px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="745px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="747px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="749px" y="0px" xlink:href="O.png" width="561px" height="1299px" />
<image x="1310px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1312px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1314px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1316px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1318px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1320px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1322px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1324px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1326px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1328px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1330px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1332px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1334px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1336px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1338px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1340px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1342px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1344px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1346px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1348px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1350px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1352px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1354px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1356px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1358px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1360px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1362px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1364px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1366px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1368px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1370px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1372px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1374px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1376px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1378px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1380px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1382px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1384px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1386px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1388px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1390px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1392px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1394px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1396px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1398px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1400px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1402px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1404px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1406px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1408px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1410px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1412px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1414px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1416px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1418px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1420px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1422px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1424px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1426px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1428px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1430px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1432px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1434px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1436px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1438px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1440px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1442px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1444px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1446px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1448px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1450px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1452px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1454px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1456px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1458px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1460px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1462px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1464px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1466px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1468px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1470px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1472px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1474px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1476px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1478px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1480px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1482px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1484px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1486px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1488px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1490px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1492px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1494px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1496px" y="0px" xlink:href="@.png" width="1px" height="1299px" />
<image x="1498px" y="0px" xlink:href="L.png" width="561px" height="1299px" />
</g>
</svg>
Next, I convert the SVG file with Imagick in the PNG format. The graphics look good but there are graphics that "only" 1px wide are not converted. The SVG file is saved with every browser and every SVG program normally (as I will) but represented Imagick would not take into account the graphics 1px wide.

Why?

Here the Imagick code:

Code: Select all

$thumb = new Imagick();
$thumb->readImage('test.svg');
$thumb->writeImage('test.png');
$thumb->clear();
$thumb->destroy();
I do not work with classical paths or objects but simply with the image tag. But yes, they can see in the code.

Please excuse my bad English (google translate).

Many greetings.

bl5000

PS:
I use the following version of imagick:
http://www.abload.de/img/imagickde1lj.png
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: SVG to PNG -> IMagick 1px Bug?

Post by glennrp »

There have been many bug fixes to the PNG encoder since version 6.5.7.
One of those bugs might be causing the behavior you are seeing.
bl5000
Posts: 5
Joined: 2012-03-16T04:08:23-07:00
Authentication code: 8675308

Re: SVG to PNG -> IMagick 1px Bug?

Post by bl5000 »

I have my server hoster (no dedicated server! Is a webspace package!) Wrote an e-mail and asked to install the latest version imagick.

answer when I got the following.

I say to them:
5.x: /usr/bin/
4.2.9: /usr/bin/ImageMagick_4.2.9/
6.2.6: /usr/bin/ImageMagick_6.2.6/
6.7.1: /usr/bin/ImageMagick_6.7.1/
use for the newer versions.

But as I do that? yes no I use "exec" but the imgaick version (see first contribution) can you speak with php.

what can I do now?
bl5000
Posts: 5
Joined: 2012-03-16T04:08:23-07:00
Authentication code: 8675308

Re: SVG to PNG -> IMagick 1px Bug?

Post by bl5000 »

Bug? Yes or No?
Post Reply