#include <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 } |
Static Public Member Functions | |
| QImage | gradient (const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int ncols=3) |
| QImage | unbalancedGradient (const QSize &size, const QColor &ca, const QColor &cb, GradientType type, int xfactor=100, int yfactor=100, int ncols=3) |
| QImage & | blend (const QColor &clr, QImage &dst, float opacity) |
| QImage & | blend (QImage &src, QImage &dst, float opacity) |
| QImage & | blend (QImage &image, float initial_intensity, const QColor &bgnd, GradientType eff, bool anti_dir=false) |
| QImage & | blend (QImage &image1, QImage &image2, GradientType gt, int xf=100, int yf=100) |
| QImage & | blend (QImage &image1, QImage &image2, QImage &blendImage, RGBComponent channel) |
| bool | blend (const QImage &upper, const QImage &lower, QImage &output) |
| bool | blend (int &x, int &y, const QImage &upper, const QImage &lower, QImage &output) |
| bool | blendOnLower (int x, int y, const QImage &upper, const QImage &lower) |
| QImage & | channelIntensity (QImage &image, float percent, RGBComponent channel) |
| QImage & | fade (QImage &img, float val, const QColor &color) |
| QImage & | flatten (QImage &image, const QColor &ca, const QColor &cb, int ncols=0) |
| QImage & | hash (QImage &image, Lighting lite=NorthLite, unsigned int spacing=0) |
| QImage & | intensity (QImage &image, float percent) |
| QImage & | modulate (QImage &image, QImage &modImage, bool reverse, ModulationType type, int factor, RGBComponent channel) |
| QImage & | toGray (QImage &image, bool fast=false) |
| QImage & | desaturate (QImage &image, float desat=0.3) |
| QImage & | contrast (QImage &image, int c) |
| QImage & | dither (QImage &img, const QColor *palette, int size) |
| QImage & | selectedImage (QImage &img, const QColor &col) |
| void | contrastHSV (QImage &img, bool sharpen=true) |
| void | normalize (QImage &img) |
| void | equalize (QImage &img) |
| void | threshold (QImage &img, unsigned int value=128) |
| void | solarize (QImage &img, double factor=50.0) |
| QImage | emboss (QImage &src) |
| QImage | despeckle (QImage &src) |
| QImage | charcoal (QImage &src, double factor=50.0) |
| QImage | rotate (QImage &src, RotateDirection r) |
| QImage | sample (QImage &src, int w, int h) |
| QImage | addNoise (QImage &src, NoiseType type=GaussianNoise) |
| QImage | blur (QImage &src, double factor=50.0) |
| QImage | edge (QImage &src, double factor=50.0) |
| QImage | implode (QImage &src, double factor=30.0, unsigned int background=0xFFFFFFFF) |
| QImage | oilPaint (QImage &src, int radius=3) |
| QImage | sharpen (QImage &src, double factor=30.0) |
| QImage | spread (QImage &src, unsigned int amount=3) |
| QImage | shade (QImage &src, bool color_shading=true, double azimuth=30.0, double elevation=30.0) |
| QImage | swirl (QImage &src, double degrees=50.0, unsigned int background=0xFFFFFFFF) |
| QImage | wave (QImage &src, double amplitude=25.0, double frequency=150.0, unsigned int background=0xFFFFFFFF) |
Static Private Member Functions | |
| unsigned int | lHash (unsigned int c) |
| unsigned int | uHash (unsigned int c) |
| int | nearestColor (int r, int g, int b, const QColor *pal, int size) |
| void | hull (const int x_offset, const int y_offset, const int polarity, const int width, const int height, unsigned int *f, unsigned int *g) |
| unsigned int | generateNoise (unsigned int pixel, NoiseType type) |
| unsigned int | interpolateColor (QImage *image, double x, double y, unsigned int background) |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Adds noise to an image.
|
|
||||||||||||||||||||||||
|
Blend an image into another one, using alpha in the expected way and over coordinates |
|
||||||||||||||||
|
Blend an image into another one, using alpha in the expected way.
|
|
||||||||||||||||||||
|
Blend an image into another one, using a color channel of a third image for the decision of blending from one to another.
|
|
||||||||||||||||||||||||
|
Blend an image into another one, using a gradient type for blending from one to another.
|
|
||||||||||||||||||||||||
|
Blend the provided image into a background of the indicated color.
|
|
||||||||||||||||
|
Blend the src image into the destination image, using an opacity value for blending one into another. Very fast direct pixel manipulation is used.
|
|
||||||||||||||||
|
Blends a color into the destination image, using an opacity value for blending one into another. Very fast direct pixel manipulation is used.
|
|
||||||||||||||||||||
|
Blend an image into another one, using alpha in the expected way and over coordinates |
|
||||||||||||
|
Blurs an image by convolving pixel neighborhoods.
|
|
||||||||||||||||
|
Modifies the intensity of a pixmap's RGB channel component.
|
|
||||||||||||
|
Produces a neat little "charcoal" effect.
|
|
||||||||||||
|
Fast, but low quality contrast of an image. Also see contrastHSV.
|
|
||||||||||||
|
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.
|
|
||||||||||||
|
Desaturate an image evenly.
|
|
|
Minimizes speckle noise in the source image using the 8 hull algorithm.
|
|
||||||||||||||||
|
Dither an image using Floyd-Steinberg dithering for low-color situations.
|
|
||||||||||||
|
Detects edges in an image using pixel neighborhoods and an edge detection mask.
|
|
|
Embosses the source image. This involves highlighting the edges and applying various other enhancements in order to get a metal effect.
|
|
|
Performs histogram equalization on the reference image.
|
|
||||||||||||||||
|
Fade an image to a certain background color. The number of colors will not be changed.
|
|
||||||||||||||||||||
|
This recolors a pixmap. The most dark color will become color a, the most bright one color b, and in between.
|
|
||||||||||||
|
|
|
||||||||||||||||||||||||
|
Create a gradient from color a to color b of the specified type.
|
|
||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||
|
Implodes an image by a specified percent.
|
|
||||||||||||
|
Either brighten or dim the image by a specified percent. For example, .50 will modify the colors by 50%.
|
|
||||||||||||||||||||
|
|
|
|
Helper function to fast calc some altered (lighten, shaded) colors |
|
||||||||||||||||||||||||||||
|
Modulate the image with a color channel of another image.
|
|
||||||||||||||||||||||||
|
Helper function to find the nearest color to the RBG triplet |
|
|
Normalizes the pixel values to span the full range of color values. This is a contrast enhancement technique.
|
|
||||||||||||
|
Produces an oil painting effect.
|
|
||||||||||||
|
Rotates the image by the specified amount
|
|
||||||||||||||||
|
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.
|
|
||||||||||||
|
Calculate the image for a selected image, for instance a selected icon on the desktop.
|
|
||||||||||||||||||||
|
Shades the image using a distance light source.
|
|
||||||||||||
|
Sharpens the pixels in the image using pixel neighborhoods.
|
|
||||||||||||
|
Produces a 'solarization' effect seen when exposing a photographic film to light during the development process.
|
|
||||||||||||
|
Randomly displaces pixels.
|
|
||||||||||||||||
|
Swirls the image by a specified amount
|
|
||||||||||||
|
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.
|
|
||||||||||||
|
Convert an image to grayscale.
|
|
|
|
|
||||||||||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||
|
Modifies the pixels along a sine wave.
|
1.3.2