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

GMImageMBS.clipMask 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: Associate a clip mask image with the current image.
Notes:
The clip mask image must have the same dimensions as the current image or an exception is thrown. Clipping occurs wherever pixels are transparent in the clip mask image. Clipping Pass an invalid image to unset an existing clip mask.
(Read and Write computed property)

Feedback, Comments & Corrections

GMImageMBS.colorFuzz as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Colors within this distance are considered equal.
Notes:
A number of algorithms search for a target color. By default the color must be exact. Use this option to match colors that are close to the target color in RGB space.
(Read and Write computed property)

Feedback, Comments & Corrections

GMImageMBS.colorHistogram as dictionary
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 16.4 Yes Yes Yes Yes No
Function: Calculates histogram.
Example:
dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
dim g as new GMImageMBS(f)
dim d as Dictionary = g.colorHistogram

MsgBox str(d.Count)+" color"

// check first color
dim c as GMColorMBS = d.key(0)

MsgBox "Color "+str(c.colorValue)+": "+str(d.Value(c))
Notes: The dictionary has a GMColorMBS/GMColor16MBS object as key for each color and an unsigned integer as value.

Feedback, Comments & Corrections

GMImageMBS.colorize(opacity as UInt32, penColor as GMColorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Colorize image with pen color, using specified percent opacity.
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)

image.colorize(10, new GMColorMBS("red"))

Backdrop=image.CopyPicture

See also:

Feedback, Comments & Corrections

GMImageMBS.colorize(opacityRed as UInt32, opacityGreen as UInt32, opacityBlue as UInt32, penColor as GMColorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Colorize image with pen color, using specified percent opacity for red, green, and blue quantums.
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)

image.colorize(10, 0, 5, new GMColorMBS("red"))

Backdrop=image.CopyPicture

See also:

Feedback, Comments & Corrections

GMImageMBS.colorMap(index as UInt32) 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 at colormap position index.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

GMImageMBS.colorMapSize 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: Number of entries in the colormap.
Notes:
Setting the colormap size may extend or truncate the colormap. The maximum number of supported entries is specified by the MaxColormapSize constant, and is dependent on the value of QuantumDepth when GraphicsMagick is compiled. An exception is thrown if more entries are requested than may be supported. Care should be taken when truncating the colormap to ensure that the image colormap indexes reference valid colormap entries.
(Read and Write computed property)

Feedback, Comments & Corrections

GMImageMBS.colorMatrix(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: Apply a color matrix to the image channels.
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.colorMatrix 3, m

Backdrop = g.CopyPicture
Notes: The user supplied matrix may be of order 1 to 5 (1x1 through 5x5).

Feedback, Comments & Corrections

GMImageMBS.colorSpace 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 colorspace (e.g. CMYK) used to represent the image pixel colors.
Notes:
UndefinedColorspace = 0
RGBColorspace = 1 (Plain old RGB colorspace)
GRAYColorspace = 2 (Plain old full-range grayscale)
TransparentColorspace = 3 (RGB but preserve matte channel during quantize)
OHTAColorspace = 4
XYZColorspace = 5 (CIE XYZ)
YCCColorspace = 6 (Kodak PhotoCD PhotoYCC)
YIQColorspace = 7
YPbPrColorspace = 8
YUVColorspace = 9
CMYKColorspace = 10 (Cyan, magenta, yellow, black, alpha)
sRGBColorspace = 11 (Kodak PhotoCD sRGB)
HSLColorspace = 12 (Hue, saturation, luminosity)
HWBColorspace = 13 (Hue, whiteness, blackness)
LABColorspace = 14 (LAB colorspace not supported yet other than via lcms)
CineonLogRGBColorspace = 15 (RGB data with Cineon Log scaling, 2.048 density range)
Rec601LumaColorspace = 16 (Luma (Y) according to ITU-R 601)
Rec601YCbCrColorspace = 17 (YCbCr according to ITU-R 601)
Rec709LumaColorspace = 18 (Luma (Y) according to ITU-R 709)
Rec709YCbCrColorspace = 19 (YCbCr according to ITU-R 709)
(Read and Write computed property)

Feedback, Comments & Corrections

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

Title = str(image.columns)+" x "+str(image.rows)
Backdrop=image.CopyPicture

Feedback, Comments & Corrections

GMImageMBS.CombinePictureWithMask as picture
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 10.2 Yes Yes Yes Yes No
Function: Creates a copy of the image with mask.
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)

dim c as new GMColorMBS("white")
image.transparent(c)

Backdrop=image.CombinePictureWithMask
Notes: Internally this calls Width and Height, CopyPicture and CopyMask.

Feedback, Comments & Corrections

