Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

GM16ImageMBS.convolve(order as Integer, ColorMatrix() as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 Yes Yes Yes Yes No
Function: Convolve image.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GM16ImageMBS(f)

dim m(8) as Double

m(0) = 0.25
m(1) = 0
m(2) = 0.25

m(3) = 0
m(4) = 0
m(5) = 0

m(6) = 0.25
m(7) = 0
m(8) = 0.25

g.convolve 3, m

Backdrop = g.CopyPicture
Notes:
Applies a user-specified convolution to the image.
order represents the number of columns and rows in the filter kernel.
kernel is an array of doubles representing the convolution kernel.

Feedback, Comments & Corrections

GM16ImageMBS.CopyPicture as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Creates a copy of the image and returns it as a new picture.
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.Rectangle(250, 250, 100, 100)

Backdrop=image.CopyPicture
Notes: You may need to set image type to RGB to get it working.

See also:

Feedback, Comments & Corrections

GM16ImageMBS.CopyPicture(x as Integer, y as Integer, width as Integer, height as Integer) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Creates a copy of the image and returns it as a new picture.
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(0,0,250,250)
Notes: You may need to set image type to RGB to get it working.

See also:

Feedback, Comments & Corrections

GM16ImageMBS.CopyPictureMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Creates a copy of the image's mask and returns it as a new picture.

See also:

Feedback, Comments & Corrections

GM16ImageMBS.CopyPictureMask(x as Integer, y as Integer, width as Integer, height as Integer) as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Creates a copy of the image's mask and returns it as a new picture.

See also:

Feedback, Comments & Corrections

GM16ImageMBS.CopyPixelsMemory as Memoryblock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 15.0 Yes Yes Yes Yes No
Function: Copy the pixels as they are into a memoryblock.
Notes:
Optional specify rectangle.
Returns nil on low memory or bad parameter. Image must be of type class direct (not palette picture).
Order of pixel data is normally Red, Green, Blue, Opacity. Or Cyan, Magenta, Yellow, Black for CMYK images.
For GM16ImageMBS, the data is 8bit per channel. For GMImage16MBS, the data is 16bit per channel.

See also:

Feedback, Comments & Corrections

GM16ImageMBS.CopyPixelsMemory(x as Integer, y as Integer, width as Integer, height as Integer) as Memoryblock
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 15.0 Yes Yes Yes Yes No
Function: Copy the pixels as they are into a memoryblock.
Notes:
Optional specify rectangle.
Returns nil on low memory or bad parameter. Image must be of type class direct (not palette picture).
Order of pixel data is normally Red, Green, Blue, Opacity. Or Cyan, Magenta, Yellow, Black for CMYK images.
For GM16ImageMBS, the data is 8bit per channel. For GMImage16MBS, the data is 16bit per channel.

See also:

Feedback, Comments & Corrections

GM16ImageMBS.CreateHBITMAP as Ptr
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 15.1 No Yes No Yes, Windows only No
Function: Creates a HBITMAP for the image for use with Windows Declares.
Example:
// get test image
dim logo as Picture = LogoMBS(500)

// create GraphicsMagick image
dim g as new GM16ImageMBS(logo)

// make a HBitmap
dim hBitmap as ptr = g.CreateHBITMAP

// convert back to Xojo picture
dim pic as Picture = WindowsBitmapMBS.HBitmapToPicture(hBitmap, true)

// show in window
Backdrop = pic

// and cleanup memory
WindowsBitmapMBS.DeleteBitmap(hBitmap)
Notes: The HBITMAP returned needs to be freed when you are done with it or you risk having a memory leak.

Feedback, Comments & Corrections

GM16ImageMBS.crop(geometry as GM16GeometryMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Crop image (return subregion of original image).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.crop GM16GeometryMBS.Make(100,200)

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

GM16ImageMBS.cycleColormap(amount as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Cycle (rotate) image colormap.
Example:
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.cycleColormap(5)

image.type = image.TrueColorType

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

GM16ImageMBS.debug as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Enable printing of debug messages from GraphicsMagick as it executes.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.defineSet(magick as string, key as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Set or obtain a definition flag to applied when encoding or decoding the specified format.
Notes:
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)

Feedback, Comments & Corrections

GM16ImageMBS.defineValue(magick as string, key as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Set or obtain a definition string to applied when encoding or decoding the specified format.
Notes:
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)

Feedback, Comments & Corrections

GM16ImageMBS.density as GM16GeometryMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Vertical and horizontal resolution in pixels of the image.
Example:
dim p as new GM16ImageMBS

dim item as FolderItem = SpecialFolder.Desktop.Child("input.png")
p.read(item)
p.scale new GM16GeometryMBS(3750,3750)
p.quality = 95
p.resolutionUnits = p.PixelsPerInchResolution
p.density = new GM16GeometryMBS(300, 300)
dim out as FolderItem = SpecialFolder.Desktop.Child("output.png")
p.write out
Notes:
This option specifies an image density when decoding a Postscript or Portable Document page. Often used with psPageSize.
(Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.depth as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Image depth (bits allocated to red/green/blue components).
Notes:
Used to specify the bit depth when reading or writing raw images or when the output format supports multiple depths. Defaults to the quantum depth that GraphicsMagick is compiled with.
(Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.despeckle
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Despeckle image (reduce speckle noise).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.despeckle

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

GM16ImageMBS.directory as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Tile names from within an image montage.

Feedback, Comments & Corrections

GM16ImageMBS.display
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Display image on screen.
Notes:
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.

Feedback, Comments & Corrections

GM16ImageMBS.edge(radius as Double=0.0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Edge image (hilight edges in image).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.edge

Backdrop=image.CopyPicture
Notes: The radius is the radius of the pixel neighborhood. Specify a radius of zero for automatic radius selection.

Feedback, Comments & Corrections

GM16ImageMBS.emboss(radius as Double=0.0, sigma as Double=1.0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Emboss image (hilight edges with 3D effect).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.emboss

Backdrop=image.CopyPicture
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.

Feedback, Comments & Corrections

GM16ImageMBS.endian as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: The endian mode.
Notes:
Endianness (LSBEndian like Intel, MSBEndian like SPARC, or NativeEndian for what this computer uses) for image formats which support endian-specific options.
(Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.enhance
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Enhance image (minimize noise).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.enhance

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

GM16ImageMBS.erase
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Set all image pixels to the current background color.

Feedback, Comments & Corrections

GM16ImageMBS.fileName as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Image file name.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.fileSize as Int64
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Number of bytes of the image on disk.

Feedback, Comments & Corrections

GM16ImageMBS.fillColor as GM16ColorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Color to use when filling drawn objects.
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
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.fillPattern as GM16ImageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Pattern to use while filling drawn objects.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.fillRule as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 16.4 Yes Yes Yes Yes No
Function: Rule to use when filling drawn objects
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.filterType as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: The reduction filter employed has a sigificant effect on the time required to resize an image and the resulting quality. The default filter is Lanczos which has been shown to produce high quality results when reducing most images.
Notes:
Filter to use when resizing image.
(Read and Write computed property)

Feedback, Comments & Corrections

GM16ImageMBS.flip
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Flip image (reflect each scanline in the vertical direction).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GM16ImageMBS(p)

image.flip

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

Previous items Next items

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




Links
MBS FileMaker Plugins