Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-07-02 Thread Alexander Foremny
Hello Balazs, thank you for the explanation. It is clear to me now and obvious from the description. I haven't had a detailed understanding of the BMP format and interpreted pixel rectangles as BMP files which they are clearly not. I then thought stb-image was necessary for compressed image format

Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-06-29 Thread Balazs Komuves
Hello, Author of Data.Bitmap here. The issue is caused by the fact that Data.Bitmap does *not* support bmp files at all. This should be clear from the documentation. The functions you tried to used use their own file format, which a really very simple format; they are only added for simple experim

Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-06-28 Thread Alexander Foremny
I tested a similar GHCi session as the ones above with a Bitmap file I found in the wild and I encountered the same results for Bitmap Word8, Bitmap Word16 and other exceptions for Bitmap Word32, Bitmap Float. > readBitmap "chef.bmp" :: IO (Bitmap Word32) > *** Exception: mallocForeignPtrBytes: si

Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-06-28 Thread Alexander Foremny
For what it's worth I created that Bitmap file with Gimp and exported to 32 bit R G B A bitmap. I'll try another bitmap file later and report back. 2012/6/28 Krzysztof Skrzętnicki : > That bitmap must be pretty weird. 'file' command reports 'data', so headers > must be off. Image viewer OTOH does

Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-06-28 Thread Krzysztof Skrzętnicki
That bitmap must be pretty weird. 'file' command reports 'data', so headers must be off. Image viewer OTOH does handle the file. Best regards, Krzysztof Skrzętnicki On Thu, Jun 28, 2012 at 2:03 PM, Brandon Allbery wrote: > On Thu, Jun 28, 2012 at 7:34 AM, Alexander Foremny < > alexanderfore...@g

Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-06-28 Thread Brandon Allbery
On Thu, Jun 28, 2012 at 7:34 AM, Alexander Foremny < alexanderfore...@gmail.com> wrote: > I am using bitmap-0.2 [1] to load a Bitmap file [2]. However, the > following sample GHCi session fails for me. > For what it's worth, my system doesn't recognize your bitmap as a valid image file. -- bran

Re: [Haskell-cafe] Data.Bitmap, readBitmap exception

2012-06-28 Thread Alexander Foremny
Hello Serge, thank you very much for you response. Unfortunately this does not enlighten me. But maybe this is helpful to someone else who could given an answer. Regards, Alexander Foremny 2012/6/28 Serge Le Huitouze : > Hi Alexander, > >> >> I am using bitmap-0.2 [1] to load a Bitmap file [2].