Platforms to show: All Mac Windows Linux Cross-Platform

Back to IMImageQ16MBS class.

Previous items Next items

IMImageQ16MBS.MergeImageLayers(ImageLayerMethod as Integer) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 8.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
MergeImageLayers() composes all the image layers from the current given image onward to produce a single image of the merged layers.

The inital canvas's size depends on the given ImageLayerMethod, and is initialized using the first images images background color. The images are then compositied onto that image in sequence using the given composition that has been assigned to each individual image.

ImageLayerMethod:
the method of selecting the size of the initial canvas.

MergeLayer: Merge all layers onto a canvas just large enough to hold all the actual images. The virtual canvas of the first image is preserved but otherwise ignored.

FlattenLayer: Use the virtual canvas size of first image. Images which fall outside this canvas is clipped. This can be used to 'fill out' a given virtual canvas.

MosaicLayer: Start with the virtual canvas of the first image, enlarging left and right edges to contain all images. Images with negative offsets will be clipped.

Can raise an exception.

IMImageQ16MBS.MosaicImages as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
MosaicImages inlays an image sequence to form a single coherent picture.

It returns a single image with each image in the sequence composited at the location defined by the page member of the image structure.
Returns nil on any error.
Sets the last exception property.

IMImageQ16MBS.MotionBlur(radius as Double, sigma as Double, angle as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Simulates motion blur.

We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma). For reasonable results, radius should be larger than sigma. Use a radius of 0 and MotionBlur selects a suitable radius for you. Angle gives the angle of the blurring motion.
Sets the last exception property.

For more details please check the ImageMagick documentation.

IMImageQ16MBS.NegateImage(gray as boolean = false) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Negates the colors in the reference image.

Returns true on success or false on failure.
The grayscale option means that only grayscale values within the image are negated.

gray: If true, only negate grayscale pixels within the image.

IMImageQ16MBS.NegateImageChannel(ChannelType as Integer, gray as boolean = false) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Negates the colors in the reference image.

Returns true on success or false on failure.
The grayscale option means that only grayscale values within the image are negated.

ChannelType: The channels to use.
gray: If true, only negate grayscale pixels within the image.

Constants for channel:
const UndefinedChannel= 0
const RedChannel= &h0001
const GrayChannel= &h0001
const CyanChannel= &h0001
const GreenChannel= &h0002
const MagentaChannel= &h0002
const BlueChannel= &h0004
const YellowChannel= &h0004
const AlphaChannel= &h0008
const OpacityChannel= &h0008
const BlackChannel= &h0020
const IndexChannel= &h0020
const AllChannels= &h7fffffff

