Opened 14 years ago
Closed 14 years ago
#405 closed task (fixed)
Should we support both svg and png formats for plots?
Reported by: | Jari Häkkinen | Owned by: | Peter Johansson |
---|---|---|---|
Priority: | major | Milestone: | svndigest 0.8 |
Component: | output | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
Make the format selectable. Should the png format be default?
Change History (18)
comment:1 follow-up: 2 Changed 14 years ago by
comment:2 follow-up: 3 Changed 14 years ago by
Description: | modified (diff) |
---|
Replying to peter:
I suppose it's a good idea to let png be default just as before.
I knew you'd say that. I'll probably be producing svg myself all the time.
I think we should avoid supporting an infinite number of formats because it will be a nightmare to avoid regressions. So png, svg, and perhaps pdf is enough for me.
Leaning on plplot I think it is trivial to support the format supported by plplot. But I agree png, svg and pdf will be enough.
comment:3 Changed 14 years ago by
comment:4 follow-up: 5 Changed 14 years ago by
comment:5 follow-up: 6 Changed 14 years ago by
Replying to peter:
Virtually everyone should find svg preferable over png, so why not make svg default... If we state it clearly in NEWS and make it easy to change format in config file, I think it should be fine to change (read improve) the behavior.
The svg files look really nice but they are really large. The summary plot for svndigest-trunk is over 1MB. Hm, should we generate png and svg and let the user decide which one to see in his browser?
comment:6 Changed 14 years ago by
Replying to jari:
The svg files look really nice but they are really large. The summary plot for svndigest-trunk is over 1MB. Hm, should we generate png and svg and let the user decide which one to see in his browser?
No reason to generate something user won't display. I think we should generate either png or svg, and which is decided in config file. What should be default for this then? The fact that SVGs are that large make me think it might be better to stay with png as default.
For larger projects the output will get huge. The base output, for example, contains more than 27,000 images. If each of them is ~1MB we have 27GB output, but the images for Nodes are likely larger because they have more plot lines than the summary plot (which only has 3).
comment:7 Changed 14 years ago by
Thinking that there surely must be compressed svg I browsed the we and found out that there is a standard for compressing svg with gzip ... svgz files. I examined the compression ratio for the summary_plot.svg and found it to be almost a factor 40!
#> ls -sh summary_plot.svg* 1.2M summary_plot.svg 32K summary_plot.svgz
That's more like it. The downside is that browser cannot natively handle svgz files. I tried to find information on when to expect firefox/gecko to support compressed svg but failed to find any. I made some test to browse html files with svgz rather than svg, it looked promising - firefox said that it needed to install a plug-in to display the content. Clicking on the plug-in link simply reported no plug-in found.
In conclusion, we should probably add support for svg/svgz and png. Set png as default format, create a new ticket about switching to svgz when it gets supported.
comment:8 Changed 14 years ago by
Status: | new → assigned |
---|
comment:9 Changed 14 years ago by
comment:10 Changed 14 years ago by
Owner: | changed from Peter Johansson to Jari Häkkinen |
---|---|
Status: | assigned → new |
comment:11 Changed 14 years ago by
Owner: | changed from Jari Häkkinen to Peter Johansson |
---|---|
Status: | new → assigned |
comment:13 follow-up: 14 Changed 14 years ago by
comment:14 follow-up: 15 Changed 14 years ago by
Replying to peter:
Support for png images, which is now default. Using alhpa channel in plstream for png did not work well in any straghtforward way so made PNGs opaque.
What is the problem?
comment:15 Changed 14 years ago by
Replying to jari:
Replying to peter:
Support for png images, which is now default. Using alhpa channel in plstream for png did not work well in any straghtforward way so made PNGs opaque.
What is the problem?
When I used the svg code straight ahead
pls_.scolbga(255,255,255,0);
it gave an image with black background. From a web search it seems PNG should support alpha channel, but I did not look into the problem in more detail.
comment:16 follow-up: 17 Changed 14 years ago by
comment:17 Changed 14 years ago by
comment:18 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I suppose it's a good idea to let png be default just as before.
I think we should avoid supporting an infinite number of formats because it will be a nightmare to avoid regressions. So png, svg, and perhaps pdf is enough for me.