stbWritePNG :: FilePath -> Image -> IO ()
stbWritePNG path (Image storage width height) = do
    cPath <- newCString path

    let w = fromIntegral width :: CInt
    let h = fromIntegral height :: CInt

    withForeignPtr (fst $ V.unsafeToForeignPtr0 storage) (\pixBuf ->
        stbi_write_png cPath w h 3 (castPtr pixBuf) (w * 3) -- bytes per row
        )

    free cPath
stbWritePNG :: FilePath -> Image -> IO ()
stbWritePNG path (Image storage width height) = do
    cPath <- newCString path

    let w = fromIntegral width :: CInt
    let h = fromIntegral height :: CInt

    withForeignPtr (fst $ V.unsafeToForeignPtr0 storage) (\pixBuf ->
        stbi_write_png cPath w h 3 (castPtr pixBuf) (w * 3) -- bytes per row
        )

    free cPath
stbWritePNG path (Image storage width height) = do
    cPath <- newCString path

    let w = fromIntegral width :: CInt
    let h = fromIntegral height :: CInt

    withForeignPtr (fst $ V.unsafeToForeignPtr0 storage) (\pixBuf ->
        stbi_write_png cPath w h 3 (castPtr pixBuf) (w * 3) -- bytes per row
        )

    free cPath