I think this should be discussed at sage-devel. On Wednesday, June 28, 2023 at 8:49:51 AM UTC-7 vdelecroix wrote:
> I agree with Marc that svg is almost always preferable than png for > graphics : it scales and compresses. Thanks for raising the issue. > > Do you have a concrete proposal for making the change png -> svg > happen? I guess there is a lot of files that would be involved in the > transition. > > Vincent > > On Wed, 28 Jun 2023 at 16:23, Marc Culler <marc....@gmail.com> wrote: > > > > Details really do matter. The devil is in them. Here is one which makes > a major difference to my efforts to distribute Sage. I hope that I can > convince people to pay attention to it. > > > > DETAIL: An svg image can be compressed very efficiently and will look > good at all resolutions. A png image can not be compressed, being already > compressed, and pixelates at high resolutions. > > > > BACK STORY: I am working on adding documentation to the Sage_macOS > distribution. Size is important. For 10.1beta3 the English documentation > occupied 631MB, and compressed down to 104MB. For 10.1beta4 the > uncompressed size increased by over 100MB due to the addition of 100MB of > png images. Now it only compresses to 207MB, doubling the compressed size. > > > > There is no need for this wastefulness. Here is an example: > > > > sage: D = graphs.DodecahedralGraph() > > sage: p = D.plot() > > sage: p.save_image('/tmp/dodec.svg') > > sage: p.save_image('/tmp/dodec.png') > > > > The result: > > % ls -l /tmp/dodec* > > -rw-r--r--@ 1 culler wheel 42735 Jun 28 08:48 /tmp/dodec.png > > -rw-r--r-- 1 culler wheel 18524 Jun 28 08:48 /tmp/dodec.svg > > % gzip /tmp/dodec* > > % ls -l /tmp/dodec* > > -rw-r--r--@ 1 culler wheel 39473 Jun 28 08:48 /tmp/dodec.png.gz > > -rw-r--r-- 1 culler wheel 3815 Jun 28 08:48 /tmp/dodec.svg.gz > > > > BOTTOM LINE: we get more than a 90% reduction in size simply by choosing > to use the .svg extension when saving the plot instead of the .png > extension. > > > > I am not allowed to upload an svg file to google groups, so you will > have to verify for yourself that the svg looks better than the png, but it > does. > > > > - Marc > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "sage-release" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to sage-release...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-release/8ce7a804-3be1-4551-959e-cc770fe589ecn%40googlegroups.com > . > -- You received this message because you are subscribed to the Google Groups "sage-release" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-release+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-release/70d5389f-97ae-490e-b57f-3838a737114an%40googlegroups.com.