MyrionPhoenixmoon / scenarioo

Automated documentation of applications through UI tests
www.scenarioo.org
Other
2 stars 0 forks source link

Download Sketch as PNG / SVG file and show PNG in preview #141

Open parabolika66 opened 9 years ago

parabolika66 commented 9 years ago

Tasks:

https://xmlgraphics.apache.org/batik/

parabolika66 commented 9 years ago

@MyrionPhoenixmoon: PNG preview of sketch does not work after gradle 'refresh all' - what am I missing? Thx.

adiherzog commented 9 years ago

@MyrionPhoenixmoon I have the same problem that @parabolika66 has. This is the error I see in the Tomcat console.

ERROR org.scenarioo.dao.design.DesignFiles: Could not transcode SVG to PNG.
ERROR org.scenarioo.dao.design.DesignFiles: org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
Attribute "xmlns:xlink" was already specified for element "image".

It seems to be a problem with the double / triple declaration of xmlns:xlink. For which browser did we add this again?

adiherzog commented 9 years ago

The conversion to PNG seems to work if the sketch contains drawing elements, but it does not work if one creates an empty sketch with only the original image.

I also noticed that converting the SVG to PNG seems to slow down saving the sketch. Could you please measure, how long it actually takes? It would probably be a good idea to do the conversion asynchronously after the SVG is saved.

adiherzog commented 9 years ago

What I just wrote about the conversion is wrong. It seems to fail quite randomly...

MyrionPhoenixmoon commented 8 years ago

PNG preview has been fixed.

As for the download, would a fixed URL listed in "Share this Page" be enough?

adiherzog commented 8 years ago

I merged the latest version from develop into this fork.

There's still an issue with the SVG to PNG conversion. I get this error when using Chrome:

ERROR org.scenarioo.dao.design.DesignFiles: SketchStep SVG directory not created.
ERROR org.scenarioo.dao.design.DesignFiles: Could not transcode SVG to PNG.
ERROR org.scenarioo.dao.design.DesignFiles: org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
Attribute "xmlns:xlink" was already specified for element "image".

Regarding the download: Yes I think the "Share this Page" popup is a good location for a download link.

MyrionPhoenixmoon commented 8 years ago

Sorry, but I cannot reproduce the error. On my machine, this works in Chrome and Firefox, and using Browserstack (thanks again, @parabolika66 ! I hope you don't mind me using it for this.) it works in IE 11 and Safari...

What steps did you take to get to this error?

parabolika66 commented 8 years ago

no worries!

* marlene wittwer

Am 24.11.2015 um 21:50 schrieb Mark Z notifications@github.com:

Sorry, but I cannot reproduce the error. On my machine, this works in Chrome and Firefox, and using Browserstack (thanks again, @parabolika66 ! I hope you don't mind me using it for this.) it works in IE 11 and Safari...

What steps did you take to get to this error?

— Reply to this email directly or view it on GitHub.

adiherzog commented 8 years ago

I will test it again and let you know whether it's actually still an issue.