From: Daan L. <daa...@xs...> - 2004-08-17 05:53:10
|
Andrey Dadakov wrote: > Hi, is it possible to create an image file (PNG for example) using > wxHaskell? > > > > I tried to find an equivalent for wxImage::SaveFile but could not find it. > > > > Thank you > > Andrey > Hi Andrey, You can use "imageSaveFile". It takes an image, file path, and file type. The file type can be for example "wxBITMAP_TYPE_PNG" or you can use the function "imageTypeFromFileName" to get the type from the extension of the file name. > imageSave :: Image a -> FilePath -> IO () > imageSave image fpath > = imageSaveFile image fpath (imageTypeFromFileName fpath) All the best, Daan. btw. You can see all functionality of an Image if you look in the haddock documentation for "Graphics.UI.WXCore.WxcClassessAL" |