Platforms to show: All Mac Windows Linux Cross-Platform

Back to GM16ImageMBS class.

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

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

image.gamma(1,2,3)

Backdrop=image.CopyPicture

See also:

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gaussian blur image.
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(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

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

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

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

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

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

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

e.g. x=0.3, y=0.6

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

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

e.g. x=0.64, y=0.33

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

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

e.g. x=0.3127, y=0.329

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

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

GM16ImageMBS.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 GM16ImageMBS(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.

GM16ImageMBS.Graphics as GM16GraphicsMBS

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

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

Var draw as GM16GraphicsMBS = 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...