Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

GMPixelsMBS.Constructor(Image as GMImageMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Creates a new Pixels object with the pixels from an image.

Feedback, Comments & Corrections

GMPixelsMBS.get(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 Yes Yes Yes Yes No
Function: 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
Notes: Modified pixels may be subsequently transferred back to the image via sync.

Feedback, Comments & Corrections

GMPixelsMBS.getConst(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 Yes Yes Yes Yes No
Function: Transfer read-only pixels from the image to the pixel view as defined by the specified region.

Feedback, Comments & Corrections

GMPixelsMBS.indexes as Ptr
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 Yes Yes Yes Yes No
Function: Return pixel colormap index array.

Feedback, Comments & Corrections

GMPixelsMBS.set(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 Yes Yes Yes Yes No
Function: 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
Notes: This area is subsequently transferred from the pixel view to the image via sync.

Feedback, Comments & Corrections

GMPixelsMBS.sync
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Transfers the image cache pixels to the image.

Feedback, Comments & Corrections

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




Links
MBS Xojo PDF Plugins