Platforms to show: All Mac Windows Linux Cross-Platform

Back to GM16ImageMBS class.

Previous items

GM16ImageMBS.sharpen(radius as Double=0.0, sigma as Double=1.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sharpen pixels in image.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.sharpen

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.

GM16ImageMBS.sharpenChannel(channel as Integer, radius as Double=0.0, sigma as Double=1.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sharpen pixels in image channel.

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.

GM16ImageMBS.shave(geometry as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shave pixels from image edges.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.shave(new GM16GeometryMBS(200,200))

Backdrop=image.CopyPicture

GM16ImageMBS.shear(xShearAngle as Double, yShearAngle as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shear image (create parallelogram by sliding image by X or Y axis).
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.shear(10,20)

Backdrop=image.CopyPicture

Shearing slides one edge of an image along the X or Y axis, creating a parallelogram. An X direction shear slides an edge along the X axis, while a Y direction shear slides an edge along the Y axis. The amount of the shear is controlled by a shear angle. For X direction shears, x degrees is measured relative to the Y axis, and similarly, for Y direction shears y degrees is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the color defined as borderColor.

GM16ImageMBS.signature(force as boolean=false) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Image textual signature.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

MsgBox image.signature

Backdrop=image.CopyPicture

Set force to true in order to re-calculate the signature regardless of whether the image data has been modified.

GM16ImageMBS.solarize(factor as Double=50.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Solarize image (similar to effect seen when exposing a photographic film to light during the development process)
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.solarize

Backdrop=image.CopyPicture

GM16ImageMBS.spread(amount as UInt32=3)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Spread pixels randomly within image by specified ammount
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.spread 5

Backdrop=image.CopyPicture

GM16ImageMBS.statistics as GM16ImageStatisticsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Obtain image statistics.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GM16ImageMBS(f)
dim stat as GM16ImageStatisticsMBS = g.statistics
dim gs as GM16ImageChannelStatisticsMBS = stat.blue

MsgBox "blue channel: "+str(gs.minimum)+"-"+str(Gs.maximum)+", mean "+str(gs.mean)

Statistics are normalized to the range of 0.0 to 1.0 and are output to the specified ImageStatistics structure.

GM16ImageMBS.stegano(watermark as GM16ImageMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Add a digital watermark to the image (based on second image).
Example
dim p as Picture = LogoMBS(500)
dim p1 as Picture = New Picture(550,500,32)
dim p2 as Picture = New Picture(550,500,32)

p1.Graphics.DrawPicture p, 0,0
p2.Graphics.DrawPicture p,50,0

dim image1 as new GM16ImageMBS(p1)
dim image2 as new GM16ImageMBS(p2)

image2.zoom(new GM16GeometryMBS(100,100)) // scale down

// add watermark
image1.stegano(image2)

// now make a threshold so you see the difference
image1.threshold 254

image1.type = image1.TrueColorType
Backdrop=image1.CopyPicture

GM16ImageMBS.stereo(rightImage as GM16ImageMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Create an image which appears in stereo when viewed with red-blue glasses (Red image on left, blue on right)
Example
dim p as Picture = LogoMBS(500)
dim p1 as Picture = New Picture(550,500,32)
dim p2 as Picture = New Picture(550,500,32)

p1.Graphics.DrawPicture p, 0,0
p2.Graphics.DrawPicture p,50,0

dim image1 as new GM16ImageMBS(p1)
dim image2 as new GM16ImageMBS(p2)

image1.stereo(IMAGE2)

Backdrop=image1.CopyPicture

GM16ImageMBS.strip

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Remove all profiles and text attributes from the image.

GM16ImageMBS.strokeDashArray as Double()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries stroke dash pattern.

Specify the pattern of dashes and gaps used to stroke paths. The strokeDashArray represents a zero-terminated array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. A typical strokeDashArray array might contain the members 5 3 2 0, where the zero value indicates the end of the pattern array.

GM16ImageMBS.swirl(degree as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Swirl image (image pixels are rotated by degrees).
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.swirl 200

Backdrop=image.CopyPicture

GM16ImageMBS.syncPixels

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.

GM16ImageMBS.texture(texture as GM16ImageMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Channel a texture on pixels matching image background color.

GM16ImageMBS.threshold(degree as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Threshold image channels (below threshold becomes black, above threshold becomes white).
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.threshold 127

// convert to RGB so CopyPicture works
image.type = image.TrueColorType
Backdrop=image.CopyPicture

The range of the threshold parameter is 0 to MaxRGB.

GM16ImageMBS.thumbnail(geometry as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Resize image using several algorithms to make smaller images very quickly.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GM16ImageMBS(f)

// make thumbnail
dim geo as new GM16GeometryMBS(100, 100)
g.thumbnail(geo)

// show
me.Backdrop = g.CopyPicture

GM16ImageMBS.transform(imageGeometry as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Transform image based on image and crop geometries.

Crop geometry is optional.

See also:

GM16ImageMBS.transform(imageGeometry as GM16GeometryMBS, cropGeometry as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Transform image based on image and crop geometries.

Crop geometry is optional.

See also:

GM16ImageMBS.transformOrigin(tx as Double, ty as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Origin of coordinate system to use when annotating with text or drawing.

GM16ImageMBS.transformReset

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reset transformation parameters to default.

GM16ImageMBS.transformRotation(angle as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Rotation to use when annotating with text or drawing.

GM16ImageMBS.transformScale(tx as Double, ty as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Scale to use when annotating with text or drawing.

GM16ImageMBS.transformSkewX(x as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Skew to use in X axis when annotating with text or drawing.

GM16ImageMBS.transformSkewY(y as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Skew to use in Y axis when annotating with text or drawing.

GM16ImageMBS.transparent(color as GM16ColorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Add matte channel to image, setting pixels matching color to transparent.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

dim c as new GM16ColorMBS("white")
image.transparent(c)

Backdrop=image.CombinePictureWithMask

GM16ImageMBS.trim

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Trim edges that are the background color from the image.
Example
dim p as Picture = LogoMBS(500)
// make the logo picture bigger
dim q as Picture = New Picture(700,700,32)

q.Graphics.DrawPicture p,100,100

dim image as new GM16ImageMBS(q)

// now trim the white border away
image.trim

Backdrop=image.CopyPicture

See ColorFuzz property for how far the pixel value can differentiate.

GM16ImageMBS.unregisterId

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

GM16ImageMBS.unsharpmask(radius as Double, sigma as Double, amount as Double, threshold as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Replace image with a sharpened version of the original image using the unsharp mask algorithm.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.unsharpmask(10,1,0.5,50)

Backdrop=image.CopyPicture

radius: the radius of the Gaussian, in pixels, not counting the center pixel.
sigma: the standard deviation of the Gaussian, in pixels.
amount: the percentage of the difference between the original and the blur image that is added back into the original.
threshold: the threshold in pixels needed to apply the diffence amount.

GM16ImageMBS.unsharpmaskChannel(channel as Integer, radius as Double, sigma as Double, amount as Double, threshold as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Replace image channel with a sharpened version of the original image using the unsharp mask algorithm.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.unsharpmaskChannel(Image.RedChannel, 10,1,0.5,50)

Backdrop=image.CopyPicture

channel:image channel to modify.
radius:the radius of the Gaussian, in pixels, not counting the center pixel.
sigma:the standard deviation of the Gaussian, in pixels.
amount:the percentage of the difference between the original and the blur image that is added back into the original.
threshold:the threshold in pixels needed to apply the diffence amount.

GM16ImageMBS.wave(amplitude as Double=25.0, wavelength as Double=150.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Map image pixels to a sine wave.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.wave

Backdrop=image.CopyPicture

GM16ImageMBS.write(blob as GM16BlobMBS, magick as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Write single image frame to in-memory Blob, with optional format and adjoin parameters.

See also:

GM16ImageMBS.write(blob as GM16BlobMBS, magick as string, depth as UInt32)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Write single image frame to in-memory Blob, with optional format and adjoin parameters.

See also:

GM16ImageMBS.write(file as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Write single image frame to a file.
Example
// this converts 32 bit PNG with alpha channel to BMP

dim f as FolderItem = SpecialFolder.Desktop.Child("test.png")
dim p as Picture = Picture.Open(f)

dim g as new GM16ImageMBS( new GM16GeometryMBS(p.Width, p.Height), new GM16ColorGrayMBS(1.0))

g.type = g.TrueColorMatteType
g.matte = True
g.magick = "BMP"

g.SetPicture(p, 0, 0)
g.SetPictureMask(p.mask.invertMBS, 0, 0)

f = SpecialFolder.Desktop.Child("test.bmp")
g.write(f)

See also:

GM16ImageMBS.write(x as Integer, y as Integer, columns as Integer, rows as Integer, map as string, type as Integer, Pixels as Ptr)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Write single image frame to an array of pixels with storage type specified by user (DispatchImage).

e.g. image.write( 0, 0, 640, 1, "RGB", 0, pixels )

See also:

GM16ImageMBS.zoom(geometry as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Zoom (resize) image to specified size.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.zoom(new GM16GeometryMBS(200,200))

Backdrop=image.CopyPicture

GM16ImageMBS.ZPL(Header as boolean = true) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 20.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries image as ZPL hex image.

This is for sending data to a receipt printer. The picture is taken as black & white image and we build the hex string, you can send to the printer.
Picture needs to have a width dividable by 8.

Set Header to false for skipping header and footer.

Previous items

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


The biggest plugin in space...