Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

GMImageMBS.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 GMImageMBS(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

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

GMImageMBS.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 9.3 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 GMImageMBS(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

GMImageMBS.CopyPictureMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

GMImageMBS.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 9.3 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

GMImageMBS.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 GMImageMBS, the data is 8bit per channel. For GMImage16MBS, the data is 16bit per channel.

See also:

Feedback, Comments & Corrections

GMImageMBS.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 GMImageMBS, the data is 8bit per channel. For GMImage16MBS, the data is 16bit per channel.

See also:

Feedback, Comments & Corrections

GMImageMBS.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 GMImageMBS(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

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

image.crop GMGeometryMBS.Make(100,200)

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

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

image.cycleColormap(5)

image.type = image.TrueColorType

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

GMImageMBS.debug as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

GMImageMBS.defineSet(magick as string, key as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

GMImageMBS.defineValue(magick as string, key as string) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

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

dim item as FolderItem = SpecialFolder.Desktop.Child("input.png")
p.read(item)
p.scale new GMGeometryMBS(3750,3750)
p.quality = 95
p.resolutionUnits = p.PixelsPerInchResolution
p.density = new GMGeometryMBS(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

GMImageMBS.depth as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

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

image.despeckle

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

GMImageMBS.display
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

GMImageMBS.edge(radius as Double=0.0)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Edge image (hilight edges in image).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(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

GMImageMBS.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 9.3 Yes Yes Yes Yes No
Function: Emboss image (hilight edges with 3D effect).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(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

GMImageMBS.endian as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

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

image.enhance

Backdrop=image.CopyPicture

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

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

GMImageMBS.filterType as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 9.3 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

GMImageMBS.flip
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 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 GMImageMBS(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 Xojo Plugins