Changeset 521 for GraphicTest/Packages/bgrabitmap/bgrafilters.pas
- Timestamp:
- Apr 17, 2019, 12:58:41 AM (5 years ago)
- Location:
- GraphicTest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest
- Property svn:ignore
-
old new 8 8 GraphicTest.lps 9 9 GraphicTest.dbg 10 heaptrclog.trc
-
- Property svn:ignore
-
GraphicTest/Packages/bgrabitmap/bgrafilters.pas
r494 r521 29 29 30 30 { Grayscale converts colored pixel into grayscale with same luminosity } 31 function FilterGrayscale(bmp: TBGRACustomBitmap): TBGRACustomBitmap; 32 function FilterGrayscale(bmp: TBGRACustomBitmap; ABounds: TRect): TBGRACustomBitmap; 31 function FilterGrayscale(bmp: TBGRACustomBitmap): TBGRACustomBitmap; overload; 32 function FilterGrayscale(bmp: TBGRACustomBitmap; ABounds: TRect): TBGRACustomBitmap; overload; 33 33 function CreateGrayscaleTask(bmp: TBGRACustomBitmap; ABounds: TRect): TFilterTask; 34 34 … … 36 36 and light colors lightest possible } 37 37 function FilterNormalize(bmp: TBGRACustomBitmap; 38 eachChannel: boolean = True): TBGRACustomBitmap; 38 eachChannel: boolean = True): TBGRACustomBitmap; overload; 39 39 function FilterNormalize(bmp: TBGRACustomBitmap; ABounds: TRect; 40 eachChannel: boolean = True): TBGRACustomBitmap; 40 eachChannel: boolean = True): TBGRACustomBitmap; overload; 41 41 42 42 ////////////////////// 3X3 FILTERS //////////////////////////////////////////// 43 43 44 44 { Sharpen filter add more contrast between pixels } 45 function FilterSharpen(bmp: TBGRACustomBitmap; AAmount: integer = 256): TBGRACustomBitmap; 46 function FilterSharpen(bmp: TBGRACustomBitmap; ABounds: TRect; AAmount: integer = 256): TBGRACustomBitmap; 45 function FilterSharpen(bmp: TBGRACustomBitmap; AAmount: integer = 256): TBGRACustomBitmap; overload; 46 function FilterSharpen(bmp: TBGRACustomBitmap; ABounds: TRect; AAmount: integer = 256): TBGRACustomBitmap; overload; 47 47 48 48 { Compute a contour, as if the image was drawn with a 2 pixels-wide black pencil } … … 50 50 51 51 { Emboss filter compute a color difference in the angle direction } 52 function FilterEmboss(bmp: TBGRACustomBitmap; angle: single; AStrength: integer= 64; AOptions: TEmbossOptions = []): TBGRACustomBitmap; 53 function FilterEmboss(bmp: TBGRACustomBitmap; angle: single; ABounds: TRect; AStrength: integer= 64; AOptions: TEmbossOptions = []): TBGRACustomBitmap; 52 function FilterEmboss(bmp: TBGRACustomBitmap; angle: single; AStrength: integer= 64; AOptions: TEmbossOptions = []): TBGRACustomBitmap; overload; 53 function FilterEmboss(bmp: TBGRACustomBitmap; angle: single; ABounds: TRect; AStrength: integer= 64; AOptions: TEmbossOptions = []): TBGRACustomBitmap; overload; 54 54 55 55 { Emboss highlight computes a sort of emboss with 45 degrees angle and … … 72 72 73 73 { Twirl distortion, i.e. a progressive rotation } 74 function FilterTwirl(bmp: TBGRACustomBitmap; ACenter: TPoint; ARadius: Single; ATurn: Single=1; AExponent: Single=3): TBGRACustomBitmap; 75 function FilterTwirl(bmp: TBGRACustomBitmap; ABounds: TRect; ACenter: TPoint; ARadius: Single; ATurn: Single=1; AExponent: Single=3): TBGRACustomBitmap; 74 function FilterTwirl(bmp: TBGRACustomBitmap; ACenter: TPoint; ARadius: Single; ATurn: Single=1; AExponent: Single=3): TBGRACustomBitmap; overload; 75 function FilterTwirl(bmp: TBGRACustomBitmap; ABounds: TRect; ACenter: TPoint; ARadius: Single; ATurn: Single=1; AExponent: Single=3): TBGRACustomBitmap; overload; 76 76 77 77 { Distort the image as if it were on a vertical cylinder } … … 91 91 with rbFast blur, the optimization entails an hyperbolic shape. } 92 92 type TRadialBlurTask = BGRAFilterBlur.TRadialBlurTask; 93 function FilterBlurRadial(bmp: TBGRACustomBitmap; radius: single; blurType: TRadialBlurType): TBGRACustomBitmap; 94 function FilterBlurRadial(bmp: TBGRACustomBitmap; radiusX: single; radiusY: single; blurType: TRadialBlurType): TBGRACustomBitmap; 95 function CreateRadialBlurTask(ABmp: TBGRACustomBitmap; ABounds: TRect; ARadius: single; ABlurType: TRadialBlurType): TRadialBlurTask; 96 function CreateRadialBlurTask(ABmp: TBGRACustomBitmap; ABounds: TRect; ARadiusX,ARadiusY: single; ABlurType: TRadialBlurType): TRadialBlurTask; 93 function FilterBlurRadial(bmp: TBGRACustomBitmap; radius: single; blurType: TRadialBlurType): TBGRACustomBitmap; overload; 94 function FilterBlurRadial(bmp: TBGRACustomBitmap; radiusX: single; radiusY: single; blurType: TRadialBlurType): TBGRACustomBitmap; overload; 95 function CreateRadialBlurTask(ABmp: TBGRACustomBitmap; ABounds: TRect; ARadius: single; ABlurType: TRadialBlurType): TRadialBlurTask; overload; 96 function CreateRadialBlurTask(ABmp: TBGRACustomBitmap; ABounds: TRect; ARadiusX,ARadiusY: single; ABlurType: TRadialBlurType): TRadialBlurTask; overload; 97 97 98 98 { The precise blur allow to specify the blur radius with subpixel accuracy }
Note:
See TracChangeset
for help on using the changeset viewer.