actdaa.blogg.se

Delphi sharpen bitmap
Delphi sharpen bitmap









delphi sharpen bitmap

It can be extended in various ways of course to add desired functionality, however it is working and useful as it is. I've created a basic yet functional TBitmap alternative which is very light and efficient.

delphi sharpen bitmap

I know this was posted many years ago, however it's still relevant as recent Delphi versions behave in the same inefficient manner. I know we could work on the pixels in place but this still leaves the 150ms of unnessesary initializtion of the pixels. Is there a way of initializing a TBitmap with the correct size WITHOUT initializing the pixels itself and leaving the memory of the pixels uninitialized (eg dirty)? Or is there another way to do such a thing. With these iomages it takes 150ms to simply create an empty bitmap and a further 140ms to overwrite it's contents. The bitmaps I need to work with are quite large (150MB of RGB memory). X := Integer( Result.ScanLine ) - Integer( D ) When I copy in the bits later on (see routine below) it seems ScanLine is the fastest possibility and not SetDIBits. When using the TBitmap wrapper for a GDI bitmap from the unit Graphics I noticed it will always clear out the bitmap (using a PatBlt call) when setting up a bitmap with SetSize( w, h ).











Delphi sharpen bitmap