IMImageQ16MBS.NewImage(info as IMImageInfoQ16MBS, width as Integer, height as Integer, background as IMMagickPixelPacketQ16MBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new image.
Example
dim im as ImageMagickQ16MBS // global
dim p as picture
dim imageinfo as IMImageInfoQ16MBS
dim image as IMImageQ16MBS
dim b as new IMMagickPixelPacketQ16MBS
b.Blue=65535
b.ColorSpace=1 // RGB
b.Depth=16

imageinfo = im.NewImageInfo
imageinfo.Depth=16
imageinfo.ColorSpace=1

//this should read any image IM understands
image = new IMImageQ16MBS
if image.NewImage(imageinfo,500,500,b) then
p=New Picture(300,300,32)
p.Graphics.ForeColor=Rgb(255,0,0)
p.Graphics.FillOval 0,0,300,300
image.SetPicture p,0,0
else
MsgBox "failed"
end if

Returns false on failure and true on success.

IMImageQ16MBS.NormalizeImage as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enhances the contrast of a color image by mapping the darkest 2 percent of all pixel to black and the brightest 1 percent to white.

Returns true on success or false on failure.

IMImageQ16MBS.NormalizeImageChannel(ChannelType as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Enhances the contrast of a color image by mapping the darkest 2 percent of all pixel to black and the brightest 1 percent to white.

Returns true on success or false on failure.

ChannelType: The channels to auto-level. If the special 'SyncChannels' flag is set the min/max/mean value of all given channels is used for all given channels, to all channels in the same way.

Constants for channel:
const UndefinedChannel= 0
const RedChannel= &h0001
const GrayChannel= &h0001
const CyanChannel= &h0001
const GreenChannel= &h0002
const MagentaChannel= &h0002
const BlueChannel= &h0004
const YellowChannel= &h0004
const AlphaChannel= &h0008
const OpacityChannel= &h0008
const BlackChannel= &h0020
const IndexChannel= &h0020
const AllChannels= &h7fffffff

IMImageQ16MBS.OilPaint(radius as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Method OilPaintImage creates a new image that is a copy of an existing one with each pixel component replaced with the color of greatest frequency in a circular neighborhood.

radius parameter: radius of the circular neighborhood.
Returns nil on any error.
Sets the last exception property.

IMImageQ16MBS.OptimizeImageLayers as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 8.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
OptimizeImageLayers() compares each image the GIF disposed forms of the previous image in the sequence.

From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the GIF animation.

Can raise an exception.

IMImageQ16MBS.OptimizeImageTransparency

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 8.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
OptimizeImageTransparency() takes a frame optimized GIF animation, and compares the overlayed pixels against the disposal image resulting from all the previous frames in the animation.

Any pixel that does not change the disposal image (and thus does not effect the outcome of an overlay) is made transparent.

WARNING: This modifies the current images directly, rather than generate a new image sequence.

Can raise an exception.

IMImageQ16MBS.OptimizePlusImageLayers as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 8.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
OptimizeImagePlusLayers() is exactly as OptimizeImageLayers(), but may also add or even remove extra frames in the animation, if it improves the total number of pixels in the resulting GIF animation.

Can raise an exception.

IMImageQ16MBS.ProfileImage(name as string, ProfileData as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds or removes a ICC, IPTC, or generic profile from an image.

If the ProfileData is "", it is removed from the image otherwise added. Use a name of '*' and a ProfileData of "" to remove all profiles from the image.

Returns false on any error and true on success.

IMImageQ16MBS.RadialBlur(angle as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
RadialBlur applies a radial blur to the image.

angle: The angle of the radial blur.

Sets the last exception property.
For more details please check the ImageMagick documentation.

IMImageQ16MBS.RaiseImage(x as Integer, y as Integer, width as Integer, height as Integer, raise as boolean) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a simulated three-dimensional button-like effect by lightening and darkening the edges of the image.

Width and height define the width of the vertical and horizontal edge of the effect.
raise: A value other than zero creates a 3-D raise effect, otherwise it has a lowered effect.

IMImageQ16MBS.RandomThresholdChannel(channel as Integer, thresholds as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Canges the value of individual pixels based on the intensity of each pixel compared to a random threshold.

The result is a low-contrast, two color image.

channel: The channel or channels to be thresholded.
thresholds: a geometry string containing low,high thresholds. If the string contains 2x2, 3x3, or 4x4, an ordered dither of order 2, 3, or 4 is performed instead. (ASCII string)

Sets the last exception property.

Constants for channel:
const UndefinedChannel= 0
const RedChannel= &h0001
const GrayChannel= &h0001
const CyanChannel= &h0001
const GreenChannel= &h0002
const MagentaChannel= &h0002
const BlueChannel= &h0004
const YellowChannel= &h0004
const AlphaChannel= &h0008
const OpacityChannel= &h0008
const BlackChannel= &h0020
const IndexChannel= &h0020
const AllChannels= &h7fffffff

For more details please check the ImageMagick documentation.

IMImageQ16MBS.ReduceNoise(radius as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Smooths the contours of an image while still preserving edge information.

The algorithm works by replacing each pixel with its neighbor closest in value. A neighbor is defined by radius. Use a radius of 0 and ReduceNoise selects a suitable radius for you.

For more details please check the ImageMagick documentation.

IMImageQ16MBS.RemoveDuplicateLayers

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes any image that is exactly the same as the next image in the given image list.

Image size and virtual canvas offset must also match, though not the virtual canvas size itself.

No check is made with regards to image disposal setting, though it is the dispose setting of later image that is kept. Also any time delays are also added together. As such coalesced image animations should still produce the same result, though with duplicte frames merged into a single frame.

IMImageQ16MBS.RemoveFirstImageFromList as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes the first image from the image list and returns the image.

Returns nil on any error.
For more details please check the ImageMagick documentation.

IMImageQ16MBS.RemoveImageProfile(name as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes a profile from the image-map by its name.

IMImageQ16MBS.RemoveZeroDelayLayers

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Removes any image that as a zero delay time.

Such images generally represent intermediate or partial updates in GIF animations used for file optimization. They are not ment to be displayed to users of the animation. Viewable images in an animation should have a time delay of 3 or more centi-seconds (hundredths of a second).

However if all the frames have a zero time delay, then either the animation is as yet incomplete, or it is not a GIF animation. This is a non-sensible situation, so no image will be removed and a 'Zero Time Animation' warning (exception) given.

No warning will be given if no image was removed because all images had an appropriate non-zero time delay set.

Due to the special requirements of GIF disposal handling, GIF animations should be coalesced first, before calling this function, though that is not a requirement.

IMImageQ16MBS.ResetImageAttributeIterator

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
ResetImageAttributeIterator() resets the image attributes iterator.

Use it in conjunction with GetNextImageAttribute() to iterate over all the values associated with an image.

IMImageQ16MBS.ResetImageProfileIterator

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Resets the image profile iterator.

Use it in conjunction with GetNextImageProfile() to iterate over all the profiles associated with an image.

IMImageQ16MBS.RGBTransformImage(Colorspace as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Method RGBTransformImage converts the reference image from RGB to an alternate colorspace.

The transformation matrices are not the standard ones: the weights are rescaled to normalized the range of the transformed values to be [0..MaxRGB].

colorspace: An integer value that indicates which colorspace to transform the image.

Returns false on any error and true on success.

constants:
UndefinedColorspace0
RGBColorspace1
GRAYColorspace2
TransparentColorspace3
OHTAColorspace4
LABColorspace5
XYZColorspace6
YCbCrColorspace7
YCCColorspace8
YIQColorspace9
YPbPrColorspace10
YUVColorspace11
CMYKColorspace12
sRGBColorspace13
HSBColorspace14
HSLColorspace15
HWBColorspace16

IMImageQ16MBS.Roll(x as Integer, y as Integer) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Roll offsets an image as defined by x and y.

Returns nil on any error.
Sets the last exception property.

IMImageQ16MBS.Rotate(degrees as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Rotation of an image.

Method RotateImage creates a new image that is a rotated copy of an existing one. Positive angles rotate counter-clockwise (right-hand rule), while negative angles rotate clockwise. Rotated images are usually larger than the originals and have 'empty' triangular corners. X axis. Empty triangles left over from shearing the image are filled with the color specified by the image background_color. RotateImage allocates the memory necessary for the new Image structure and returns a pointer to the new image.

Method RotateImage is based on the paper ''A Fast Algorithm for General Raster Rotatation'' by Alan W. Paeth. RotateImage is adapted from a similar method based on the Paeth paper written by Michael Halle of the Spatial Imaging Group, MIT Media Lab.

degrees: Specifies the number of degrees to rotate the image.

Sets the lastexception property.
Returns nil on low memory.
For more details please check the ImageMagick documentation.

IMImageQ16MBS.SetImageAttribute(key as string, value as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
SetImageAttribute searches the list of image attributes and replaces the attribute value.

If it is not found in the list, the attribute name and value is added to the list. If the attribute exists in the list, the value is concatenated to the attribute. SetImageAttribute returns True if the attribute is successfully concatenated or added to the list, otherwise False. If the value is "", the matching key is deleted from the list.

IMImageQ16MBS.SetImageColorspace(Colorspace as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets the colorspace member of the Image structure.

Returns false on any error and true on success.

IMImageQ16MBS.SetImageProfile(name as string, ProfileData as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a named profile to the image.

If a profile with the same name already exists, it is replaced. This method differs from the ProfileImage() method in that it does not apply CMS color profiles.

name: The profile name.
profiledata: The binary data of the profile.

Returns false on any error and true on success.

IMImageQ16MBS.SetPicture(pic as picture, x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Copies the pixels from a given Xojo picture into the Image Magick Image at the given location.
Example
dim image as IMImageQ16MBS // your image
dim p as picture

p=New Picture(32,32,32)
p.Graphics.ForeColor=rgb(0,255,0)
p.Graphics.FillRect 0,0,32,32

image.SetPicture(p,30,30)

Sets the last exception property.
The method will do nothing on bad bounds.
This method works only for bitmap images.
x and y are zero based.

IMImageQ16MBS.SetPictureMask(maskpic as picture, x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Copies the pixels from a given Xojo picture into the mask of the Image Magick Image at the given location.
Example
dim i as IMImageQ16MBS // your image
dim p as picture

p=New Picture(32,32,32)
p.Graphics.ForeColor=rgb(0,255,0)
p.Graphics.FillRect 0,0,32,32

i.SetPictureMask(p,30,30)

Sets the last exception property.
The method will do nothing on bad bounds.
This method works only for bitmap images.
x and y are zero based.
You may need to set matte=True after this.

IMImageQ16MBS.SetPixel(x as Integer, y as Integer, newPixel as IMColorQ16MBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets a pixel value.
Example
dim image as IMImageQ16MBS // your image
dim co as IMColorQ16MBS

co=new IMColorQ16MBS
co.blue=65535 // max value
image.SetPixel 50,50,co // Makes Pixel 50/50 blue

The method will fail silently if the values are out of bounds or the image is not a bitmap image.
This method works only for bitmap images.
x and y are zero based.

IMImageQ16MBS.Shade(gray as boolean, azimuth as Double, elevation as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shines a distant light on an image to create a three-dimensional effect.

You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis.
Sets the last exception property.

For more details please check the ImageMagick documentation.

IMImageQ16MBS.SharpenChannel(channel as Integer, radius as Double, sigma as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sharpens one or more image channels.

We convolve the image with a Gaussian operator of the given radius and standard deviation (sigma) . For reasonable results, radius should be larger than sigma. Use a radius of 0 and Sharpen selects a suitable radius for you.

channel: The channel type.
radius: The radius of the Gaussian, in pixels, not counting the center pixel.
sigma: The standard deviation of the Laplacian, in pixels.

Constants for channel:
const UndefinedChannel= 0
const RedChannel= &h0001
const GrayChannel= &h0001
const CyanChannel= &h0001
const GreenChannel= &h0002
const MagentaChannel= &h0002
const BlueChannel= &h0004
const YellowChannel= &h0004
const AlphaChannel= &h0008
const OpacityChannel= &h0008
const BlackChannel= &h0020
const IndexChannel= &h0020
const AllChannels= &h7fffffff

Sets the last exception property.
For more details please check the ImageMagick documentation.

IMImageQ16MBS.Shave(x as Integer, y as Integer, width as Integer, height as Integer) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Shave shaves pixels from the image edges.

It allocates the memory necessary for the new Image structure and returns a pointer to the new image.
Returns nil on any error.
Sets the last exception property.

IMImageQ16MBS.Shear(Xshear as Double, Yshear as Double) as IMImageQ16MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Method ShearImage creates a new image that is a shear_image copy of an existing one.

Shearing slides one edge of an image along the X or Y axis, creating a parallelogram. An X direction shear slides an edge along the X axis, while a Y direction shear slides an edge along the Y axis. The amount of the shear is controlled by a shear angle. For X direction shears, x_shear is measured relative to the Y axis, and similarly, for Y direction shears y_shear is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the color defined by the pixel at location (0,0). ShearImage allocates the memory necessary for the new Image structure and returns a pointer to the new image.

Xshear and YYshear specify the number of degrees to shear the image.

Sets the last exception property.
For more details please check the ImageMagick documentation.

IMImageQ16MBS.Solarize(factor as Double) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Image Magick MBS GraphicsMagick Plugin 5.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Method SolarizeImage produces a 'solarization' effect seen when exposing a photographic film to light during the development process.

factor: An double value that defines the extent of the solarization.
Returns nil on any error.
Sets the last exception property.

Previous items Next items

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


The biggest plugin in space...