Ticket #1096 (new enhancement)
Allow loading pictures from String/ByteString as well as from files
| Reported by: | duncan | Owned by: | axel |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11.0 |
| Component: | general (Gtk+, Glib) | Version: | 0.9.12 |
| Keywords: | Cc: |
Description
We have the function
imageNewFromFile :: FilePath -> IO Image
but it'd be nice to have one for loading from already loaded image data:
imageNewFromFileData :: ByteString -> IO Image
This would probably need to use the GdkPixbufLoader api.
The function name should distinguish between the case where we're supplying an image file format and when we're supplying raw pixel data. There's already a function gdk_pixbuf_new_from_data that takes raw pixel data and meta data describing the pixel data layout.
Change History
Note: See
TracTickets for help on using
tickets.