I am using the DevIL library to read and write images. The problems is that I want to overwrite the file if it already exists.
Here is my code:
(RGB v) <- runIL $ readImage "/foo/foo.png"
let rotated = (computeS $ batman v) :: Array F DIM3 Word8
runIL $ writeImage ("/foo/foo.png") (RGB rotated)
How can I achieve that? Can I do this or do I have to think of another way? It is something of the OS?
I am using that file as a temporary image until the user decides to save it (after some changes, like rotating it, expanding it, etc).