I still get the alpha channel coming though.
No matter what you set the bit depth to when using new Picture(pic.Width, pic.Height, 24) Xojo ALWAYS sets it to 32-bit.
Var pic As picture
pic = Picture.Open(obj.FolderItem)
If pic <> Nil Then
var n as new Picture(pic.Width, pic.Height)
n.Graphics.DrawPicture(pic, 0, 0)
ImageViewer1.Image = n
End If
I think I understand what you’re trying to do now. You want to use a PSD as a mask for a Xojo picture object? If so, you can draw that to the Picture.Mask graphics context if creating a picture with a defined depth, or use ApplyMask otherwise.
Yeah, but it is still true that specifying a depth (any depth; 24 is just a reminder of the fact that you are dealing with three RGB channels with 8 bits each) gives you a picture without an alpha channel whereas omitting the depth parameter creates a picture with an alpha channel. That’s according to the documentation and it’s actually true as revealed by checking Picture.HasAlphaChannel.