Copyright | (c) Tom Westerhout 2023 |
---|---|
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
This package allows you to use JuicyPixels
together with halide-haskell.
It defines IsHalideBuffer
instances for Image
and
MutableImage
types from the JuicyPixels library.
That allows you to write code such as:
kernel :: Ptr (HalideBuffer
3 Word8) -> Ptr (HalideBuffer
3 Word8) -> IO () kernel = ... brighten ::Image
PixelRGB8
->MutableImage
RealWorld
PixelRGB8
-> IO () brighten input output = dowithHalideBuffer
3
Word8 input $ input' ->withHalideBuffer
3
Word8 output $ output' -> kernel input' output'
Orphan instances
(Pixel a, r ~ PixelBaseComponent a, IsHalideType r) => IsHalideBuffer (Image a) 3 r Source # | |
withHalideBufferImpl :: Image a -> (Ptr (HalideBuffer 3 r) -> IO b) -> IO b | |
(Pixel a, r ~ PixelBaseComponent a, IsHalideType r) => IsHalideBuffer (MutableImage RealWorld a) 3 r Source # | |
withHalideBufferImpl :: MutableImage RealWorld a -> (Ptr (HalideBuffer 3 r) -> IO b) -> IO b |