Hi Kirsten,
Kirsten Chevalier wrote:
> Hi,
> http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.WxcClassesAL.html#v%3AbitmapCreate
> mentions a function called bitmapCreate, which doesn't seem to
> actually exist in the released version of wxHaskell
Do you mean that you get link errors?
Anyhow, if you do things with images, you are normally better of
to use the wxImage class. Images are platform and format independent
while bitmaps uses a highly plarform dependent representation and using
bitmapCreate is therefore not recommended.
> All I'm trying to do is read some data
> representing a JPEG over a network socket (http) and convert that to
> an image that my wxHaskell program can display. Currently I'm doing
> this by invoking wget through system() and creating temporary files,
> which, of course, is expensive. Is there an easy way to do this using
> the current version of wxHaskell?
The best way to do this in the current version of wxHaskell is to
write to file indeed, and to read from the file using imageCreateFromFile.
In a future wxHaskell, I will add support for the wxHTTP class, and the
wxInputStream's. Using that, you will be able to read a (JPEG) image
directly from an HTTP inputstream.
I hope this helps,
-- Daan.
>
> Thanks,
> Kirsten
>
|