Platforms to show: All Mac Windows Linux Cross-Platform

Back to GMImageMBS class.

GMImageMBS.gamma(gammaRed as Double, gammaGreen as Double, gammaBlue as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gamma correct the image or individual image channels.
Example
Var p as Picture = LogoMBS(500)
Var image as new GMImageMBS(p)

image.gamma(1,2,3)

Backdrop=image.CopyPicture

See also:

GMImageMBS.gaussianBlur(width as Double, sigma as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gaussian blur image.
Example
Var p as Picture = LogoMBS(500)
Var image as new GMImageMBS(p)

image.gaussianBlur(30, 10)

Backdrop=image.CopyPicture

The number of neighbor pixels to be included in the convolution mask is specified by width. The standard deviation of the gaussian bell curve is specified by sigma

GMImageMBS.gaussianBlurChannel(channel as Integer, width as Double, sigma as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gaussian blur image channel.

The number of neighbor pixels to be included in the convolution mask is specified by width. The standard deviation of the gaussian bell curve is specified by sigma.

GMImageMBS.getChromaBluePrimary(byref x as Double, byref y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Chromaticity blue primary point.

GMImageMBS.getchromaGreenPrimary(byref x as Double, byref y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Chromaticity green primary point.

e.g. x=0.3, y=0.6

GMImageMBS.getchromaRedPrimary(byref x as Double, byref y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Chromaticity red primary point

e.g. x=0.64, y=0.33

GMImageMBS.getchromaWhitePoint(byref x as Double, byref y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Chromaticity white point

e.g. x=0.3127, y=0.329

GMImageMBS.getConstPixels(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
Transfers read-only pixels from the image to the pixel cache as defined by the specified region

GMImageMBS.GetEXIFOrientation(byref orientation as integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 18.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries orientation from EXIF.

Orientation is set to number from 0 to 8 depending on rotation. -1 if unknown.
This function can only read orientation, if there is an EXIF block in image.
Returns true for success and false for failure.

For new development, please use ExifTagsMBS class instead.

GMImageMBS.getPixels(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
Transfers pixels from the image to the pixel cache as defined by the specified region.
Example
Var f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
Var g as new GMImageMBS(f)

// get pointer to some pixels to write
Var x as ptr = g.getPixels(0, 0, 100, 100)

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

// write back
g.syncPixels

// show
me.Backdrop = g.CopyPicture

Modified pixels may be subsequently transferred back to the image via syncPixels. This method is valid for DirectClass images.

GMImageMBS.Graphics as GMGraphicsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 10.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a graphics object for this image.
Example
Var g as new GMGeometryMBS(500,500)
Var c as new GMColorRGBMBS("white") // white
Var image as new GMImageMBS(g, c)

image.strokeColor = new GMColorRGBMBS("red") // Outline color
image.fillColor = new GMColorRGBMBS("green") // Fill color
image.strokeWidth = 5

Var draw as GMGraphicsMBS = image.Graphics

// Draw a circle
draw.Circle(250, 250, 120, 150)

Backdrop=image.CopyPicture

Using the graphics object you can draw on the image.

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


The biggest plugin in space...