Rendering error on OCAL website

Bug #1045790 reported by Antonio Roberts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
librsvg
Fix Released
Unknown
librsvg (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I uploaded an SVG that is a map of the UK and Ireland http://openclipart.org/detail/171939/uk-and-ireland-by-hellocatfood-171939 It was generated in Inkscape and then cleaned up using SVG Cleaner

In Inkscape, GIMP and the Firefox SVG preview it displays correctly, but on OCAL it looks very weird!

Steps to reproduce:
Download the original SVG https://bugs.launchpad.net/librsvg/+bug/1045790/+attachment/3302221/+files/uk-ireland-vector_original.svg
Download and install SVG Cleaner https://github.com/RazrFalcon/SVGCleaner/
Run SVG Cleaner on the folder containing the SVG
Look at the thumbnail preview on programs that use librsvg (Open Clip Art Library, Nautilus)

Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote : Re: [Bug 1045790] [NEW] Rendering error on OCAL website

We use rsvg program to convert svg to png, rsvg is standard program on
Linux that use Cario library (the only library, I think, for Linux that
can be used). The image look the same on GTK as thumbnail, Browsers
have they own rendering libraries for SVG (the same as for html), the
same Inkscape because he need to manipulate svg so he can't just render
it, but if you export that image from Inkscape you will probably see the
same (on Windows it can be different I don't know if Windows version on
Inkscape use cairo).

You can ask on Cairo forum or mailing list why it's happening, with the
file maybe it's a bug in Cairo or the library don't support something.
We can't do anything about it.

In what program it was created?

On Tue, 04 Sep 2012 12:16:27 -0000
Antonio Roberts <email address hidden> wrote:

> Public bug reported:
>
> I uploaded and SVG that is a map of the UK
> http://openclipart.org/detail/171939/uk-and-ireland-by-
> hellocatfood-171939 It was generated in Inkscape and then cleaned up
> using SVG Cleaner
> (http://libregraphicsworld.org/blog/entry/introducing- svg-cleaner )
>
> In Inkscape, GIMP and the Firefox SVG preview it displays correctly,
> but on OCAL it looks very weird!
>
> ** Affects: openclipart
> Importance: Undecided
> Status: New
>

--
Jakub Jankiewicz, Web Developer
http://jcubic.pl

Revision history for this message
Antonio Roberts (hellocatfood) wrote :

The file was created in Inkscape and then cleaned up with SVG Cleaner. I tried rendering that same SVG and it looked fine - no errors

Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote :

Do you have the same error before you clean it up with SVG Cleaner? Did you try to save it as cleaned svg or Inkscape svg?

Changed in openclipart:
status: New → Confirmed
assignee: nobody → Jakub Jankiewicz (jcubic)
Revision history for this message
Oleg Koptev (koptev-oleg) wrote : Re: [Bug 1045790] Re: Rendering error on OCAL website

I have this problem after SVG Cleaner not only in OCAL, but also in GNOME
(Cairo), the previews are shown bad or not shown at all - clean white
rectangle.
So I suppose it is something weird with SVG Cleaner itself.

Revision history for this message
Antonio Roberts (hellocatfood) wrote :

I don't have the original file anymore, but generally I don't get any errors when cleaning files in Inkscape and viewing them elsewhere.

It possibly is an error with SVG cleaner, but the SVG file is valid SVG 1.1 - checked with W3C Markup Validation Service (This document was successfully checked as SVG 1.1 + IRI + XHTML5 + MathML 3.0! )

To me, this suggests that the renderer (librsvg) is at fault.

Revision history for this message
Oleg Koptev (koptev-oleg) wrote :

Me too have no problems with garbage cleaning in Inkscape, but when dealing
with SVG Cleaner it is sometimes produced 'bad' SVGs. Of course it could be
error in librsvg or Cairo or smth else, but I don't use SVG Cleaner anymore
to be on safe side.

Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote :

I just check SVG Cleaner with some files, most of them are rendered
wrong after clean, I notice that with standard options it change d
attribute of the paths, so it basically change to path, to be simpler,
and probably there is bug in that. You can report that to SVG Cleaner
team.

I fix you svg, I put it into Inkscape, remove all groups and do
outset+inset so Inkscape recalculate path and that fix the problem.
I'm attaching fixed svg to that email, so you can upload it again
(I don't know if launchpad all for attachments), in future we will have
svg editor in OCAL so we will be able to copy past fixed svg.

And in future if you use SVG Cleaner make sure that cairo will render
that image properly. I check if that all clipart look fine with cairo
when you select "Keep existing paths data".

On Fri, 07 Sep 2012 11:43:39 -0000
Oleg Koptev <email address hidden> wrote:

> Me too have no problems with garbage cleaning in Inkscape, but when
> dealing with SVG Cleaner it is sometimes produced 'bad' SVGs. Of
> course it could be error in librsvg or Cairo or smth else, but I
> don't use SVG Cleaner anymore to be on safe side.
>

--
Jakub Jankiewicz, Web Developer
http://jcubic.pl

Changed in openclipart:
status: Confirmed → Invalid
Revision history for this message
Antonio Roberts (hellocatfood) wrote :
no longer affects: librsvg
description: updated
Revision history for this message
Antonio Roberts (hellocatfood) wrote :

@Jakub

I've updated the description with the original SVG and steps to reproduce the errors. Additionally, I've linked to a bug report for rsvg where the developers admit that this display error is due to a bug in the renderer and not the SVG. Therefore, this SVG is not "bad".

Doing outset and inset doesn't "fix" the SVG as it modifies the path. For example,. the Ireland map is 2718 nodes. After doing an outset and inset the number of nodes is 273 nodes. It results in a smaller file size but it is no longer the same as the original.

Revision history for this message
Jakub T. Jankiewicz (jcubic) wrote :

How much it's different from original, when you look at it when zooming? SVG Cleaner too modify svg because it modify paths (d atribute, and that't the whole problem). You can try to use different modification to fix your svg, or try to reverse modifications done by SVG Cleaner.

I think that this bug should not be reported here but for SVG Cleaner or Cario library. The reason for this may be because, one of those library don't implement SVG Specification right. I think that Cairo is more mature libary and SVG Cleaner is still unstable I think, and in this case SVG Cleaner should make svg that will work on cairo.

Changed in librsvg:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in librsvg:
status: Confirmed → Expired
Changed in librsvg (Ubuntu):
status: New → Triaged
importance: Undecided → High
madbiologist (me-again)
Changed in librsvg:
importance: Medium → Unknown
status: Expired → Unknown
Changed in librsvg:
status: Unknown → Fix Released
Changed in librsvg (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.