Ah, I thought you were referring to setjmp with this:<p>&gt; Some other image libraries are hard because they force you to write many code-paths to handle various different cases, but libpng provides many different helpers that make it pretty simple.<p>It seemed that you were thinking of error code handling as a &quot;code-path&quot; and setjmp&#x2F;longjmp being a mechanism to reduce code paths.<p>Anyway, it sounds like we&#x27;re in agreement. It&#x27;s not that big of a deal to use libpng directly, and &quot;worst API ever&quot; is too strong. The author has probably not done enough Windows API programming to find the worst API ever :-).