Platforms to show: All Mac Windows Linux Cross-Platform

Back to GM16ImageMBS class.

Next items

GM16ImageMBS.blur(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
Blur an image with the specified blur factor.
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.blur(30,10)

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.blurChannel(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
Blur an image channel with the specified blur factor.
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.blurChannel(image.BlueChannel, 30,10)

Backdrop=image.CopyPicture

The channel parameter specifies the channel to modify. 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.border

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Border image (add border to image).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.border

Backdrop=image.CopyPicture

The color of the border is specified by the borderColor attribute.

See also:

GM16ImageMBS.border(geometry as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Border image (add border to image).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.border GM16GeometryMBS.Make(10,10)

Backdrop=image.CopyPicture

The color of the border is specified by the borderColor attribute.

See also:

GM16ImageMBS.defineSet(magick as string, key as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Set or obtain a definition flag to applied when encoding or decoding the specified format.

Similar to the defineValue() method except that passing the flag value 'true' creates a value-less define with that format and key. Passing the flag value 'false' removes any existing matching definition. The method returns 'true' if a matching key exists, and 'false' if no matching key exists.
(Read and Write computed property)

GM16ImageMBS.defineValue(magick as string, key as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Set or obtain a definition string to applied when encoding or decoding the specified format.

The meanings of the definitions are format specific. The format is designated by the magick argument, the format-specific key is designated by key, and the associated value is specified by value. See the defineSet() method if the key must be removed entirely.
(Read and Write computed property)

GM16ImageMBS.Describe(verbose as Integer = 1) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 23.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Describes an image by printing its attributes.
Example
Var f As FolderItem = FindFile("test.jpg")

Var g As New GM16ImageMBS(f)
Var s As String = g.Describe(2)
Break

Attributes include the image width, height, size, and others.

verbose: Whether output should be verbose.
Default is 1. Pass 0 to get a shorted output.
Pass 2 to count the number of colors in the image.

GM16ImageMBS.despeckle

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Despeckle image (reduce speckle noise).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.despeckle

Backdrop=image.CopyPicture

GM16ImageMBS.display

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Display image on screen.

Caution: if an image format is is not compatible with the display visual (e.g. JPEG on a colormapped display) then the original image will be altered. Use a copy of the original if this is a problem.

The plugin is not compiled with X11 so this call may not be useful.

GM16ImageMBS.edge(radius as Double=0.0)

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

image.edge

Backdrop=image.CopyPicture

The radius is the radius of the pixel neighborhood. Specify a radius of zero for automatic radius selection.

GM16ImageMBS.emboss(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
Emboss image (hilight edges with 3D effect).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.emboss

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enhance image (minimize noise).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.enhance

Backdrop=image.CopyPicture

GM16ImageMBS.erase

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Set all image pixels to the current background color.

GM16ImageMBS.extent(geo as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 19.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Create an image canvas using background color sized according to geometry and composite existing image on it, with image placement controlled by gravity.
Example
Var f as folderitem = SpecialFolder.Desktop.Child("test.jpg")
Var image as new GM16ImageMBS(f)

// extend image to fit
Var geo as new GM16GeometryMBS(500,500)
image.extent geo

window1.Title = image.formatExpression("%wx%h")
window1.Backdrop = image.CopyPicture

Parameters are obtained from existing image properties if they are not specified via a method parameter. Parameters which are supported by image properties (gravity and backgroundColor) update those image properties as a side-effect.

See also:

GM16ImageMBS.extent(geo as GM16GeometryMBS, backgroundColor as GM16ColorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 19.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Create an image canvas using background color sized according to geometry and composite existing image on it, with image placement controlled by gravity.
Example
Var f as folderitem = SpecialFolder.Desktop.Child("test.jpg")
Var image as new GM16ImageMBS(f)

// extend image to fit
Var geo as new GM16GeometryMBS(500,500)
Var col as GM16ColorMBS = GM16ColorMBS.Black
image.extent geo, col

window1.Title = image.formatExpression("%wx%h")
window1.Backdrop = image.CopyPicture

Parameters are obtained from existing image properties if they are not specified via a method parameter. Parameters which are supported by image properties (gravity and backgroundColor) update those image properties as a side-effect.

See also:

GM16ImageMBS.extent(geo as GM16GeometryMBS, backgroundColor as GM16ColorMBS, gravity as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 19.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Create an image canvas using background color sized according to geometry and composite existing image on it, with image placement controlled by gravity.
Example
Var f as folderitem = SpecialFolder.Desktop.Child("test.jpg")
Var image as new GM16ImageMBS(f)

// extend image to fit
Var geo as new GM16GeometryMBS(500,500)
Var col as GM16ColorMBS = GM16ColorMBS.Black
image.extent geo, col

window1.Title = image.formatExpression("%wx%h")
window1.Backdrop = image.CopyPicture

Parameters are obtained from existing image properties if they are not specified via a method parameter. Parameters which are supported by image properties (gravity and backgroundColor) update those image properties as a side-effect.

See also:

GM16ImageMBS.extent(geo as GM16GeometryMBS, gravity as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 19.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Create an image canvas using background color sized according to geometry and composite existing image on it, with image placement controlled by gravity.
Example
Var f as folderitem = SpecialFolder.Desktop.Child("test.jpg")
Var image as new GM16ImageMBS(f)

// resize proportionally to fit
Var geo as new GM16GeometryMBS(500,500)
image.extent geo, image.CenterGravity

window1.Title = image.formatExpression("%wx%h")
window1.Backdrop = image.CopyPicture

Parameters are obtained from existing image properties if they are not specified via a method parameter. Parameters which are supported by image properties (gravity and backgroundColor) update those image properties as a side-effect.

See also:

GM16ImageMBS.haldClut(image as GM16ImageMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Apply a color lookup table (Hald CLUT) to the image.

GM16ImageMBS.Hash(Size as Integer = 8) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 19.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates a hash of the image.
Example
Var p As Picture = LogoMBS(500)
Var g As New GM16ImageMBS(p)
msgbox g.Hash

Hash is returned as 64 characters being 1 or 0.
We convert image to 8x8, turn grayscale and check if pixels are above or below mean value.
This hash is quite immune against resizing, compression artifacts and hue changes.
You can use LevenshteinDistanceMBS or JaroWinklerDistanceMBS to compare two hashes.

Added size parameter for version 22.4:
The size of the bitmap. Value from 8 to 1024. Default is 8.

GM16ImageMBS.implode(factor as Double=0.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Implode image (special effect).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.implode(0.3)

Backdrop=image.CopyPicture

GM16ImageMBS.label(text as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Assign a label to an image.

Use this option to assign a specific label to the image. Optionally you can include the image filename, type, width, height, or scene number in the label by embedding special format characters. If the first character of string is @, the image label is read from a file titled by the remaining characters in the string. When converting to Postscript, use this option to specify a header string to print above the image.

See also:

GM16ImageMBS.level(black_point as Double, white_point as Double, mid_point 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
Level image to increase image contrast, and/or adjust image gamma.
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.level(0, 127.0)

Backdrop=image.CopyPicture

Adjust the levels of the image by scaling the colors falling between specified white and black points to the full available quantum range. The parameters provided represent the black, mid (gamma), and white points. The black point specifies the darkest color in the image. Colors darker than the black point are set to zero. Mid point (gamma) specifies a gamma correction to apply to the image. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value. The black and white point have the valid range 0 to MaxRGB while mid (gamma) has a useful range of 0 to ten:

GM16ImageMBS.levelChannel(channel as Integer, black_point as Double, white_point as Double, mid_point 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
Level image channel to increase image contrast, and/or adjust image gamma.
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.levelChannel(image.BlueChannel, 0, 127.0)

Backdrop=image.CopyPicture

Adjust the levels of the image channel by scaling the colors falling between specified white and black points to the full available quantum range. The parameters provided represent the black, mid (gamma), and white points. The black point specifies the darkest color in the image. Colors darker than the black point are set to zero. Mid point (gamma) specifies a gamma correction to apply to the image. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value. The black and white point have the valid range 0 to MaxRGB while mid (gamma) has a useful range of 0 to ten.

GM16ImageMBS.negate(grayscale as boolean=false)

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

image.negate

Backdrop=image.CopyPicture

Set grayscale to only negate grayscale values in image.

GM16ImageMBS.normalize

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Normalize image (increase contrast by normalizing the pixel values to span the full range of color values).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.normalize

Backdrop=image.CopyPicture

GM16ImageMBS.oilPaint(radius as Double=3.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Oilpaint image (image looks like an oil painting).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.oilPaint

Backdrop=image.CopyPicture

GM16ImageMBS.opacity(opacity as UInt32)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Set or attenuate the opacity channel in the image.

If the image pixels are opaque then they are set to the specified opacity value, otherwise they are blended with the supplied opacity value. The value of opacity ranges from 0 (completely opaque) to MaxRGB. The defines OpaqueOpacity and TransparentOpacity are available to specify completely opaque or completely transparent, respectively.

GM16ImageMBS.opaque(opaqueColor as GM16ColorMBS, penColor as GM16ColorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Change color of specified opaque pixel to specified pen color.

GM16ImageMBS.ping(data as GM16BlobMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads information for an image from the blob.

Ping is similar to read except only enough of the image is read to determine the image columns, rows, and filesize. Access the columns, rows, and fileSize attributes after invoking ping. The image pixels are not valid after calling ping.

See also:

GM16ImageMBS.ping(file as folderitem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads information for an image from the file.
Example
Var f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")

// try with Constructor (same as read)
Var t1 as Double = Microseconds
Var g1 as new GM16ImageMBS(f)

// now just ping
Var t2 as Double = Microseconds
Var g2 as new GM16ImageMBS
g2.ping(f)

// or read
Var t3 as Double = Microseconds
Var g3 as new GM16ImageMBS
g3.read(f)

Var t4 as Double = Microseconds

// show speeds
MsgBox str(T4-t3)+" µs for read"+EndOfLine+_
str(T3-t2)+" µs for ping"+EndOfLine+_
str(T2-t1)+" µs for Constructor"

Ping is similar to read except only enough of the image is read to determine the image columns, rows, and filesize. Access the columns, rows, and fileSize attributes after invoking ping. The image pixels are not valid after calling ping.

See also:

GM16ImageMBS.ping(Path as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Reads information for an image from the image specification.

Ping is similar to read except only enough of the image is read to determine the image columns, rows, and filesize. Access the columns, rows, and fileSize attributes after invoking ping. The image pixels are not valid after calling ping.

See also:

GM16ImageMBS.pixelColor(x as UInt32, y as UInt32) as GM16ColorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Get/set pixel color at location x & y.
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)
Var c as new GM16ColorMBS("red")

for x as Integer = 240 to 260
image.pixelColor(x,250)=c
next

for y as Integer = 240 to 260
image.pixelColor(250,y)=c
next

Backdrop=image.CopyPicture

(Read and Write computed property)

GM16ImageMBS.profile(name as string) as GM16BlobMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Get or set a named profile.
Example
Var item As FolderItem = SpecialFolder.Desktop.Child("test.jpeg")
Var p As New GM16ImageMBS(item)

// scale image
p.quality = 95
p.scale New GM16GeometryMBS(1000,1000)

// change resolution
p.density = New GM16GeometryMBS(300, 300)
p.resolutionUnits = p.PixelsPerInchResolution

// remove metadata
Var empty As New GM16BlobMBS
p.profile("EXIF") = empty
p.profile("IPTC") = empty
p.profile("XMP") = empty

Var out As FolderItem = SpecialFolder.Desktop.Child("output.jpeg")
p.write out

Add or remove a named profile to/from the image. Remove the profile by passing an empty Blob (e.g. Blob()). Valid names are "*", "8BIM", "ICM", "IPTC", or a user/format-defined profile name.

Retrieve a named profile from the image. Valid names are: "8BIM", "8BIMTEXT", "APP1", "APP1JPEG", "ICC", "ICM", & "IPTC" or an existing user/format-defined profile name
(Read and Write computed property)

GM16ImageMBS.Profiles as String()   New in 26.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 26.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the list of available profiles.

Profile identifiers include usually "8BIM", EXIF, "ICM", "IPTC" or "XMP".

GM16ImageMBS.quantize(measureError as boolean=false)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Quantize image (reduce number of colors).
Example
Var p as Picture = LogoMBS(500)
Var image as new GM16ImageMBS(p)

image.quantize

image.type = image.TrueColorType
Backdrop=image.CopyPicture

Set measureError to true in order to calculate error attributes.

GM16ImageMBS.quantumOperator(channel as Integer, Operator as Integer, rvalue as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Apply an arithmetic or bitwise operator to the image pixel quantums.
Example
Var f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
Var g as new GM16ImageMBS(f)

const AddQuantumOp = 1
const ThresholdQuantumOp = 10

g.quantumOperator( g.AllChannels, AddQuantumOp, 100)

// show
me.Backdrop = g.CopyPicture

See also:

GM16ImageMBS.quantumOperator(x as Integer, y as Integer, columns as Integer, rows as Integer, channel as Integer, Operator as Integer, rvalue as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Apply an arithmetic or bitwise operator to the image pixel quantums.

See also:

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.

Next items

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


The biggest plugin in space...