lua.wetgenes.grd.load
g:load(opts)
Load an image from memory or file system depending on settings in opts.
opts.fmt
Lets you choose an image format, the strings "jpg","png" or "gif" will be converted to the appropriate wgrd.FMT_HINT_* value.
opts.data
Flags this as a load from memory and provides the data string to load from.
opts.filename
Flags this as a load the file system and provides the file name to open.
Returns nil,error if something goes wrong so can be used with assert otherwise returns g so that we can chain the result.