> 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
> for what I'm doing!
I managed to fix my code - thanks! The main function now reads:

main = do
    [f] <- getArgs
    (RGB v) <- runIL $ readImage f
    rotated <- (computeP $ rot180 v) :: IO (Array RFP.F DIM3 Word8)
    runIL $ writeImage ("flip-"++f) (RGB rotated)

Jan

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to