|
Now support Delphi 7
TOrImage component is a TImage that allow programmer to change picture characteristic: Brightness, Contrast, Lightness, Darkness, Color saturation and add some grafic effects (GrayScale, Invert, ColorNoise, MonoNoise, Posterize, Solorize, Emboss, Mosaic, SplitBlur, GaussianBlur, AntiAlias, Trace, Tile) in design and run time, togethe or by ones.
To set picture characteristic and grafic effects in design time your can use property editor or Object Inspector directly.
TOrImage support any of register in your Delphi grafic files format:
*.jpg, *.bmp, *.gif, *.wmf, *.ico and other.
This are TOrImage new or modified propertys and methods:
public
property IsMouseEntering: Boolean; readonly; Set to True if mouse above the component
property Picture: TPicture; readonly; Picture bitmap (TBitmap) after transform (Set automatically from PictureOriginal)
procedure UpdateEffects; Update Picture transform (use if your change property Picture indirectly)
procedure ResetEffects; Reset any transform and set Picture to PictureOriginal
published
property PictureOriginal: TPicture; Save original picture bitmap as TBitmap (convert from any of register in your Delphi grafic format, successors of TGrafic)
property PicBrightness: Integer; Brightness: -255..255
property PicContrast: Integer; Contrast: -255..MaxInt
property PicGrayScale: Boolean; Gray scale only, if true
property PicLightness: Integer; Lightness: -MaxInt...255
property PicDarkness: Integer; Darkness: -MaxInt...255
property PicSaturation: Integer; Color saturation: -255..MaxInt
property PicSplitlight: Integer; Split light: 0..10
property PicInvert: Boolean; Invert colors, if true
property PicColorNoise: Integer; *1 Add color noise: 0..MaxInt
property PicMonoNoise: Integer; *1 Add mono noise: 0..MaxInt
property PicPosterize: Integer; *2 Posterize effect: 0..MaxInt
property PicSolorize: Integer; *2 Solorize effect: 0..MaxInt
property PicEmboss: Boolean; *3 Set Emboss effect, if true
property PicMosaic: Integer; *3 Mosaic effect: 0..MAX(Pic.W,Pic.H)
property PicSplitBlur: Integer; *3 SplitBlur effect: 0..255;
property PicGaussianBlur: Integer; *3 GaussianBlur effect: 0..50;
property PicAntiAlias: Integer; *3 AntiAlias effect: 0..50;
property PicTrace: Integer; *3 Trace effect: 0..10;
property PicTile: Integer; *3 Tile effect: 0..MAX(Pic.W,Pic.H)div 10;
property PictureEffects; Run effects property EDITOR;
Events:
property OnMouseEnter: TNotifyEvent; Event handler to respond when the mouse entering to client rectangle
property OnMouseExit: TNotifyEvent; Event handler to respond when the mouse exiting of client rectangle
*1, *2, *3 - group of effects. Your can set only one effect from each group at one time.
Other automatic set to 0.
Note:
Some algoritm of grafic effects are deriving from TProEffectImage, written by Babak Sateli
|