[Haskell-cafe] Image processing using Repa

2012-10-10 Thread Janek S.
I'm playing a bit with Repa library and its DevIL bindings. I tried to modify one of the examples from tutorial on HaskellWiki. I want to load an image, rotate it and save it to disk. I managed to write something like this: import Foreign.Ptr import System.Environment import Data.Array.Repa

Re: [Haskell-cafe] Image processing using Repa

2012-10-10 Thread Jake McArthur
You do not have to use computeIntoP. You can just use computeP followed by toForeignPtr (i don't remember the exact name for that and am on my phone so it would be awkward to look up). So Repa can create the buffer for you. Coincidentally, I didn't realize computeIntoP even existed, and I want it

Re: [Haskell-cafe] Image processing using Repa

2012-10-10 Thread Janek S.
You do not have to use computeIntoP. You can just use computeP followed by toForeignPtr (i don't remember the exact name for that and am on my phone so it would be awkward to look up). So Repa can create the buffer for you. Coincidentally, I didn't realize computeIntoP even existed, and I want