gographics/imagick — pull request #9 by justinfx (2014-01-02 05:53:59+00:00)
Title: Fixes #5 (Reverses #8) - ExportImagePixels returns data; ImportImagePixels properly type asserts

The fixes added via Issue #8 ended up being redundant with existing API functionality. This patch fixes Issue #5, and removed the changes from #8

**Changes:**

`ExportImagePixels` now properly creates the right type of slice data, and returns it as an `interface{}` instead of `[]interface{}`. There is much less work involved to type assert to a slice, versus looping and building value-by-value. Performance is around 12ms now vs the ~95ms from the previous #8 method

`ImportImagePixels` was actually hanging when trying to pass the interface directly to C. Changes were made to again accept a slice as `interface{}`, and type assert to pass the right pointer type to C.