GeertJohan/go.leptonica — pull request #4 by robertmeta (2014-10-26 19:57:46+00:00)
Title: Added a WriteBytes function (WriteMem)

WriteBytes is a wrapper around WriteMem that lets you use
leptonica to change formats without persisting to disk.

I am not 100% certain I got this one right, but I gave it a shot...

I use it to convert tiff (format 4, unsupported by go.image) to png in memory.