ULONG *raw = GetImage(APTR handle, struct LoadImageCtrl *ctrl);
Note that the ULONG*
return type is just for compatibility reasons.
The actual format of the pixel data that GetImage()
needs to return depends
on whether the HWIMGFLAGS_LOADPALETTE
flag was set when LoadImage()
was called. If it was set, GetImage()
needs to return 8-bit pen values (even
if the bit depth of the image is less than 8-bit!). If HWIMGFLAGS_LOADPALETTE
wasn't set, GetImage()
needs to return 32-bit ARGB values.
If the image type is HWIMAGETYPE_VECTOR
, GetImage()
also needs to take possible
transformations that have been applied via TransformImage() into account.
Furthermore, GetImage()
has to provide some additional information in the
struct LoadImageCtrl
pointer that is passed as the second parameter.
See LoadImage for details on this structure.
The following information has to be provided by GetImage()
:
Width:
HWIMAGETYPE_VECTOR
and TransformImage() has been called prior to GetImage()
,
this value must exactly match the width that has been passed to the last call
of TransformImage().
Height:
HWIMAGETYPE_VECTOR
and TransformImage() has been called prior to GetImage()
,
this value must exactly match the height that has been passed to the last call
of TransformImage().
LineWidth:
AlphaChannel:
True
or False
, depending on whether or not this image has an
alpha channel.
Depth:
Palette:
HWIMGFLAGS_LOADPALETTE
was set when LoadImage() was called,
you need to set this member to a pointer to a palette, stored as a ULONG
array
of 256 RGB colors. Note that the ULONG
array must always have 256 entries, even
if the bit depth is less than 8. Initialize unused palette entries to 0. (V9.0)
The pointer that is returned by GetImage()
must stay valid at least until the next
call to GetImage()
or FreeImage() on this handle.
struct LoadImageCtrl
for storing information
about the image