Changeset 525
- Timestamp:
- Apr 17, 2019, 4:48:42 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/Methods/ULazIntfImageColorsCopy.pas
r459 r525 13 13 14 14 TLazIntfImageColorsCopy = class(TDrawMethodImage) 15 TempIntfImage: TLazIntfImage;16 15 constructor Create; override; 17 16 destructor Destroy; override; … … 28 27 inherited; 29 28 Caption := 'TLazIntfImage.Colors copy'; 30 TempIntfImage := TLazIntfImage.Create(0, 0);31 29 Description.Add('Method use TLazIntfImage class for faster access to bitmap pixels compared to simple access using TBitmap.Pixels.'); 32 30 Description.Add('TLazIntfImage is created from visible image.'); … … 35 33 destructor TLazIntfImageColorsCopy.Destroy; 36 34 begin 37 TempIntfImage.Free;38 35 inherited Destroy; 39 36 end; … … 42 39 var 43 40 Y, X: Integer; 41 TempIntfImage: TLazIntfImage; 44 42 begin 45 43 with FastBitmap do begin 44 TempIntfImage := TLazIntfImage.Create(Image.Picture.Bitmap.Width, Image.Picture.Bitmap.Height); 46 45 TempIntfImage.LoadFromBitmap(Image.Picture.Bitmap.Handle, 47 46 Image.Picture.Bitmap.MaskHandle); … … 50 49 TempIntfImage.Colors[X, Y] := TColorToFPColor(SwapBRComponent(Pixels[X, Y])); 51 50 Image.Picture.Bitmap.LoadFromIntfImage(TempIntfImage); 51 TempIntfImage.Free; 52 52 end; 53 53 end;
Note:
See TracChangeset
for help on using the changeset viewer.