Module: Libpng::Binding

Extended by:
FFI::Library
Defined in:
lib/libpng/binding.rb

Overview

FFI bindings to the bundled libpng16.{so,dylib,dll}. Lives in its own autoloaded module so that requiring libpng (the top-level entry point used by ext/extconf.rb during the source-gem build) does NOT eagerly dlopen the shared library -- it may not exist yet at that point.

The first time an encoder or decoder references Libpng::Binding, this file loads, ffi_lib fires, and the FFI functions attach. From then on, calls go directly through the attached C functions.