![]() |
[Property] Empty bitmap. Why?
Delphi-Quellcode:
Only one task for TCustomFilterLayer is receive bitmap from buffer in rect=layer rect. So, in filter class just need to override DoFilter() method to get processed image in layer. It working for any filter I created.
type
// Base TCustomFilterLayer = class(TPositionedLayer) private FBitmap: TBitmap32; // ... protected procedure Paint(Buffer: TBitmap32); override; // get layer rect and repaint buffer with filter; work with FBitmap procedure DoFilter(Buffer: TBitmap32); virtual; abstract; public constructor Create(ALayerCollection: TLayerCollection); override; // create FBitmap destructor Destroy; override; // free FBitmap published property Bitmap: TBitmap32 read FBitmap; // ... end; // Example filter TInvertFilterLayer = class(TCustomFilterLayer) protected procedure DoFilter(Buffer: TBitmap32); override; // buffer is received in TCustomFilterLayer.Paint() end; var L: TCustomFilterLayer; // ... L := TInvertFilterLayer.Create(ImgView.Layers); TInvertFilterLayer(L).Bitmap.SaveToFile(...); But question is about Bitmap property: when I want to save it, eg. to file, output is empty. Why? |
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:10 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz