|
![]() |
![]() |
version 2003
PA_GetPictureParameter (params; index; picture; pictInfo) → long
Parameter | Type | Description | |
params | PA_PluginParameters | → | Parameters received in PluginMain |
index | short | → | Index of the parameter in params |
picture | void * | ← | Value (picture) of the indexth parameter (a picture) |
pictInfo | PA_PictureInfo * | ← | Picture information |
Function result | long | ← | Picture size |
Description
The routine
PA_GetPictureParameter
fills
picture
with the picture received in the
index
parameter in
params
, and the
PA_PictureInfo
which is attached to the picture. It returns the size of the picture (not the size of both
picture
+
pictInfo
).
First call the routine with
picture
as 0L to retreive the size of the buffer you should allocate. Then, allocate the buffer and call the routine again with the allocated buffer.
After using
picture
, you can dispose of it as you want as it does not belong to 4th Dimension, it is a copy of the parameter. As usual, it is a good habit to dispose of memory that is no longer needed.
If you don't want to receive a copy of
picture
(for memory optimization), you can use the
PA_GetPictureHandleParameter
routine, which returns a handle to
picture
. In this case, remember that the Handle belongs to 4th Dimension and you must not dispose of it.
See
Create a new plugin
for a description of parameter accessors.
NOTE
: