Platforms to show: All Mac Windows Linux Cross-Platform

Back to PictureMBS class.

PictureMBS.AlphaOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the alpha channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatGA)
MsgBox str(p.AlphaOffset)

(Read and Write property)

PictureMBS.BitsPerComponent as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 14.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of bits per component.

Value is 8 for most pictures except those with format ImageFormatGray16 which use 16.
(Read only property)

PictureMBS.BlackOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the black channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatCMYK)
MsgBox str(p.BlackOffset)

(Read only property)

PictureMBS.BlueOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the blue channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.BlueOffset)

(Read and Write property)

PictureMBS.Channel as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 18.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The name of the channel.
Example
dim p as new Picture(100,100,32)
dim q as new PictureMBS(p)

dim channels() as string = q.Channels

dim cr as PictureMBS = q.RedChannel
dim cg as PictureMBS = q.GreenChannel
dim cb as PictureMBS = q.BlueChannel
dim c0 as pictureMBS = q.Channel(0)
dim c1 as pictureMBS = q.Channel(1)
dim c2 as pictureMBS = q.Channel(2)

dim crn as string = cg.Channel
dim cgn as string = cg.Channel
dim cbn as string = cg.Channel
dim c0n as string = c0.Channel
dim c1n as string = c1.Channel
dim c2n as string = c2.Channel

Break // check in debugger

For pictures which represent a channel of a bigger picture.
(Read only property)

See also:

PictureMBS.ChannelCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of channels in this picture.

1 for gray, 2 for gray+alpha, 3 for RGB, 4 for RGB+alpha or CMYK and 5 for CMYK+alpha.
(Read only property)

PictureMBS.CyanOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the cyan channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatCMYK)
MsgBox str(p.CyanOffset)

(Read only property)

PictureMBS.DebugPicture as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 9.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The picture content to view in the debugger.

If DebugPictureEnabled is set to true iny our code you can use the DebugPicture property to watch the picture content in the debugger. For speed reasons the size of the debug picture is limited to 512 by 512 pixels. (that could be increased)
(Read only property)

PictureMBS.DebugPictureEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 9.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether you want to use the DebugPicture property.

If DebugPictureEnabled is set to true iny our code you can use the DebugPicture property to watch the picture content in the debugger. For speed reasons the size of the debug picture is limited to 512 by 512 pixels. (that could be increased)
(Read and Write property)

Some examples using this property:

PictureMBS.Factory as PictureFactoryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 9.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The local factory to be used for pictures created in this picture.

If one of the functions in this PictureMBS instance needs a new PictureMBS object, this factory is asked first.
(Read and Write property)

Some examples using this property:

PictureMBS.FilePath as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 19.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The file path to temporary file.

Only set when we have one, e.g. using mapped memory.
(Read only property)

PictureMBS.GrayOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the gray channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatAG)
MsgBox str(p.GrayOffset)

(Read and Write property)

PictureMBS.GreenOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the green channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.GreenOffset)

(Read and Write property)

PictureMBS.HasAlpha as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has an alpha channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatGA)
MsgBox str(p.HasAlpha)

(Read only property)

PictureMBS.HasBlack as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a blue channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.HasBlack)

(Read only property)

PictureMBS.HasBlue as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a blue channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.HasBlue)

(Read only property)

PictureMBS.HasCyan as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a blue channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.HasCyan)

(Read only property)

PictureMBS.HasGray as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a gray channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatGA)
MsgBox str(p.HasGray)

(Read only property)

Some examples using this property:

PictureMBS.HasGreen as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a green channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.HasGreen)

(Read only property)

PictureMBS.HasMagenta as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a blue channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.HasMagenta)

(Read only property)

PictureMBS.HasRed as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.HasRed)

(Read only property)

PictureMBS.HasYellow as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture has a blue channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.HasYellow)

(Read only property)

PictureMBS.Height as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The height of the picture in pixels.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.Height)

(Read only property)

PictureMBS.ImageFormat as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The image format of this picture object.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.ImageFormat)

See the ImageFormat* constants.
(Read only property)

PictureMBS.ImageFormatString as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The format of this picture as a string.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox p.ImageFormatString

Returns for example "RGB" for ImageFormatRGB.
(Read only property)

Some examples using this property:

PictureMBS.IsCMYK as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture is a CMYK picture.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatCMYK)
MsgBox str(p.IsCMYK)

