Code contributed by LibRaw users