From Xojo Documentation


Picture.CopyColorChannels() As Picture

New in 2016r3

Supported for all project types and targets.

Copies just the color information from a Picture.


This method returns a clone of the color data in a picture with a solid mask.

The returned Picture object:

  • has the same dimensions, resolutions and scale factors as the original.
  • is a mutable bitmap
  • uses alpha channels instead of masks (i.e. HasAlphaChannel will be True)
  • is entirely opaque


  • UnsupportedOperationException: When called on a vector or multi-representation image
  • OutOfMemoryException if the picture cannot be created


Get the color channels from MyPic:

Var colorChannels As Picture
colorChannels = MyPic.CopyColorChannels