HasCyan, HasMagenta, HasYellow and HasBlack are true if IsRGB is true.
(Read only property)

PictureMBS.IsGray as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether this picture is a grayscale picture.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatGA)
MsgBox str(p.IsGray)

HasGray is true if IsGray is true.
(Read only property)

PictureMBS.IsMapping as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether this picture uses virtual memory.

If IsMapping is true you should not use the Memory property or the Clone function.
(Read only property)

PictureMBS.IsRGB as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the picture is a RGB picture.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.IsRGB)

HasRed, HasBlue and HasGreen are true if IsRGB is true.
(Read only property)

PictureMBS.MagentaOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the magenta channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatCMYK)
MsgBox str(p.MagentaOffset)

(Read only property)

PictureMBS.MappingBlockSize as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The block size for a picture using virtual memory.

(Read and Write property)

Some examples using this property:

PictureMBS.MappingFirstRow as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 17.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
First row mapped in memory.

Only for mapped images.
Value is -1 if no data is mapped in.
(Read only property)

PictureMBS.MappingLastRow as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 17.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Last row mapped in memory.

Only for mapped images.
Value is -1 if no data is mapped in.
(Read only property)

PictureMBS.MappingRows as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 17.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Number of rows for mapping.

For a mapped image how many rows fit in the mapping buffer.
(Read only property)

PictureMBS.Memory as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a memoryblock without size pointing to the current pixel buffer.

Use only if IsMapping is false.
If size is -1, it's a memoryblock referencing the pixel data.
If size is >0, you got the original memoryblock used to allocate the memory.
(Read only property)

PictureMBS.MemoryTarget as Memoryblock

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 9.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
If this picture stores its pixels in a memoryblock, you can access the memory block using this property.

(Read only property)

Some examples using this property:

PictureMBS.Parent as PictureMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The parent PictureMBS object.

One PictureMBS can reference the pixels of another PictureMBS. The parent is referenced in this property so it is not released.
(Read only property)

PictureMBS.PixelSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The size of a pixel in bytes.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.PixelSize)

For example:
1 for Gray
2 for Gray with Alpha
3 for RGB
4 for RGB with Alpha
(Read only property)

Some examples using this property:

PictureMBS.RedOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the red channel.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.RedOffset)

(Read and Write property)

PictureMBS.RowOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal row offset.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
dim q as PictureMBS = p.ClipImage(10,10,80,80)

MsgBox str(q.width)+" x "+str(q.height)+" with row offset: "+str(q.RowOffset)

Only used with clipping images.
(Read only property)

PictureMBS.RowSize as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The size of one row in bytes.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.RowSize)

Additional bytes may be needed per row for better alignment of the data.
Also using virtual memory functions requires alignment.
(Read only property)

Some examples using this property:

PictureMBS.Target as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The target picture.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)

window1.Backdrop = p.Target

if this PictureMBS references the pixels of a Xojo picture, this property keeps a reference to this target picture.
(Read only property)

PictureMBS.TotalSize as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The total size of this picture in bytes.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)

MsgBox str(p.TotalSize)

The result is Height*RowSize.
(Read only property)

Some examples using this property:

PictureMBS.UnclippedHeight as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 14.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The height of the picture in pixels.

Without clipping, the full height of the image.
(Read only property)

PictureMBS.Valid as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether this instance is a valid picture.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.Valid)

Valid is false if the constructor failed to create a picture.
(Read only property)

PictureMBS.Width as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The width of the picture in pixels.
Example
dim l as Picture = LogoMBS(500)
dim p as new PictureMBS(l)
MsgBox str(p.Width)

(Read only property)

PictureMBS.YellowOffset as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal offset for pixels in the yellow channel.
Example
dim p as new PictureMBS(100,100,PictureMBS.ImageFormatCMYK)
MsgBox str(p.YellowOffset)

(Read only property)

PictureMBS.YieldTicks as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Large Picture MBS Images Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
How much time is given back to Xojo for other ticks.
Example
dim p as PictureMBS // your picture

p.YieldTicks=6 // only use 1/10th of a second

If value is greater than zero, the application will yield to another RB thread after the given number of ticks have passed. 60 ticks are one second. Using a small value can slow down processing a lot while a big value keeps your application not responding to mouse clicks.
If you use this property with e.g. 6 as the value, you may also want to use this method in a thread so you can handle mouse events or let Xojo redraw a progressbar.
(Read and Write property)

The items on this page are in the following plugins: MBS Images Plugin.


The biggest plugin in space...