KImageEffect Class Reference
#include <kimageeffect.h>
Detailed Description
This class includes various QImage based graphical effects.Everything is static, so there is no need to create an instance of this class. You can just call the static methods. They are encapsulated here merely to provide a common namespace.
Definition at line 50 of file kimageeffect.h.
Public Types | |
enum | GradientType { VerticalGradient, HorizontalGradient, DiagonalGradient, CrossDiagonalGradient, PyramidGradient, RectangleGradient, PipeCrossGradient, EllipticGradient } |
enum | RGBComponent { Red, Green, Blue, Gray, All } |
enum | Lighting { NorthLite, NWLite, WestLite, SWLite, SouthLite, SELite, EastLite, NELite } |
enum | ModulationType { Intensity, Saturation, HueShift, Contrast } |
enum | NoiseType { UniformNoise = 0, GaussianNoise, MultiplicativeGaussianNoise, ImpulseNoise, LaplacianNoise, PoissonNoise } |
enum | RotateDirection { Rotate90, Rotate180, Rotate270 } |
enum | BumpmapType { Linear, Spherical, Sinuosidal } |
enum | Disposition { NoImage = 0, Centered, Tiled, CenterTiled, CenteredMaxpect, TiledMaxpect, Scaled, CenteredAutoFit } |
Static Public Member Functions | |
static QImage | gradient (const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int ncols=3) |
static QImage | unbalancedGradient (const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int xfactor=100, int yfactor=100, int ncols=3) |
static QImage & | blend (const QColor &clr, QImage &dst, float opacity) |
static QImage & | blend (QImage &src, QImage &dst, float opacity) |
static QImage & | blend (QImage &image, float initial_intensity, const QColor &bgnd, GradientType eff, bool anti_dir=false) |
static QImage & | blend (QImage &image1, QImage &image2, GradientType gt, int xf=100, int yf=100) |
static QImage & | blend (QImage &image1, QImage &image2, QImage &blendImage, RGBComponent channel) |
static bool | blend (const QImage &upper, const QImage &lower, QImage &output) |
static bool | blend (int &x, int &y, const QImage &upper, const QImage &lower, QImage &output) |
static bool | blendOnLower (int x, int y, const QImage &upper, const QImage &lower) |
static void | blendOnLower (const QImage &upper, const QPoint &upperOffset, QImage &lower, const QRect &lowerRect) |
static void | blendOnLower (const QImage &upper, const QPoint &upperOffset, QImage &lower, const QRect &lowerRect, float opacity) |
static QRect | computeDestinationRect (const QSize &lowerSize, Disposition disposition, QImage &upper) |
static void | blendOnLower (QImage &upper, QImage &lower, Disposition disposition, float opacity) |
static QImage & | channelIntensity (QImage &image, float percent, RGBComponent channel) |
static QImage & | fade (QImage &image, float val, const QColor &color) |
static QImage & | flatten (QImage &image, const QColor &ca, const QColor &cb, int ncols=0) |
static QImage & | hash (QImage &image, Lighting lite=NorthLite, unsigned int spacing=0) |
static QImage & | intensity (QImage &image, float percent) |
static QImage & | modulate (QImage &image, QImage &modImage, bool reverse, ModulationType type, int factor, RGBComponent channel) |
static QImage & | toGray (QImage &image, bool fast=false) |
static QImage & | desaturate (QImage &image, float desat=0.3) |
static QImage & | contrast (QImage &image, int c) |
static QImage & | dither (QImage &image, const QColor *palette, int size) |
static QImage & | selectedImage (QImage &img, const QColor &col) |
static void | contrastHSV (QImage &img, bool sharpen=true) |
static void | normalize (QImage &img) |
static void | equalize (QImage &img) |
static void | threshold (QImage &img, unsigned int value=128) |
static void | solarize (QImage &img, double factor=50.0) |
static QImage | emboss (QImage &src, double radius, double sigma) |
static QImage | emboss (QImage &src) |
static QImage | despeckle (QImage &src) |
static QImage | charcoal (QImage &src, double radius, double sigma) |
static QImage | charcoal (QImage &src, double factor=50.0) |
static QImage | rotate (QImage &src, RotateDirection r) |
static QImage | sample (QImage &src, int w, int h) |
static QImage | addNoise (QImage &src, NoiseType type=GaussianNoise) |
static QImage | blur (QImage &src, double radius, double sigma) |
static QImage | blur (QImage &src, double factor=50.0) |
static QImage | edge (QImage &src, double radius) |
static QImage | implode (QImage &src, double factor=30.0, unsigned int background=0xFFFFFFFF) |
static QImage | oilPaintConvolve (QImage &src, double radius) |
static QImage | oilPaint (QImage &src, int radius=3) |
static QImage | sharpen (QImage &src, double radius, double sigma) |
static QImage | sharpen (QImage &src, double factor=30.0) |
static QImage | spread (QImage &src, unsigned int amount=3) |
static QImage | shade (QImage &src, bool color_shading=true, double azimuth=30.0, double elevation=30.0) |
static QImage | swirl (QImage &src, double degrees=50.0, unsigned int background=0xFFFFFFFF) |
static QImage | wave (QImage &src, double amplitude=25.0, double frequency=150.0, unsigned int background=0xFFFFFFFF) |
static QImage | bumpmap (QImage &img, QImage &map, double azimuth, double elevation, int depth, int xofs, int yofs, int waterlevel, int ambient, bool compensate, bool invert, BumpmapType type, bool tiled) |
Member Enumeration Documentation
|
This enum lists possible bumpmapping implementations.
Definition at line 129 of file kimageeffect.h. |
|
Disposition of a source image on top of a destination image.
Definition at line 326 of file kimageeffect.h. |
|
This enum provides a gradient type specification.
Definition at line 58 of file kimageeffect.h. |
|
This enum provides a lighting direction specification.
Definition at line 84 of file kimageeffect.h. |
|
This enum provides a modulation type specification.
Definition at line 98 of file kimageeffect.h. |
|
This enum provides a noise type specification.
Definition at line 108 of file kimageeffect.h. |
|
This enum provides a RGB channel specification.
Definition at line 73 of file kimageeffect.h. |
|
This enum provides a rotation specification.
Definition at line 120 of file kimageeffect.h. |
Member Function Documentation
|
Adds noise to an image.
Definition at line 3112 of file kimageeffect.cpp. |
|
Blend an image into another one, using alpha in the expected way and over coordinates
The output is a QImage which is the
Definition at line 2450 of file kimageeffect.cpp. |
|
Blend an image into another one, using alpha in the expected way.
Definition at line 2378 of file kimageeffect.cpp. |
|
Blend an image into another one, using a color channel of a third image for the decision of blending from one to another.
Definition at line 1763 of file kimageeffect.cpp. |
|
Blend an image into another one, using a gradient type for blending from one to another.
Definition at line 1745 of file kimageeffect.cpp. |
|
Blend the provided image into a background of the indicated color.
Definition at line 1537 of file kimageeffect.cpp. |
|
Blend the src image into the destination image, using an opacity value for blending one into another. Very fast direct pixel manipulation is used. This function uses MMX and SSE2 instructions to blend the images on processors that support it.
Definition at line 1308 of file kimageeffect.cpp. |
|
Blends a color into the destination image, using an opacity value for blending one into another. Very fast direct pixel manipulation is used. This function uses MMX and SSE2 instructions to blend the image on processors that support it.
Definition at line 1067 of file kimageeffect.cpp. |
|
Blend an image on top of another using a given disposition and a given opacity. The alpha channel of the upper image is used in the expected way. Beware the upper image may be modified.
Definition at line 2693 of file kimageeffect.cpp. |
|
Blend part of an image into part of another, using the opacity value and the alpha channel in the expected way. Note that the destination rectangle will be correctly clipped.
Definition at line 2606 of file kimageeffect.cpp. |
|
Blend part of an image into part of another, using the alpha channel in the expected way. Note that the destination rectangle will be correctly clipped.
Definition at line 2584 of file kimageeffect.cpp. |
|
Blend an image into another one, using alpha in the expected way and over coordinates
The output is painted in the own
Definition at line 2514 of file kimageeffect.cpp. |
|
This is provided for binary compatability only! Use the above method with a radius and sigma instead!
Definition at line 4253 of file kimageeffect.cpp. |
|
Blurs an image by convolving pixel neighborhoods.
Definition at line 4259 of file kimageeffect.cpp. |
|
A bumpmapping algorithm.
Definition at line 4850 of file kimageeffect.cpp. |
|
Modifies the intensity of a pixmap's RGB channel component.
Definition at line 846 of file kimageeffect.cpp. |
|
This is provided for binary compatability only! Use the above method with a radius and sigma instead!
Definition at line 3676 of file kimageeffect.cpp. |
|
Produces a neat little "charcoal" effect.
Definition at line 3682 of file kimageeffect.cpp. |
|
Compute the destination rectangle where to draw the upper image on top of another image using the given disposition. For tiled disposition, the rectangle should be duplicated on the whole area to obtained the wanted effect.
Definition at line 2628 of file kimageeffect.cpp. |
|
Fast, but low quality contrast of an image. Also see contrastHSV.
Definition at line 2199 of file kimageeffect.cpp. |
|
High quality, expensive HSV contrast. You can do a faster one by just taking a intensity threshold (ie: 128) and incrementing RGB color channels above it and decrementing those below it, but this gives much better results.
Definition at line 4613 of file kimageeffect.cpp. |
|
Desaturate an image evenly.
Definition at line 2176 of file kimageeffect.cpp. |
|
Minimizes speckle noise in the source image using the 8 hull algorithm.
Definition at line 2906 of file kimageeffect.cpp. |
|
Dither an image using Floyd-Steinberg dithering for low-color situations.
Definition at line 2261 of file kimageeffect.cpp. |
|
Detects edges in an image using pixel neighborhoods and an edge detection mask.
Definition at line 4002 of file kimageeffect.cpp. |
|
Convenience method.
Definition at line 4034 of file kimageeffect.cpp. |
|
Embosses the source image. This involves highlighting the edges and applying various other enhancements in order to get a metal effect.
Definition at line 4040 of file kimageeffect.cpp. |
|
Performs histogram equalisation on the reference image.
Definition at line 3902 of file kimageeffect.cpp. |
|
Fade an image to a certain background color. The number of colors will not be changed.
Definition at line 2044 of file kimageeffect.cpp. |
|
This recolors a pixmap. The most dark color will become color a, the most bright one color b, and in between.
Definition at line 1947 of file kimageeffect.cpp. |
|
Create a gradient from color a to color b of the specified type.
Definition at line 124 of file kimageeffect.cpp. |
|
Build a hash on any given QImage.
Definition at line 1866 of file kimageeffect.cpp. |
|
Implodes an image by a specified percent.
Definition at line 3242 of file kimageeffect.cpp. |
|
Either brighten or dim the image by a specified percent. For example, .50 will modify the colors by 50%. This function uses MMX instructions to process the image on processors that support it.
Definition at line 654 of file kimageeffect.cpp. |
|
Modulate the image with a color channel of another image.
Definition at line 937 of file kimageeffect.cpp. |
|
Normalises the pixel values to span the full range of color values. This is a contrast enhancement technique.
Definition at line 3692 of file kimageeffect.cpp. |
|
This is provided for binary compatability only! Use the above method instead!
Definition at line 3606 of file kimageeffect.cpp. |
|
Produces an oil painting effect.
Definition at line 3612 of file kimageeffect.cpp. |
|
Rotates the image by the specified amount.
Definition at line 3323 of file kimageeffect.cpp. |
|
Scales an image using simple pixel sampling. This does not produce nearly as nice a result as QImage::smoothScale(), but has the advantage of being much faster - only a few milliseconds.
Definition at line 2747 of file kimageeffect.cpp. |
|
Calculate the image for a selected image, for instance a selected icon on the desktop.
Definition at line 2705 of file kimageeffect.cpp. |
|
Shades the image using a distance light source.
Definition at line 4475 of file kimageeffect.cpp. |
|
This is provided for binary compatability only! Use the above method instead!
Definition at line 4429 of file kimageeffect.cpp. |
|
Sharpens the pixels in the image using pixel neighborhoods.
Definition at line 4435 of file kimageeffect.cpp. |
|
Produces a 'solarization' effect seen when exposing a photographic film to light during the development process.
Definition at line 3421 of file kimageeffect.cpp. |
|
Randomly displaces pixels.
Definition at line 3444 of file kimageeffect.cpp. |
|
Swirls the image by a specified amount.
Definition at line 3495 of file kimageeffect.cpp. |
|
Thresholds the reference image. You can also threshold images by using ThresholdDither in the various QPixmap/QImage convert methods, but this lets you specify a threshold value.
Definition at line 2810 of file kimageeffect.cpp. |
|
Convert an image to grayscale.
Definition at line 2126 of file kimageeffect.cpp. |
|
Create an unbalanced gradient. An unbalanced gradient is a gradient where the transition from color a to color b is not linear, but in this case, exponential.
Definition at line 388 of file kimageeffect.cpp. |
|
Modifies the pixels along a sine wave.
Definition at line 3573 of file kimageeffect.cpp. |
The documentation for this class was generated from the following files: