{"id":4397,"date":"2012-06-19T08:34:58","date_gmt":"2012-06-19T12:34:58","guid":{"rendered":"http:\/\/esr.ibiblio.org\/?p=4397"},"modified":"2014-03-10T15:34:09","modified_gmt":"2014-03-10T19:34:09","slug":"giflib-5-0-0-is-released","status":"publish","type":"post","link":"http:\/\/esr.ibiblio.org\/?p=4397","title":{"rendered":"GIFLIB 5.0.0 is released"},"content":{"rendered":"<p>I&#8217;ve just shipped the 5.0.0 release of GIFLIB, a graphics service library that is deployed pretty much everywhere that throws pixels on a display. Older versions live in your browser, your game console, and your smartphone.  I have written about what it was like to go back to this code after 18 years previously, in <a href=\"http:\/\/esr.ibiblio.org\/?p=4304\">The Long Past of C<\/a>; also in my <a href=\"http:\/\/esr.ibiblio.org\/?p=4351#more-4351\">4.2.0 release announcement<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>This version, as promised, fixes the portion of the API handling GIF extension blocks.  I made one other change that is visible and not backward-compatible; the GIF file opener functions now take a final pointer-to-int where they&#8217;ll deposit an error code if they fail.<\/p>\n<p>The reason for this change was to make the library fully thread-safe. The old API featured a shared static error cell analogous to Unix errno, but I actually got a bug report reminding me that is really not good design practice in the 21st century.  Functions that operate on an existing (GifFileType *) set a new Error member when they fail, but the file-openers can&#8217;t do that &#8211; they return a null (GifFileType *) on failure, and changing <em>that<\/em> would have caused all kind of subtle problems for which client-application developers would rightly have cursed me.<\/p>\n<p>Other new features include direct support for editing GIF89 graphics control blocks (yes, this is a feature we should have had in 1990), interlace handling in the DGifSlurp()\/EGifSpew() high-level interface, and better handling of trailing extension blocks not attached to an image.<\/p>\n<p>I also tossed out a lot more utility code.  Basically, if a utility duplicated something that ImageMagick convert(1) or the Python Imaging Library can do, I threw it away.  Those projects specialize in image composition and transforms and they do it very well; there&#8217;d be less than no point in trying to compete with them, especially since they&#8217;re using GIFLIB internally anyway.<\/p>\n<p>Another important feature is that GIFLIB now has a really stringent regression-test suite (I spent a lot of the last couple of weeks on this). It&#8217;s also Coverity and cppcheck clean.  So I&#8217;m expecting this code to be pretty stable. It would suit me fine if I didn&#8217;t have to think about it for another 18 years.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve just shipped the 5.0.0 release of GIFLIB, a graphics service library that is deployed pretty much everywhere that throws pixels on a display. Older versions live in your browser, your game console, and your smartphone. I have written about what it was like to go back to this code after 18 years previously, in&hellip; <a class=\"more-link\" href=\"http:\/\/esr.ibiblio.org\/?p=4397\">Continue reading <span class=\"screen-reader-text\">GIFLIB 5.0.0 is released<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,13],"tags":[],"class_list":["post-4397","post","type-post","status-publish","format-standard","hentry","category-new-on-my-website","category-software","entry"],"_links":{"self":[{"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=\/wp\/v2\/posts\/4397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4397"}],"version-history":[{"count":2,"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=\/wp\/v2\/posts\/4397\/revisions"}],"predecessor-version":[{"id":5381,"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=\/wp\/v2\/posts\/4397\/revisions\/5381"}],"wp:attachment":[{"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4397"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/esr.ibiblio.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}