Platforms to show: All Mac Windows Linux Cross-Platform

Back to PictureMBS class.

Previous items

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)

Previous items

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


💬 Ask a question or report a problem
The biggest plugin in space...