int ok = IsImage(STRPTR filename, struct LoadImageCtrl *ctrl);
True and provide
information about the image's size and whether or not it has an alpha channel.
This is done by setting the following members of the struct LoadImageCtrl
pointer that is passed to IsImage() in the second argument:
Width:
Height:
Depth:
AlphaChannel:True or False, depending on whether or not this image has an
alpha channel.
Flags:
HWIMGFLAGS_TRANSPARENCY:
The following members of struct LoadImageCtrl are set by Hollywood
before it calls your implementation of IsImage():
Adapter:NULL, Hollywood wants your plugin to
use the file adapter specified in Adapter to open the file. This means that you
have to use hw_FOpenExt() instead of hw_FOpen()
to open the file. Make sure to check for Hollywood 6.0 before trying to access
this member because it isn't there in previous versions. See hw_FOpenExt for details. (V6.0)
UserTags:UserTags could
also be intended for another plugin, namely the file adapter plugin passed
in Adapter. See User tags for details. Make sure to check for Hollywood 10.0
before trying to access this member because it isn't there in previous versions.
(V10.0)
You must not touch any other members of the struct LoadImageCtrl
pointer that is passed to this function. See LoadImage for details on this structure.
struct LoadImageCtrl for storing information
about the imageTrue if the plugin wants to handle this file, False otherwise