version 2003
PA_ConvertPicture (picture; size; format) PA_Handle
Parameter | Type | Description | |
picture | void * | Pointer to the picture to convert | |
size | long | Picture size (bytes) | |
format | unsigned long | Format of the new picture | |
Function result | PA_Handle | The converted picture |
Description
The routine PA_ConvertPicture converts a 4D picture from 'PICT' (standard storage format in 4D for both Mac and Windows) to any format compatible with the currently installed version of QuickTime.
picture is a pointer to the data embeding the picture and size is its size in bytes.
format is the format to which the picture must be converted using QuickTime, such as 'jpeg', 'raw ', etc.
Example
Convert a 4D picture to JPEG:
ConvertToJPEG(PA_PluginParameters params) { PA_PictInfo info; PA_Handle newP, oldP = PA_GetPictureHandleParameter(params, 1, &info); if(oldP) { newP = PA_ConvertPicture(PA_LockHandle(oldP), PA_GetHandleSize(oldP), 'jpeg'); PA_ReturnPictureHandleParameter(newP); } }
See Also
PA_PictureToEMF, PA_PictureToGIF.
Error Handling
PA_GetLastError always returns eER_NoErr