I once had the same problem, and I could not find a good solution, so my answer would probably be inappropriate. My workaround was to use the bmp package, process the contents of bmp manually (using ByteString ), and then convert it to a glossy bitmap using bitmapOfBMP . For example, it was a function to mix a bitmap with color:
recolor :: (Float, Float, Float) -> BMP -> BMP recolor (rc, gc, bc) bmp@BMP {bmpRawImageData = raw} = bmp {bmpRawImageData = B.pack $ process $ B.unpack raw} where process (b:g:r:a:xs) = (mul b bc):(mul g gc):(mul r rc):a:process xs process xs = xs mul c cc = round $ cc * fromIntegral c
That was enough for me at that time, so I stopped finding the best solution. If you find something, share it.
Yuuri source share