Platforms to show: All Mac Windows Linux Cross-Platform

Back to GMImageMBS class.

GMImageMBS.magnify

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Magnify image by integral size (double the dimensions)
Example
Var p as Picture = LogoMBS(500)
Var image as new GMImageMBS(p)

image.magnify

Backdrop=image.CopyPicture

GMImageMBS.map(mapImage as GMImageMBS, dither as boolean=false)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Remap image colors with closest color from a reference image.
Example
// some picture we want to map colors
Var pic as Picture = LogoMBS(500)

// build a picture with palette
Var backgroundColor as new GMColorMBS(255,255,255) // white
Var size as new GMGeometryMBS(10,10)

Var i as new GMImageMBS(pic)
Var x as new GMImageMBS(size, backgroundColor)

x.pixelColor(0,0) = new GMColorMBS(0 ,0 ,0 ) // black
x.pixelColor(0,1) = new GMColorMBS(255,0 ,0 ) // red
x.pixelColor(0,2) = new GMColorMBS(0 ,255,0 ) // green
x.pixelColor(0,3) = new GMColorMBS(0 ,0 ,255) // blue
x.pixelColor(0,4) = new GMColorMBS(255,255,0 ) // yellow
x.pixelColor(0,5) = new GMColorMBS(0 ,255,255) // cyan
x.pixelColor(0,6) = new GMColorMBS(255,0 ,255) // magenta

// do the map
i.map(x, false)

// convert result from palette picture to bitmap picture
i.type = i.TrueColorType

// and copy picture to backdrop
Backdrop = i.CopyPicture

Set dither to true in to apply Floyd/Steinberg error diffusion to the image. By default, color reduction chooses an optimal set of colors that best represent the original image. Alternatively, you can choose a particular set of colors from an image file with this option.

GMImageMBS.matteFloodfill(target as GMColorMBS, opacity as UInt32, x as Integer, y as Integer, PaintMethod as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Floodfill designated area with a replacement opacity value.

Paint methods:

PointMethod0Replace pixel color at point.
ReplaceMethod1Replace color for all image pixels matching color at point.
FloodfillMethod2Replace color for pixels surrounding point until encountering pixel that fails to match color at point.
FillToBorderMethod3Replace color for pixels surrounding point until encountering pixels matching border color.
ResetMethod4Replace colors for all pixels in image with pen color.

GMImageMBS.medianFilter(radius as Double=0.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Filter image by replacing each pixel component with the median color in a circular neighborhood.
Example
Var p as Picture = LogoMBS(500)
Var image as new GMImageMBS(p)

image.medianFilter(10)

Backdrop=image.CopyPicture

GMImageMBS.minify

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

image.minify

Backdrop=image.CopyPicture

GMImageMBS.modequalizeifyImage

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Not documented.

GMImageMBS.modifyImage

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Prepare to update image (copy if reference > 1).

Normally Magick++'s implicit reference counting takes care of all instance management. In the rare case that the automatic instance management does not work, use this method to assure that there is only one reference to the image to be modified. It should be used in the cases where a GraphicsMagick C function is used directly on an image which may have multiple references:

GMImageMBS.modulate(brightness as Double, saturation as Double, hue as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Modulate percent hue, saturation, and brightness of an image.
Example
Var logo as Picture = LogoMBS(500)
Var image as new GMImageMBS(logo)

image.type = image.TrueColorType

// brightness 150%
image.modulate(150,100,100)
backdrop = image.CopyPicture

Modulation of saturation and brightness is as a ratio of the current value (100 for no change). Modulation of hue is an absolute rotation of -180 degrees to +180 degrees from the current position corresponding to an argument range of 0 to 200 (100 for no change).

GMImageMBS.montageGeometry as GMGeometryMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Tile size and offset within an image montage.

Only valid for montage images.

GMImageMBS.motionBlur(radius as Double, sigma as Double, angle as Double)

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

image.motionBlur(30,10,90)

Backdrop=image.CopyPicture

The radius parameter specifies the radius of the Gaussian, in pixels, not counting the center pixel. The sigma parameter specifies the standard deviation of the Laplacian, in pixels. The angle parameter specifies the angle the object appears to be comming from (zero degrees is from the right).

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


The biggest plugin in space...