GMImageMBS.compare(image as GMImageMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Compare current image with another image.
Notes: Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError in the current image. False is returned if the images are identical. An ErrorOption exception is thrown if the reference image columns, rows, colorspace, or matte differ from the current image:

Feedback, Comments & Corrections

GMImageMBS.compose 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: Composition operator to be used when composition is implicitly used (such as for image flattening).
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

GMImageMBS.composite(compositeImage as GMImageMBS, gravity as Integer, CompositeOperator as Integer=2)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Compose an image onto another at specified x and y offset and using a specified algorithm.

See also:

Feedback, Comments & Corrections

GMImageMBS.composite(compositeImage as GMImageMBS, offset as GMGeometryMBS, CompositeOperator as Integer=2)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Compose an image onto another at specified x and y offset and using a specified algorithm.

See also:

Feedback, Comments & Corrections

GMImageMBS.composite(compositeImage as GMImageMBS, xOffset as Integer, yOffset as Integer, CompositeOperator as Integer=2)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Compose an image onto another at specified x and y offset and using a specified algorithm.

See also:

Feedback, Comments & Corrections

GMImageMBS.compressType 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: Image compresion type.
Notes:
The default is the compression type of the input image file.
(Read and Write computed property)

Feedback, Comments & Corrections

GMImageMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Default constructor.
Example:
// get some image data (e.g. from blob in database)
dim logo as Picture = LogoMBS(500)
dim jpegData as string = PictureToJPEGStringMBS(logo, 80)

// new image
Dim mp as new GMImageMBS
dim blob as new GMBlobMBS(jpegData)

// read data from blob into this image object
mp.Read blob

// sometimes you need to explicit convert to RGB/RGBA
'mp.type = mp.TrueColorMatteType
Backdrop=mp.CombinePictureWithMask

See also:

Feedback, Comments & Corrections

GMImageMBS.Constructor(size as GMGeometryMBS, ColorValue as GMColorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Construct a blank image canvas of specified size and color.
Example:
dim g as new GMGeometryMBS(600,600)
dim c as new GMColorRGBMBS(1.0,0.0,0.0) // red
dim image as new GMImageMBS(g, c)

const TrueColorType=6

// Ensure that there are no other references to this image.
image.modifyImage
// Set the image type to TrueColor DirectClass representation.
image.type=TrueColorType

Backdrop=image.CopyPicture(0,0,600,600)

See also:

Feedback, Comments & Corrections

GMImageMBS.Constructor(width as UInt32, height as UInt32, map as string, StorageType as Integer, data as ptr)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 14.1 Yes Yes Yes Yes No
Function: Initializes single image frame from an array of raw pixels, with specified storage type (ConstituteImage).
Example:
dim data as new memoryblock(2048*2048) // your data
dim image as new GMImageMBS(2048, 2048, "I", GMImageMBS.StorageTypeCharPixel, data)
Notes:
Returns an Image corresponding to an image stored in a raw memory array format. The pixel data must be in scanline order top-to-bottom. The data can be unsigned char, unsigned short int, unsigned int, unsigned long, float, or double. Float and double require the pixels to be normalized to the range [0..1], otherwise the range is [0..MaxVal] where MaxVal is the maximum possible value for that type.

Note that for most 32-bit architectures the size of an unsigned long is the same as unsigned int, but for 64-bit architectures observing the LP64 standard, an unsigned long is 64 bits, while an unsigned int remains 32 bits. This should be considered when deciding if the data should be described as "Integer" or "Long".

For example, to create a 640x480 image from unsigned red-green-blue character data, use

image = new GMImageMBS(640, 480, "RGB", GMImageMBS.StorageTypeCharPixel, pixels);

width: width in pixels of the image.
height: height in pixels of the image.
map: This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (same as Transparency), O = Opacity, T = Transparency, C = cyan, Y = yellow, M = magenta, K = black, or I = intensity (for grayscale). Specify "P" = pad, to skip over a quantum which is intentionally ignored. Creation of an alpha channel for CMYK images is currently not supported.
type: Define the data type of the pixels. Float and double types are expected to be normalized [0..1] otherwise [0..MaxRGB]. Choose from these types: StorageTypeCharPixel, StorageTypeShortPixel, StorageTypeIntegerPixel, StorageTypeLongPixel, StorageTypeFloatPixel, or StorageTypeDoublePixel.
pixels: This array of values contain the pixel components as defined by map and type. You must preallocate this array where the expected length varies depending on the values of width, height, map, and type.

See also:

Feedback, Comments & Corrections

GMImageMBS.contrast(sharpen as UInt32)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GraphicsMagick MBS GraphicsMagick Plugin 9.3 Yes Yes Yes Yes No
Function: Contrast image (enhance intensity differences in image).
Example:
dim p as Picture = LogoMBS(500)
dim image as new GMImageMBS(p)

image.contrast(10)

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 Chart Plugins