4xx / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

Export as PNG has some subtle problems with relative gradients #608

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Insert "Callinectes sapidus (Blue crab) egg-bearing female" illustration 
from the Crustaceans palette of the IAN symbol libraries
2. Export as PNG
3.

What is the expected output? What do you see instead?
Shape same as original SVG. Shape with altered paths

In what browser did you experience this problem? (ALL, Firefox, Opera 10
Alpha, etc)

FF 3.6.6 shows the problem.
I tested in Chrome and they work fine.

Please provide any additional information below.
I have noticed this with at least a few illustrations from the IAN symbol 
libraries, so it is not just this one. 

I can try to track down what common features the problem files have, but since 
they all seem fine in Chrome, I am thinking it is just a FF bug.

Original issue reported on code.google.com by adrianbj...@gmail.com on 19 Jul 2010 at 5:22

GoogleCodeExporter commented 9 years ago
Actually I traced the problem down to a bug in CanVG when rendering the "S" 
path data sections, and the problem occurs in Chrome and Opera too. 

I have reported the issue there:
http://code.google.com/p/canvg/issues/detail?id=49

Original comment by adeve...@gmail.com on 21 Jul 2010 at 4:16

GoogleCodeExporter commented 9 years ago
Thanks for figuring out the problem, although I can't reproduce the problem in 
Chrome or Safari, at least not with the SVG I mentioned above. I am on Windows 
- not sure that would affect the CanVG bug though.

Original comment by adrianbj...@gmail.com on 21 Jul 2010 at 6:06

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/canvg/issues/detail?id=49#makechanges

I just grabbed the just "fixed" CanVG file and I am still getting the same 
problem with the crab test file. I can report on their issues page if you like, 
but thought it might be better if you keep the dialog going.

Original comment by adrianbj...@gmail.com on 26 Jul 2010 at 5:10

GoogleCodeExporter commented 9 years ago
adrianbjones - one thing you can do is to try and simplify the crab file down 
to the smallest document that still exhibits a problem when converting using 
canvg.  Looks like Alexis had found at least one problem but it sounds like 
there must be others.

Original comment by codedr...@gmail.com on 26 Jul 2010 at 5:21

GoogleCodeExporter commented 9 years ago
Yeah, what codedread said. Was hoping the one test case I had reduced the 
problem was representative, but guess not.

Original comment by adeve...@gmail.com on 26 Jul 2010 at 1:34

GoogleCodeExporter commented 9 years ago
Ok, I will post some code to the CanVG bug report with some simple examples 
that still have problems with their latest revision.

Original comment by adrianbj...@gmail.com on 26 Jul 2010 at 5:34

GoogleCodeExporter commented 9 years ago
Is this still a bug? I just tested the blue crab and it seemed to work for me 
in FF3.6...but I see a related CanVG issue is still open: 
http://code.google.com/p/canvg/issues/detail?id=50

Original comment by adeve...@gmail.com on 28 Sep 2010 at 11:07

GoogleCodeExporter commented 9 years ago
There are still some issues with relative gradients - r75 of canVG took care of 
most of the issues, but some subtle gradient changes do still happen in some 
situations, so I would like to keep this open for the moment. I have changed 
the summary to reflect the remaining issue.

This code (also posted to the CanVG bug report - although I changed the color 
of one of the stops here to emphasize the problem) shows the problem. Note the 
distinct band that shows in the PNG.

<svg width="640" height="480" xmlns="http://www.w3.org/2000/svg">
 <g>
  <title>Layer 1</title>
  <g>
   <linearGradient id="ian_symbols_c69469c6226f2554cdb79de068283c3b" x1="7.71478" y1="-4.56464" x2="8.62905" y2="-4.56464" gradientTransform="matrix(0.3854, -0.5528, -0.5528, -0.3854, 20.8291, 344.152)">
    <stop offset="0.0057" stop-color="#008DC8"/>
    <stop offset="0.0143" stop-color="#008FC8"/>
    <stop stop-color="#9999CC" offset="0.0686"/>
   </linearGradient>
   <path d="m395.879,52.919c4.005,2.455 16.69299,14.388 14.66,31.047c-2.026,16.659 -11.98001,28.45 -17.70599,27.675c-5.73199,-0.758 -14.694,-18.666 -13.504,-26.209c1.18298,-7.531 0.59799,-18.906 5.603,-24.774c4.99799,-5.889 10.94699,-7.739 10.94699,-7.739z" stroke-width="0.25" stroke="#837029" fill="url(#ian_symbols_c69469c6226f2554cdb79de068283c3b)"/>
  </g>
 </g>
</svg>

Original comment by adrianbj...@gmail.com on 28 Sep 2010 at 11:49