QPx_FilterAreaImage(areaRef; areaRef; areaRef):error
areaRef Longint QPix area reference
filterSettings BLOB Filter settings
selectionOnly Longint Filter selection only
error Longint Error result

Apply a filter to the image in a QPix area

The plug-in area is specified by areaRef. If areaRef is not a valid QPix plug-in area reference, qpx_paramErr is returned.

The filterSettings parameter specifies the filter to be applied and its associated settings. To let the user select a filter and retrieve the selected filter and settings, call the QPx_DoFilterSettingsDialog command.

To get information about all available QuickTime filters, call the QPx_GetFilterList command.

NOTE The BLOB parameter must contain filter settings that has previously been obtained using QPx_DoFilterSettingsDialog. The structure of this BLOB is private to QuickTime and cannot be constructed or altered with 4D BLOB commands. To fiddle with the settings BLOB at your own risk, use the plug-in QTAtoms.bundle that is included in the QPix distribution package.

The selectionOnly parameter denotes which posrtion of the image to filter. To filter the entire image, set selectionOnly to 0. To filter the image portion under the selection marquee, set selectionOnly to 1.


   // Display the filter settings dialog and apply
   // the selected filter and settings to the area image


$error:=QPx_DoFilterSettingsDialog ($settings;$filterType)

If ($error=qpx_noErr)
   $error:=QPx_FilterAreaImage (gQPixArea;$settings)
End if 

Related commands

QPx_DoFilterSettingsDialog Display the standard QuickTime filter dialog
QPx_GetFilterList Get a list of available QuickTime filters
QPx_BrightnessContrastAreaImg Apply the Escape Brightness and Contrast filter to the image in a QPix area
QPx_SharpenAreaImage Apply the Sharpen filter to the image in a QPix area
QPx_BlurAreaImage Apply the Blur filter to the image in a QPix area
QPx_RGBBalanceAreaImage Apply the RGB Balance filter to the image in a QPix area
QPx_HSLBalanceAreaImage Apply the HSL-Balance filter to the image in a QPix area