PA_ConvertPicture

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_ConvertPicture (picture; size; format) PA_Handle

ParameterTypeDescription
picturevoid *Pointer to the picture to convert
sizelongPicture size (bytes)
formatunsigned longFormat of the new picture
Function resultPA_HandleThe 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


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next