Platforms to show: All Mac Windows Linux Cross-Platform
GMImageMBS.getConstPixels(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr
Function:
Transfers read-only pixels from the image to the pixel cache as defined by the specified region
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
GMImageMBS.GetEXIFOrientation(byref orientation as integer) as boolean
Function:
Queries orientation from EXIF.
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 18.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes:
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.
GMImageMBS.getPixels(x as Integer, y as Integer, columns as Integer, rows as Integer) as Ptr
Function:
Transfers pixels from the image to the pixel cache as defined by the specified region.
Example:
Notes:
Modified pixels may be subsequently transferred back to the image via syncPixels. This method is valid for DirectClass images.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GMImageMBS(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
GMImageMBS.Graphics as GMGraphicsMBS
Function:
Creates a graphics object for this image.
Example:
Notes:
Using the graphics object you can draw on the image.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 10.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim g as new GMGeometryMBS(500,500)
dim c as new GMColorRGBMBS("white") // white
dim image as new GMImageMBS(g, c)
image.strokeColor = new GMColorRGBMBS("red") // Outline color
image.fillColor = new GMColorRGBMBS("green") // Fill color
image.strokeWidth = 5
dim draw as GMGraphicsMBS = image.Graphics
// Draw a circle
draw.Circle(250, 250, 120, 150)
Backdrop=image.CopyPicture
GMImageMBS.haldClut(image as GMImageMBS)
Function:
Apply a color lookup table (Hald CLUT) to the image.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 16.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
GMImageMBS.Hash as String
Function:
Calculates a hash of the image.
Example:
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 19.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
Dim p As Picture = LogoMBS(500)
Dim g As New GMImageMBS(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.
GMImageMBS.implode(factor as Double=0.0)
Function:
Implode image (special effect).
Example:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.implode(0.3)
Backdrop=image.CopyPicture
GMImageMBS.label(text as string)
Function:
Assign a label to an image.
Notes: 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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: 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:
GMImageMBS.level(black_point as Double, white_point as Double, mid_point as Double=1.0)
Function:
Level image to increase image contrast, and/or adjust image gamma.
Example:
Notes:
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:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.level(0, 127.0)
Backdrop=image.CopyPicture
GMImageMBS.levelChannel(channel as Integer, black_point as Double, white_point as Double, mid_point as Double=1.0)
Function:
Level image channel to increase image contrast, and/or adjust image gamma.
Example:
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.levelChannel(image.BlueChannel, 0, 127.0)
Backdrop=image.CopyPicture
GMImageMBS.magnify
Function:
Magnify image by integral size (double the dimensions)
Example:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.magnify
Backdrop=image.CopyPicture
GMImageMBS.map(mapImage as GMImageMBS, dither as boolean=false)
Function:
Remap image colors with closest color from a reference image.
Example:
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
// some picture we want to map colors
dim pic as Picture = LogoMBS(500)
// build a picture with palette
dim backgroundColor as new GMColorMBS(255,255,255) // white
dim size as new GMGeometryMBS(10,10)
dim i as new GMImageMBS(pic)
dim 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
GMImageMBS.matteFloodfill(target as GMColorMBS, opacity as UInt32, x as Integer, y as Integer, PaintMethod as Integer)
Function:
Floodfill designated area with a replacement opacity value.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
GMImageMBS.medianFilter(radius as Double=0.0)
Function:
Filter image by replacing each pixel component with the median color in a circular neighborhood.
Example:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.medianFilter(10)
Backdrop=image.CopyPicture
GMImageMBS.minify
Function:
Reduce image by integral (half) size.
Example:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.minify
Backdrop=image.CopyPicture
GMImageMBS.modequalizeifyImage
Function:
Not documented.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
GMImageMBS.modifyImage
Function:
Prepare to update image (copy if reference > 1).
Notes: 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:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: 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)
Function:
Modulate percent hue, saturation, and brightness of an image.
Example:
Notes:
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).
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim logo as Picture = LogoMBS(500)
dim image as new GMImageMBS(logo)
image.type = image.TrueColorType
// brightness 150%
image.modulate(150,100,100)
backdrop = image.CopyPicture
GMImageMBS.montageGeometry as GMGeometryMBS
Function:
Tile size and offset within an image montage.
Notes: Only valid for montage images.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: Only valid for montage images.
GMImageMBS.motionBlur(radius as Double, sigma as Double, angle as Double)
Function:
Motion blur image with specified blur factor.
Example:
Notes:
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).
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.motionBlur(30,10,90)
Backdrop=image.CopyPicture
GMImageMBS.negate(grayscale as boolean=false)
Function:
Negate colors in image.
Example:
Notes:
Set grayscale to only negate grayscale values in image.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.negate
Backdrop=image.CopyPicture
GMImageMBS.normalize
Function:
Normalize image (increase contrast by normalizing the pixel values to span the full range of color values).
Example:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.normalize
Backdrop=image.CopyPicture
GMImageMBS.oilPaint(radius as Double=3.0)
Function:
Oilpaint image (image looks like an oil painting).
Example:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
image.oilPaint
Backdrop=image.CopyPicture
GMImageMBS.opacity(opacity as UInt32)
Function:
Set or attenuate the opacity channel in the image.
Notes: 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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: 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.
GMImageMBS.opaque(opaqueColor as GMColorMBS, penColor as GMColorMBS)
Function:
Change color of specified opaque pixel to specified pen color.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
GMImageMBS.ping(data as GMBlobMBS)
Function:
Reads information for an image from the blob.
Notes: 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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: 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:
GMImageMBS.ping(file as folderitem)
Function:
Reads information for an image from the file.
Example:
Notes:
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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
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 GMImageMBS(f)
// now just ping
dim t2 as Double = Microseconds
dim g2 as new GMImageMBS
g2.ping(f)
// or read
dim t3 as Double = Microseconds
dim g3 as new GMImageMBS
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"
See also:
GMImageMBS.ping(Path as string)
Function:
Reads information for an image from the image specification.
Notes: 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.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes: 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:
GMImageMBS.pixelColor(x as UInt32, y as UInt32) as GMColorMBS
Function:
Get/set pixel color at location x & y.
Example:
Notes:
(Read and Write computed property)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)
dim c as new GMColorMBS("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
GMImageMBS.profile(name as string) as GMBlobMBS
Function:
Get or set a named profile.
Notes:
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)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | GraphicsMagick | MBS GraphicsMagick Plugin | 9.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Notes:
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)
The items on this page are in the following plugins: MBS GraphicsMagick Plugin.

Links
MBS Xojo Plugins