TypeLib Xojo support Plugin

RawBitmapConverter.ToPictureTask Method

Creates Task to convert RawBitmap to desktop mode Xojo Picture object.

shared ToPictureTask(
   image as RawBitmap,
   favorAlphaChannelOverMask as Boolean) as EinhugurRuntime.Task

Parameters

image
The RawBitmap to be converted.
favorAlphaChannelOverMask
If set to true then alpha channel will be used instead of a mask if and only if the RawBitmap had alpha channel. If there was no alpha channel in the RawBitmap then the returned image will have neither mask nor alpha channel. Getting mask is the is the default behaviour as pictures with Alpha channels in Xojo loose accuracy due to pre-multiplied alpha channel.

Returns

EinhugurRuntime.Task
The Task or nil if there was error.

Remarks

Note: For this task the Entry code running in Xojo thread space is rather large. See the documentation for TypeLib plugin Task to get detailed explanation of what this means.


Dim t as EinhugurRuntime.Task = RawBitmapConverter.ToPictureTask(myBitmap)

t.WaitFor() // Here we could also have used RunAsync and get the result in callback

myPicture = Picture(t.Result)

See Also

RawBitmapConverter Class