org.kde.koala
public class KImageEffect extends Object implements QtSupport
UNKNOWN: This class includes various QImage based graphical effects.
Field Summary | |
---|---|
static int | All |
static int | Blue |
static int | Centered |
static int | CenteredAutoFit |
static int | CenteredMaxpect |
static int | CenterTiled |
static int | Contrast |
static int | CrossDiagonalGradient |
static int | DiagonalGradient |
static int | EastLite |
static int | EllipticGradient |
static int | GaussianNoise |
static int | Gray |
static int | Green |
static int | HorizontalGradient |
static int | HueShift |
static int | ImpulseNoise |
static int | Intensity
This enum provides a modulation type specification |
static int | LaplacianNoise |
static int | Linear
This enum lists possible bumpmapping implementations. |
static int | MultiplicativeGaussianNoise |
static int | NELite |
static int | NoImage
Disposition of a source image on top of a destination image. |
static int | NorthLite
This enum provides a lighting direction specification |
static int | NWLite |
static int | PipeCrossGradient |
static int | PoissonNoise |
static int | PyramidGradient |
static int | RectangleGradient |
static int | Red
This enum provides a RGB channel specification |
static int | Rotate180 |
static int | Rotate270 |
static int | Rotate90
This enum provides a rotation specification. |
static int | Saturation |
static int | Scaled |
static int | SELite |
static int | Sinuosidal |
static int | SouthLite |
static int | Spherical |
static int | SWLite |
static int | Tiled |
static int | TiledMaxpect |
static int | UniformNoise
This enum provides a noise type specification |
static int | VerticalGradient
This enum provides a gradient type specification |
static int | WestLite |
Constructor Summary | |
---|---|
protected | KImageEffect(Class dummy) |
KImageEffect() |
Method Summary | |
---|---|
static QImage | addNoise(QImage src, int type)
Adds noise to an image. |
static QImage | addNoise(QImage src) |
static QImage | blend(QColor clr, QImage dst, float opacity)
Blends a color into the destination image, using an opacity
value for blending one into another. |
static QImage | blend(QImage src, QImage dst, float opacity)
Blend the src image into the destination image, using an opacity
value for blending one into another. |
static QImage | blend(QImage image, float initial_intensity, QColor bgnd, int eff, boolean anti_dir)
Blend the provided image into a background of the indicated color. |
static QImage | blend(QImage image, float initial_intensity, QColor bgnd, int eff) |
static QImage | blend(QImage image1, QImage image2, int gt, int xf, int yf)
Blend an image into another one, using a gradient type
for blending from one to another. |
static QImage | blend(QImage image1, QImage image2, int gt, int xf) |
static QImage | blend(QImage image1, QImage image2, int gt) |
static QImage | blend(QImage image1, QImage image2, QImage blendImage, int channel)
Blend an image into another one, using a color channel of a
third image for the decision of blending from one to another. |
static boolean | blend(QImage upper, QImage lower, QImage output)
Blend an image into another one, using alpha in the expected way. |
static boolean | blend(int[] x, int[] y, QImage upper, QImage lower, QImage output)
Blend an image into another one, using alpha in the expected way and
over coordinates x and y with respect to the lower image.
|
static boolean | blendOnLower(int x, int y, QImage upper, QImage lower)
Blend an image into another one, using alpha in the expected way and
over coordinates x and y with respect to the lower image.
|
static void | blendOnLower(QImage upper, QPoint upperOffset, QImage lower, QRect lowerRect)
Blend part of an image into part of another, using the alpha channel in
the expected way.
|
static void | blendOnLower(QImage upper, QPoint upperOffset, QImage lower, QRect lowerRect, float opacity)
Blend part of an image into part of another, using the opacity value
and the alpha channel in the expected way.
|
static void | blendOnLower(QImage upper, QImage lower, int disposition, float opacity)
Blend an image on top of another using a given disposition and a given
opacity. |
static QImage | blur(QImage src, double radius, double sigma)
Blurs an image by convolving pixel neighborhoods. |
static QImage | blur(QImage src, double factor)
This is provided for binary compatability only! |
static QImage | blur(QImage src) |
static QImage | bumpmap(QImage img, QImage map, double azimuth, double elevation, int depth, int xofs, int yofs, int waterlevel, int ambient, boolean compensate, boolean invert, int type, boolean tiled)
A bumpmapping algorithm. |
static QImage | channelIntensity(QImage image, float percent, int channel)
Modifies the intensity of a pixmap's RGB channel component. |
static QImage | charcoal(QImage src, double radius, double sigma)
Produces a neat little "charcoal" effect. |
static QImage | charcoal(QImage src, double factor)
This is provided for binary compatability only! |
static QImage | charcoal(QImage src) |
static QRect | computeDestinationRect(QSize lowerSize, int disposition, QImage upper)
Compute the destination rectangle where to draw the upper image on top
of another image using the given disposition. |
static QImage | contrast(QImage image, int c)
Fast, but low quality contrast of an image. |
static void | contrastHSV(QImage img, boolean sharpen)
High quality, expensive HSV contrast. |
static void | contrastHSV(QImage img) |
static QImage | desaturate(QImage image, float desat)
Desaturate an image evenly. |
static QImage | desaturate(QImage image) |
static QImage | despeckle(QImage src)
Minimizes speckle noise in the source image using the 8 hull
algorithm. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
static QImage | dither(QImage image, QColor palette, int size)
Dither an image using Floyd-Steinberg dithering for low-color
situations. |
static QImage | edge(QImage src, double radius)
Detects edges in an image using pixel neighborhoods and an edge
detection mask. |
static QImage | emboss(QImage src, double radius, double sigma)
Embosses the source image. |
static QImage | emboss(QImage src)
Convenience method. |
static void | equalize(QImage img)
Performs histogram equalisation on the reference
image. |
static QImage | fade(QImage image, float val, QColor color)
Fade an image to a certain background color.
|
protected void | finalize() Deletes the wrapped C++ instance |
static QImage | flatten(QImage image, QColor ca, QColor cb, int ncols)
This recolors a pixmap. |
static QImage | flatten(QImage image, QColor ca, QColor cb) |
static QImage | gradient(QSize size, QColor ca, QColor cb, int type, int ncols)
Create a gradient from color a to color b of the specified type. |
static QImage | gradient(QSize size, QColor ca, QColor cb, int type) |
static QImage | hash(QImage image, int lite, int spacing)
Build a hash on any given QImage |
static QImage | hash(QImage image, int lite) |
static QImage | hash(QImage image) |
static QImage | implode(QImage src, double factor, int background)
Implodes an image by a specified percent. |
static QImage | implode(QImage src, double factor) |
static QImage | implode(QImage src) |
static QImage | intensity(QImage image, float percent)
Either brighten or dim the image by a specified percent.
|
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
static QImage | modulate(QImage image, QImage modImage, boolean reverse, int type, int factor, int channel)
Modulate the image with a color channel of another image. |
static void | normalize(QImage img)
Normalises the pixel values to span the full range of color values.
|
static QImage | oilPaint(QImage src, int radius)
This is provided for binary compatability only! |
static QImage | oilPaint(QImage src) |
static QImage | oilPaintConvolve(QImage src, double radius)
Produces an oil painting effect. |
static QImage | rotate(QImage src, int r)
Rotates the image by the specified amount |
static QImage | sample(QImage src, int w, int h)
Scales an image using simple pixel sampling. |
static QImage | selectedImage(QImage img, QColor col)
Calculate the image for a selected image, for instance a selected icon
on the desktop. |
static QImage | shade(QImage src, boolean color_shading, double azimuth, double elevation)
Shades the image using a distance light source. |
static QImage | shade(QImage src, boolean color_shading, double azimuth) |
static QImage | shade(QImage src, boolean color_shading) |
static QImage | shade(QImage src) |
static QImage | sharpen(QImage src, double radius, double sigma)
Sharpens the pixels in the image using pixel neighborhoods. |
static QImage | sharpen(QImage src, double factor)
This is provided for binary compatability only! |
static QImage | sharpen(QImage src) |
static void | solarize(QImage img, double factor)
Produces a 'solarization' effect seen when exposing a photographic
film to light during the development process. |
static void | solarize(QImage img) |
static QImage | spread(QImage src, int amount)
Randomly displaces pixels. |
static QImage | spread(QImage src) |
static QImage | swirl(QImage src, double degrees, int background)
Swirls the image by a specified amount |
static QImage | swirl(QImage src, double degrees) |
static QImage | swirl(QImage src) |
static void | threshold(QImage img, int value)
Thresholds the reference image. |
static void | threshold(QImage img) |
static QImage | toGray(QImage image, boolean fast)
Convert an image to grayscale. |
static QImage | toGray(QImage image) |
static QImage | unbalancedGradient(QSize size, QColor ca, QColor cb, int type, int xfactor, int yfactor, int ncols)
Create an unbalanced gradient.
|
static QImage | unbalancedGradient(QSize size, QColor ca, QColor cb, int type, int xfactor, int yfactor) |
static QImage | unbalancedGradient(QSize size, QColor ca, QColor cb, int type, int xfactor) |
static QImage | unbalancedGradient(QSize size, QColor ca, QColor cb, int type) |
static QImage | wave(QImage src, double amplitude, double frequency, int background)
Modifies the pixels along a sine wave. |
static QImage | wave(QImage src, double amplitude, double frequency) |
static QImage | wave(QImage src, double amplitude) |
static QImage | wave(QImage src) |
See Also: KImageEffect
UNKNOWN: This enum provides a modulation type specification
See Also: KImageEffect
UNKNOWN: This enum lists possible bumpmapping implementations.
See Also: KImageEffect KImageEffect
UNKNOWN: Disposition of a source image on top of a destination image.
See Also: KImageEffect
UNKNOWN: This enum provides a lighting direction specification
See Also: KImageEffect KImageEffect KImageEffect
UNKNOWN: This enum provides a RGB channel specification
See Also: KImageEffect
UNKNOWN: This enum provides a rotation specification.
See Also: KImageEffect
UNKNOWN: This enum provides a noise type specification
See Also: KImageEffect KImageEffect KImageEffect
UNKNOWN: This enum provides a gradient type specification
Parameters: src The QImage to process. type The algorithm used to generate the noise.
Returns: The image with noise added. The original is not changed.
UNKNOWN: Adds noise to an image.
Parameters: clr source color to be blended into the destination image. dst destination image in which the source will be blended into. opacity opacity (between 0.0 and 1.0) which determines how much the source color will be blended into the destination image.
Returns: The destination image (dst) containing the result.
UNKNOWN: Blends a color into the destination image, using an opacity value for blending one into another.
Parameters: src source image to be blended into the destination image. dst destination image in which the source will be blended into. opacity opacity (between 0.0 and 1.0) which determines how much the source image will be blended into the destination image.
Returns: The destination image (dst) containing the result.
UNKNOWN: Blend the src image into the destination image, using an opacity value for blending one into another.
Parameters: initial_intensity this parameter takes values from -1 to 1: a) if positive: how much to fade the image in its less affected spot b) if negative: roughly indicates how much of the image remains unaffected bgnd indicates the color of the background to blend in eff lets you choose what kind of blending you like anti_dir blend in the opposite direction (makes no much sense with concentric blending effects) image must be 32bpp
UNKNOWN: Blend the provided image into a background of the indicated color.
Parameters: image1 source1 and result of blending image2 source2 of blending gt gradient type for blending between source1 and source2 xf x decay length for unbalanced gradient tpye yf y decay length for unbalanced gradient tpye
UNKNOWN: Blend an image into another one, using a gradient type for blending from one to another.
Parameters: image1 Source 1 and result of blending image2 Source 2 of blending blendImage If the gray value of of pixel is 0, the result for this pixel is that of image1; for a gray value of 1, the pixel of image2 is used; for a value in between, a corresponding blending is used. channel The RBG channel to use for the blending decision.
UNKNOWN: Blend an image into another one, using a color channel of a third image for the decision of blending from one to another.
Parameters: upper the "upper" image lower the "lower" image output the target image
UNKNOWN: Blend an image into another one, using alpha in the expected way.
x
and y
with respect to the lower image.
The output is a QImage which is the upper
image already blended
with the lower
one, so its size will be (in general) the same than
upper
instead of the same size than lower
like the method above.
In fact, the size of output
is like upper's one only when it can be
painted on lower, if there has to be some clipping, output's size will
be the clipped area and x and y will be set to the correct up-left corner
where the clipped rectangle begins.Parameters: x x-coordinate of lower image y y-coordinate of lower image upper the "upper" image lower the "lower" image output the target image
UNKNOWN: Blend an image into another one, using alpha in the expected way and over coordinates x
and y
with respect to the lower image.
x
and y
with respect to the lower image.
The output is painted in the own lower
image. This is an optimization
of the blend method above provided by convenience.Parameters: x x-coordinate of lower image y y-coordinate of lower image upper the "upper" image lower the "lower" image, which becomes the output image
UNKNOWN: Blend an image into another one, using alpha in the expected way and over coordinates x
and y
with respect to the lower image.
Parameters: upper the "upper" image upperOffset Offset for the part of the upper image to be used. lower the "lower" image lowerRect Rectangle for the part of the lower image where the blending will occur.
UNKNOWN: Blend part of an image into part of another, using the alpha channel in the expected way.
Parameters: upper the "upper" image upperOffset Offset for the part of the upper image to be used. lower the "lower" image lowerRect Rectangle for the part of the lower image where the blending will occur. opacity Opacity (between 0.0 and 1.0) which determines how much the source image will be blended into the destination image.
UNKNOWN: Blend part of an image into part of another, using the opacity value and the alpha channel in the expected way.
UNKNOWN: Blend an image on top of another using a given disposition and a given opacity.
Parameters: src The QImage to process. radius The radius of the gaussian not counting the center pixel. Use 0 and a suitable radius will be automatically used. sigma The standard deviation of the gaussian. Use 1 if you're not sure.
Returns: The blurred image. The original is not changed.
UNKNOWN: Blurs an image by convolving pixel neighborhoods.
UNKNOWN: This is provided for binary compatability only! Use the above method with a radius and sigma instead!
Parameters: img the image you want bumpmap map the map used azimuth azimuth elevation elevation depth depth (not the depth of the image, but of the map) xofs X offset yofs Y offset waterlevel level that full transparency should represent ambient ambient lighting factor compensate compensate for darkening invert invert bumpmap type type of the bumpmap tiled tile the bumpmap over the image through the Y offset
Returns: The destination image (dst) containing the result.
UNKNOWN: A bumpmapping algorithm.
Parameters: image The QImage to process. percent Percent value. Use a negative value to dim. channel Which channel(s) should be modified
Returns: The image
, provided for convenience.
UNKNOWN: Modifies the intensity of a pixmap's RGB channel component.
Parameters: src The QImage to process. radius The radius of the gaussian not counting the center pixel. Use 0 and a suitable radius will be automatically used. sigma The standard deviation of the gaussian. Use 1 if you're not sure.
Returns: The charcoal image. The original is not changed.
UNKNOWN: Produces a neat little "charcoal" effect.
UNKNOWN: This is provided for binary compatability only! Use the above method with a radius and sigma instead!
Parameters: lowerSize The size of the destination image. disposition The wanted disposition. upper The upper image. Note that this image may be scaled to adjust to the requested disposition.
Returns: the computed rectangle. Its size may exceed @e lowerSize.
UNKNOWN: Compute the destination rectangle where to draw the upper image on top of another image using the given disposition.
Parameters: image The QImage to process. c A contrast value between -255 to 255.
Returns: The image(), provided for convenience.
UNKNOWN: Fast, but low quality contrast of an image.
Parameters: img The QImage to process. sharpen If true sharpness is increase, (spiffed). Otherwise it is decreased, (dulled).
UNKNOWN: High quality, expensive HSV contrast.
Parameters: image The QImage to process. desat A value between 0 and 1 setting the degree of desaturation
Returns: Returns the image(), provided for convenience.
UNKNOWN: Desaturate an image evenly.
Parameters: src The QImage to process.
Returns: The despeckled image. The original is not changed.
UNKNOWN: Minimizes speckle noise in the source image using the 8 hull algorithm.
Parameters: image The QImage to process. palette The color palette to use size The size of the palette
Returns: Returns the image(), provided for convenience.
UNKNOWN: Dither an image using Floyd-Steinberg dithering for low-color situations.
Parameters: src The QImage to process. radius The radius of the gaussian not counting the center pixel. Use 0 and a suitable radius will be automatically used.
Returns: The image with edges detected. The original is not changed.
UNKNOWN: Detects edges in an image using pixel neighborhoods and an edge detection mask.
Parameters: src The QImage to process. radius The radius of the gaussian not counting the center pixel. Use 0 and a suitable radius will be automatically used. sigma The standard deviation of the gaussian. Use 1 if you're not sure.
Returns: The embossed image. The original is not changed.
UNKNOWN: Embosses the source image.
UNKNOWN: Convenience method.
Parameters: img the image that is equalised
UNKNOWN: Performs histogram equalisation on the reference image.
Parameters: image The QImage to process. val The strength of the effect. 0 <= val <= 1. color The background color.
Returns: Returns the image(), provided for convenience.
UNKNOWN: Fade an image to a certain background color.
Parameters: image A QImage to process. ca Color a cb Color b ncols The number of colors to dither the image to. Pass 0 to prevent dithering.
UNKNOWN: This recolors a pixmap.
Parameters: size The desired size of the gradient. ca Color a cb Color b type The type of gradient. ncols The number of colors to use when not running on a truecolor display. The gradient will be dithered to this number of colors. Pass 0 to prevent dithering.
UNKNOWN: Create a gradient from color a to color b of the specified type.
Parameters: image The QImage to process lite The hash faces the indicated lighting (cardinal poles). spacing How many unmodified pixels in between hashes.
Returns: Returns the image(), provided for convenience.
UNKNOWN: Build a hash on any given QImage
Parameters: src The QImage to process. factor The extent of the implosion. background An RGBA value to use for the background. After the effect some pixels may be "empty". This value is used for those pixels.
Returns: The imploded image. The original is not changed.
UNKNOWN: Implodes an image by a specified percent.
Parameters: image The QImage to process. percent The percent value. Use a negative value to dim.
Returns: Returns The image(), provided for convenience.
UNKNOWN: Either brighten or dim the image by a specified percent.
Parameters: image The QImage to modulate and result. modImage The QImage to use for modulation. reverse Invert the meaning of image/modImage; result is image! type The modulation Type to use. factor The modulation amplitude; with 0 no effect [-200;200]. channel The RBG channel of image2 to use for modulation.
Returns: Returns the image(), provided for convenience.
UNKNOWN: Modulate the image with a color channel of another image.
Parameters: img the image that is normalised
UNKNOWN: Normalises the pixel values to span the full range of color values.
UNKNOWN: This is provided for binary compatability only! Use the above method instead!
Parameters: src The QImage to process. radius The radius of the gaussian not counting the center pixel. Use 0 and a suitable radius will be automatically used.
Returns: The new image. The original is not changed.
UNKNOWN: Produces an oil painting effect.
Parameters: src The QImage to process. r The rotate direction.
Returns: The rotated image. The original is not changed.
UNKNOWN: Rotates the image by the specified amount
Parameters: src The QImage to process. w The new width. h The new height.
Returns: The scaled image. The original is not changed.
UNKNOWN: Scales an image using simple pixel sampling.
Parameters: img the QImage to select col the selected color, usually from QColorGroup.highlight().
UNKNOWN: Calculate the image for a selected image, for instance a selected icon on the desktop.
Parameters: src The QImage to process. color_shading If true do color shading, otherwise do grayscale. azimuth Determines the light source and direction. elevation Determines the light source and direction.
Returns: The shaded image. The original is not changed.
UNKNOWN: Shades the image using a distance light source.
Parameters: src The QImage to process. radius The radius of the gaussian not counting the center pixel. Use 0 and a suitable radius will be automatically used. sigma The standard deviation of the gaussian. Use 1 if you're not sure.
Returns: The sharpened image. The original is not changed.
UNKNOWN: Sharpens the pixels in the image using pixel neighborhoods.
UNKNOWN: This is provided for binary compatability only! Use the above method instead!
Parameters: img The QImage to process. factor The extent of the solarization (0-99.9)
UNKNOWN: Produces a 'solarization' effect seen when exposing a photographic film to light during the development process.
Parameters: src The QImage to process. amount The vicinity for choosing a random pixel to swap.
Returns: The image with pixels displaced. The original is not changed.
UNKNOWN: Randomly displaces pixels.
Parameters: src The QImage to process. degrees The tightness of the swirl. background An RGBA value to use for the background. After the effect some pixels may be "empty". This value is used for those pixels.
Returns: The swirled image. The original is not changed.
UNKNOWN: Swirls the image by a specified amount
Parameters: img The QImage to process. value The threshold value.
UNKNOWN: Thresholds the reference image.
Parameters: image The QImage to process. fast Set to true
in order to use a faster but non-photographic
quality algorithm. Appropriate for things such as toolbar icons.
Returns: Returns the image(), provided for convenience.
UNKNOWN: Convert an image to grayscale.
Parameters: size The desired size of the gradient. ca Color a cb Color b type The type of gradient. xfactor The x decay length. Use a value between -200 and 200. yfactor The y decay length. ncols The number of colors. See KImageEffect:gradient.
UNKNOWN: Create an unbalanced gradient.
Parameters: src The QImage to process. amplitude The amplitude of the sine wave. frequency The frequency of the sine wave. background An RGBA value to use for the background. After the effect some pixels may be "empty". This value is used for those pixels.
Returns: The new image. The original is not changed.
UNKNOWN: Modifies the pixels along a sine wave.