Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

[MBS] PIctureMBS.CopyPictureWithoutMaskMBS (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] NSMenuItemMBS shortcuts
Next thread: [MBS] [ANN] 17.3pr4


[MBS] MBS 7.5 with RB2010r4.1   -   Garth Hjelte
  [MBS] PIctureMBS.CopyPictureWithoutMaskMBS   -   Michael Diehr
   Re: [MBS] PIctureMBS.CopyPictureWithoutMaskMBS   -   Christian Schmitz

[MBS] PIctureMBS.CopyPictureWithoutMaskMBS
Date: 30.06.17 04:38 (Thu, 29 Jun 2017 20:38:16 -0700)
From: Michael Diehr
I recently upgraded from 15.4 to 17.2 and noticed that these functions:
PictureMBS.CopyPictureWithMaskMBS
PictureMBS.CopyPictureWithoutMaskMBS

are now throwing exceptions when using normal (32 bit) Xojo picture objects:

Unhandled Exception: 0 Masks for Pictures with alpha channel is not supported in XojoFramework.dylib$9150

The workaround is pretty simple:

Function CopyPictureWithoutMask(extends pic as Picture) As Picture
// This replaces the function in MBS 17.2
// return a picture containing only the RGB channels, ignoring the Alpha
if pic=nil then
return nil
end if
dim pm as new PictureMBS(pic,false)
return pm.CopyPicture
End Function

I think it would make sense for these two functions to work with new 32 bit Xojo pictures, no?

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] PIctureMBS.CopyPictureWithoutMaskMBS
Date: 30.06.17 08:30 (Fri, 30 Jun 2017 09:30:52 +0200)
From: Christian Schmitz

> are now throwing exceptions when using normal (32 bit) Xojo picture objects:
>
> Unhandled Exception: 0 Masks for Pictures with alpha channel is not supported in XojoFramework.dylib$9150

The Xojo runtime throws them. You got a picture with alpha channel.

Sincerely
Christian