<div dir="ltr"><div><div><div>Glad to see people working on this! I already have a functioning almost-pure Swift <a href="https://github.com/kelvin13/maxpng" target="_blank">PNG library</a>, and a <a href="https://github.com/kelvin13/jpeg" target="_blank">JPEG library</a> is a month or two away. I’m glad someone is hacking away at some sort of rasterization engine (like cairo for C/C++). The way I see a lot of these graphics libraries is they live in a sort of “tech tree” and a lot of them depend on support higher up the tree, like in a video game. For now we seem to be filling in a lot of the top row with C libraries which doesn’t always work too well (like in the case of zlib).<br><br></div><span style="font-family:monospace,monospace">   Rasterizer          File I/O, path manipulation</span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"> </span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">+</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace"> </span><span style="font-family:monospace,monospace"></span>LZ77 compression<br></span></div><span style="font-family:monospace,monospace">[{cairo equiv.}]        [{file manager lib}, <a href="https://github.com/kelvin13/url">URL</a>]        |     [{zlib equiv.}]</span></div><div><span style="font-family:monospace,monospace">    |                         <wbr>     |                     |<br></span></div><div><span style="font-family:monospace,monospace">    |         +——</span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">—</span></span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—+</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">+</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace"><wbr>—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">+        +——</span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">——</span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">——</span></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">——</span></span></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">——</span></span></span></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">——</span></span></span></span></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">——+</span></span></span></span></span></span> </span><span style="font-family:monospace,monospace"></span></div><div><span style="font-family:monospace,monospace">    |         |         |          |            |        |              |<br></span></div><div><span style="font-family:monospace,monospace">    |        XML      HTML      TTF/OTF       JPEG      PNG           GZIP<br></span></div><div><span style="font-family:monospace,monospace">    |    [<a href="https://github.com/kelvin13/swiftxml">swiftxml</a>]  [{???}]    [{???}]      [<a href="https://github.com/kelvin13/jpeg">JPEG</a>]   [<a href="https://github.com/kelvin13/maxpng">MaxPNG</a>]  [{archiving lib}]<br></span></div><div><span style="font-family:monospace,monospace">    |        |                     |                                    |</span><br><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">    +</span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">————————</span>|</span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">—————</span></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">—————</span></span></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">—————</span></span></span>+</span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">————</span></span></span></span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">—</span></span></span></span></span>+</span></span><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace"><wbr>—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">+</span><span style="font-family:monospace,monospace"><wbr>—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace"><wbr>—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">—</span><span style="font-family:monospace,monospace">+</span></div><div><span style="font-family:monospace,monospace">    +——+—————+</span><span style="font-family:monospace,monospace">               |                         |</span><span style="font-family:monospace,monospace"></span></div><div><span style="font-family:monospace,monospace">       |                     |                         |<br></span></div><div><span style="font-family:monospace,monospace">      SVG              Text renderer                  WOFF</span></div><div><span style="font-family:monospace,monospace">    [{???}]         [{freetype equiv.}]              [{???}]<br></span></div><span style="font-family:monospace,monospace"></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 9, 2017 at 9:25 AM, Benjamin Spratling via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Sound great!  </div><div><br></div><div>Last week I started working on a pure-swift graphics library, one goal being fast server-side graphics manipulations, and already have .png decode/encode, and quadratic bezier curve stroking implemented, slowly, and poorly.  I’m working on TrueType fonts right now, and intend to open it to other developers once the basic architecture is refined.  I intend to add SVG and JPEG support as well.  It seems like if there is a “swift-community blessed geometry library”, this would be a natural extension of that, or at least depend on it.</div><div><br></div><div>Much of this depends on compression support, which I’ve already published a first cut of at <a href="https://github.com/benspratling4/SwiftFoundationCompression" target="_blank">https://github.com/<wbr>benspratling4/<wbr>SwiftFoundationCompression</a> .  The goal there was a more “foundation” idea of compression than competing libraries, but it suffers from a lack of streaming support.</div><div><br></div><div>I would absolutely love a “BigNum” library.  Several encryption packages out there would benefit from it as well.  It seems arithmetic compression libraries would benefit, too.  Other useful Numeric types would include rational fractions, fixed-point, and short floats (Float16 is what Apple now thinks the future of images is, right?).  I’m happy to contribute; I end up writing those in a new language ever few years anyway.</div><div><br></div><div>-Ben Spratling</div><div><br></div><br><div><blockquote type="cite"><span class=""><div>On Nov 7, 2017, at 12:54 PM, Dave DeLong via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_2455006491265199444Apple-interchange-newline"></span><div><div style="word-wrap:break-word;line-break:after-white-space">Hi Swift-Evolution,<br>...<span class=""><br><br>We propose to create an open-sourced &quot;Non-Standard Library&quot; effort that coexists with, coordinates with, and is blessed by the open source Swift development community. The &quot;Non-Standard Library&quot; will offer a well-curated, high-value collection of routines, types, and documentation to support Swift development on all platforms.<br></span>…</div></div></blockquote><span class=""><br><blockquote type="cite"><div><div style="word-wrap:break-word;line-break:after-white-space"><b>Suggested Libraries</b><br><br>There are several areas we think that are ripe for improvement and implementation as a non-standard library, such as (but not limited to):<br><div><ul><li>A BigNum library</li><li>A full-featured Random library</li><li>A simplified date/time library</li><li>A library for manipulating paths (that is not based on URL or String)</li><li>An expanded Swift-native Geometry library and so forth.</li></ul></div>The scope and extent of the sublibraries would be proposed and debated on a parallel Non-Standard Library Evolution development list.<br></div></div></blockquote></span></div><br></div><br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div>