GMPixelsMBS methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to GMPixelsMBS class.

GMPixelsMBS.Constructor(Image as GMImageMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new Pixels object with the pixels from an image.

GMPixelsMBS.get(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Transfer pixels from the image to the pixel view as defined by the specified region.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GMImageMBS(f)
dim p as new GMPixelsMBS(g)

// get pointer to some pixels
dim x as ptr = p.get(0, 0, 100, 100)

// draw a red line to the pixel buffer
dim o as Integer
for i as Integer = 0 to 99
o = 100 * i + i
x.UInt32(o * 4) = &hFFFF0000
next

// write back
p.sync

// show
window1.Backdrop = g.CopyPicture

Modified pixels may be subsequently transferred back to the image via sync.

GMPixelsMBS.getConst(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Transfer read-only pixels from the image to the pixel view as defined by the specified region.

GMPixelsMBS.indexes as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Return pixel colormap index array.

GMPixelsMBS.set(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Allocate a pixel view region to store image pixels as defined by the region rectangle.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GMImageMBS(f)
dim p as new GMPixelsMBS(g)

// get pointer to some pixels to write
dim x as ptr = p.set(0, 0, 100, 100)

// draw a red line to the pixel buffer
dim o as Integer
for i as Integer = 0 to 99
o = 100 * i + i
x.UInt32(o * 4) = &hFFFF0000
next

// write back
p.sync

// show
window1.Backdrop = g.CopyPicture

This area is subsequently transferred from the pixel view to the image via sync.

GMPixelsMBS.sync

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Transfers the image cache pixels to the image.

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


💬 Ask a question or report a problem