Platforms to show: All Mac Windows Linux Cross-Platform

Back to GM16PixelsMBS class.

GM16PixelsMBS.Constructor(Image as GM16ImageMBS)

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

GM16PixelsMBS.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 GM16ImageMBS(f)
dim p as new GM16PixelsMBS(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.

GM16PixelsMBS.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.

GM16PixelsMBS.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.

GM16PixelsMBS.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 GM16ImageMBS(f)
dim p as new GM16PixelsMBS(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.

GM16PixelsMBS.sync

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ 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...