PictureEffectsRaw Xojo Plugin

ExposureEffectRaw.ApplyInPlaceAsync Method

Applies the effect asynchronously on a RawBitmap image with parameters that have been set on the class instance, and the RawBitmap passed in will also get the result image.

ApplyInPlaceAsync(
   source as RawBitmap,
   completeTarget as Object,
   completeMethod as Ptr)

Parameters

source
The source image as RawBitmap
completeTarget
Instance of target class that should receive complete signal. (Or nil if no signal is wanted)
completeMethod
Address of a method on the class instance passed into the completeTarget parameter. This method must take exactly one parameter which is:
effect as MPImageFilterRaw

It is all right to cast effect to ExposureEffectRaw or to let the parameter be effect as ExposureEffectRaw if wanted.

Wrong parameters on the completeMethod will give you crash.

If completeTarget is nil then this parameter should also be nil.

Remarks

Please note that asynchronous mode is advanced feature, you really need to understand it if you use this mode, since misunderstanding how it works could make your application behave in unexpected ways.

Asynchronous mode explained:



Time line on left is showing old style synchronous mode, time line in the middle showing asynchronous mode with complete hook and time line on right showing asynchronous mode without complete hook

There is right time and place for all of the modes, like old style synchronous might be the clear choice on images that are not extremely big while you might want the more complex asynchronous modes when dealing with huge images that take time to process.

See the Async examples to see how asynchronous mode with complete hook is used and how asynchronous mode without complete hook is used.

It is also important to realize when going asynchronous mode and choosing to use only one CPU core then one thread will be spawned, while if choosing just one CPU core in synchronous mode then no thread is spawned.

See Also

ExposureEffectRaw Class