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.


The biggest plugin in space...