Platforms to show: All Mac Windows Linux Cross-Platform

Back to GM16ImageMBS class.

Previous items Next items

GM16ImageMBS.flop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Flop image (reflect each scanline in the horizontal direction).
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.flop

Backdrop=image.CopyPicture

GM16ImageMBS.fontTypeMetrics(name as string) as GM16TypeMetricMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Obtain font metrics for text string given current font, pointsize, and density settings.

GM16ImageMBS.formatExpression(expression as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 19.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Format the specified expression similar to command line '-format'.
Example
dim f as folderitem = SpecialFolder.Desktop.Child("test.jpg")
dim image as new GM16ImageMBS(f)

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

For example "%wx%h" is converted to a string containing image WIDTHxHEIGHT like "640x480".

GM16ImageMBS.frame

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Draw a decorative frame around the image.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.frame

Backdrop=image.CopyPicture

See also:

GM16ImageMBS.frame(geometry as GM16GeometryMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Draw a decorative frame around the image.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.frame(GM16GeometryMBS.Make("10x10"))

Backdrop=image.CopyPicture

See also:

GM16ImageMBS.frame(width as UInt32, height as UInt32, innerBevel as Integer=6, outerBevel as Integer=6)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Draw a decorative frame around the image.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.frame(15,15)

Backdrop=image.CopyPicture

See also:

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
dim p as Picture = LogoMBS(500)
dim 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
dim p as Picture = LogoMBS(500)
dim 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
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GM16ImageMBS(f)

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

// draw a red line to the pixel buffer
dim 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
dim g as new GM16GeometryMBS(500,500)
dim c as new GM16ColorRGBMBS("white") // white
dim image as new GM16ImageMBS(g, c)

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

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

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
Dim p As Picture = LogoMBS(500)
Dim 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
dim p as Picture = LogoMBS(500)
dim 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
dim p as Picture = LogoMBS(500)
dim 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
dim p as Picture = LogoMBS(500)
dim 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.magnify

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

image.magnify

Backdrop=image.CopyPicture

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

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

// build a picture with palette
dim backgroundColor as new GM16ColorMBS(255,255,255) // white
dim size as new GM16GeometryMBS(10,10)

dim i as new GM16ImageMBS(pic)
dim x as new GM16ImageMBS(size, backgroundColor)

x.pixelColor(0,0) = new GM16ColorMBS(0 ,0 ,0 ) // black
x.pixelColor(0,1) = new GM16ColorMBS(255,0 ,0 ) // red
x.pixelColor(0,2) = new GM16ColorMBS(0 ,255,0 ) // green
x.pixelColor(0,3) = new GM16ColorMBS(0 ,0 ,255) // blue
x.pixelColor(0,4) = new GM16ColorMBS(255,255,0 ) // yellow
x.pixelColor(0,5) = new GM16ColorMBS(0 ,255,255) // cyan
x.pixelColor(0,6) = new GM16ColorMBS(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.

GM16ImageMBS.matteFloodfill(target as GM16ColorMBS, 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 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Floodfill designated area with a replacement opacity value.

GM16ImageMBS.medianFilter(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
Filter image by replacing each pixel component with the median color in a circular neighborhood.
Example
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.medianFilter(10)

Backdrop=image.CopyPicture

GM16ImageMBS.minify

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

image.minify

Backdrop=image.CopyPicture

GM16ImageMBS.modequalizeifyImage

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

GM16ImageMBS.modifyImage

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

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

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Modulate percent hue, saturation, and brightness of an image.
Example
dim logo as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(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).

GM16ImageMBS.montageGeometry as GM16GeometryMBS

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

Only valid for montage images.

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

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

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
dim p as Picture = LogoMBS(500)
dim 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
dim p as Picture = LogoMBS(500)
dim 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
dim p as Picture = LogoMBS(500)
dim 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
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")

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

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

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

dim 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:

Previous items Next items

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


The biggest plugin in space...